1.8 KiB
1.8 KiB
Troubleshooting
Common issues and how to resolve them
-
Socket path exists but is not a socket
- Symptom: startup fails with an error that the socket path exists and is not a socket.
- Fix: remove the file at the socket path or choose a different
--sockpath.
-
Permission denied on socket directory or socket
- Symptom: socket creation or permission setting logs warnings; clients cannot connect.
- Fix: ensure the socket directory exists and has correct ownership/group and that
sock_permandsock_gidare configured appropriately. Consider usingchown/chmodfrom a privileged context.
-
nginx -tfails with/run/nginx.pid: Permission denied- Symptom: validation fails; output contains permission denied for
/run/nginx.pid. - Fixes (tried by the agent):
- If available, provide a privileged validation wrapper (e.g.
/usr/local/sbin/yanpm-nginx-validate) that runsnginx -twith appropriate privileges. - Ensure the agent-runner has permission to read the main nginx configuration and
/run/nginx.pidor allow the agent to use a writable PID override.
- If available, provide a privileged validation wrapper (e.g.
- Symptom: validation fails; output contains permission denied for
-
Fragment file not found during validation
- Symptom: validate returns 500 with message
Config file not found. - Fix: make sure the fragment has been written via
/write_configto the agent's internal subdirectory underNGINX_CONFIG_DIR, using the sameconfig_nameandtimestampas the validate call.
- Symptom: validate returns 500 with message
-
Wrapper or sudo not available
- Symptom: attempts to run
sudo -n /usr/local/sbin/yanpm-nginx-validatefail. - Fix: install a wrapper script that allows unprivileged
sudo -nvalidation or configure proper permissions on nginx state files.
- Symptom: attempts to run
If none of the above solves the problem, collect the logs produced by the agent (it uses tracing/tracing_subscriber) and include the exact command outputs from the validation steps when asking for help.