Skip to main content
Common issues and their solutions when running Anubis.

Configuration Issues

Policy File Not Loading

Symptom: Anubis uses default policy instead of custom policy file. Check:
Common causes:
  1. File path wrong:
  2. File permissions:
  3. YAML syntax errors:

Regular Expression Errors

Symptom: Error on startup:
Common issues:
  1. Trailing newline (ErrRegexEndsWithNewline):
  2. Unescaped special characters:
  3. Invalid regex syntax:
Test regex:
  • Use regex101.com (select Golang flavor)
  • Test with --debug-benchmark-js flag

Configuration Validation Errors

Symptom: Startup fails with validation error.

No Bot Rules Defined

Fix: Add at least one bot rule:

Bot Must Have Name

Fix: Every rule needs a name:

Bot Must Have Matcher

Fix: Rules need at least one matcher:

Invalid CIDR

Fix: Use proper CIDR notation:

Storage Issues

BoltDB Permission Denied

Symptom:
Fix: Check directory permissions:

BoltDB File Lock

Symptom:
Cause: Another Anubis instance has the database locked. Fix:

Valkey Connection Failed

Symptom:
Check:
Common causes:
  1. Wrong URL:
  2. Network policy blocking:
    • Check firewall rules
    • Verify Kubernetes NetworkPolicy
    • Check security groups (cloud)
  3. Authentication required:

S3 Access Denied

Symptom:
Check:
Fix: Update IAM policy:

Runtime Issues

Challenges Not Working

Symptom: Users see challenge page but it doesn’t solve. Check browser console for JavaScript errors. Common causes:
  1. JavaScript disabled: Use metarefresh algorithm
  2. CORS issues: Check proxy configuration
  3. Ad blocker: Whitelist Anubis
  4. CSP headers: Ensure challenge scripts can run

Users Keep Getting Challenged

Symptom: Users solve challenge but are challenged again on next request. Causes:
  1. Cookies disabled: Check browser settings
  2. Cookie domain mismatch:
  3. Signing key changed: Users need to re-solve after key rotation
  4. JWT expired: Check --cookie-expiration-time
  5. IP restriction enabled: Mobile users change IPs
Debug:

High Memory Usage

Symptom: Anubis process using excessive memory. Check:
Causes:
  1. Memory storage backend: No size limits
    • Fix: Use bbolt or valkey
  2. DNS cache growth: Large cache with high DNS TTL
    • Fix: Lower DNS TTL:
  3. Goroutine leak: Check goroutine count

High CPU Usage

Symptom: Anubis using 100% CPU. Causes:
  1. Challenge difficulty too high:
  2. Too many requests: Scale horizontally
  3. Expensive CEL expressions: Optimize rules
Profile CPU:

Network Issues

Client IP Always Shows Internal IP

Symptom: X-Real-IP shows proxy IP, not client IP. Causes:
  1. Missing X-Forwarded-For header: Proxy not configured
  2. Using --use-remote-address: Only for bare metal
Fix: Configure proxy to set headers:

DNS Lookups Failing

Symptom: verifyFCrDNS() always fails. Check:
Causes:
  1. DNS server unreachable: Check /etc/resolv.conf
  2. Firewall blocking port 53: Allow UDP/TCP 53
  3. DNS cache poisoned: Restart Anubis

Performance Issues

Slow Challenge Response

Symptom: Challenge page takes seconds to load. Causes:
  1. Storage backend latency: Check backend health
  2. DNS lookups in expressions: Cache results
  3. Complex CEL expressions: Simplify rules
Benchmark:

High Latency

Symptom: All requests slow through Anubis. Causes:
  1. Backend unreachable: Check target server
  2. TLS handshake slow: Use --target-insecure-skip-verify (dev only)
  3. Storage backend slow: Monitor storage metrics
Profile:

Key and JWT Issues

Generating Random Key Warning

Symptom:
Impact: Challenges invalidated on restart. Fix: Configure signing key:

Key Validation Failed

Symptom:
Fix: Key must be exactly 64 hex characters:

JWT Signature Invalid

Symptom: Users challenged every request despite having cookie. Causes:
  1. Key changed: Signing key rotated
  2. Multi-instance with different keys: Each instance using random key
  3. Clock skew: JWT nbf (not before) in future
Fix:
  1. Use same key across all instances
  2. Sync system clocks (NTP)

Container/Kubernetes Issues

Container Exits Immediately

Symptom: Container starts then exits. Check logs:
Common causes:
  1. Missing target: --target not set or invalid
  2. Configuration error: Invalid policy file
  3. Port already bound: Another process using port 8923

Health Check Failing

Symptom: Kubernetes pod stuck in CrashLoopBackOff. Check:
Fix:
  1. Increase initialDelaySeconds (allow more startup time)
  2. Increase timeoutSeconds (slow storage backend)
  3. Check metrics port binding

Secret Not Mounted

Symptom:
Check:
Fix: Verify volume mount:

Debugging Tips

Enable Debug Logging

Test Mode

Validate Configuration

Anubis validates config on startup. Watch for errors:

Check Prometheus Metrics

Trace Request Flow

Getting Help

If you’re still stuck:
  1. Check logs: --slog-level DEBUG
  2. Review config: Validate YAML syntax
  3. Test components: Storage, DNS, target server
  4. Simplify: Remove complex rules, test with minimal config
  5. Report issue: https://github.com/TecharoHQ/anubis/issues
Include:
  • Anubis version (anubis --version)
  • Configuration (redact secrets)
  • Error messages and logs
  • Steps to reproduce

Next Steps