Skip to content

Troubleshooting

Configuration Fails naati -t

Dump the full expanded configuration across all included files to spot misplaced blocks or conflicting server_names:

naati -T -c /etc/nginx/nginx.conf

Permission Denied on Port 80 / 443 or PID File

  • In rootless Docker or Kubernetes pods (runAsNonRoot: true), use ghcr.io/malotho/naati:unprivileged (listens on port 8080, PID at /tmp/nginx.pid).
  • On systemd hosts, verify /run and /var/log/naati (or /var/log/nginx) are writable by the configured user.

Too Many Open Files (EMFILE / ENFILE)

Ensure both worker_rlimit_nofile in nginx.conf and systemd’s LimitNOFILE= exceed 2 × worker_connections (proxying consumes one client fd + one upstream fd per active request).

Upstream 502 Bad Gateway / 504 Gateway Timeout

  1. Enable error_log ... info; temporarily on the failing server or location to inspect the exact connect/read/TLS error.
  2. Verify proxy_ssl_server_name on; is set when proxying to HTTPS upstreams behind SNI.
  3. If your upstream resolves to IPv6-only (AAAA) addresses, add ipv6=off on resolver until IPv6 upstream support lands.