Sto utilizzando nginx con Supervisor. Il mio contenuto del file supervisord.conf è la seguente:Utilizzo di nginx con supervisore - processo nginx avviato più volte con conseguente errore di associazione
[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
[program:nginx]
command=/usr/sbin/nginx -c /etc/nginx/nginx.conf
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
redirect_stderr=true
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
ho iniziato supervisord dopo aver verificato che -nltp netstat dice tutte le porte sono liberi, ma si prega di trovare il log degli errori nginx di seguito:
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:81 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:18081 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:18082 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:18083 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:10080 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:8080 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:28080 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:18080 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:20081 failed (98: Address already in use)
2014/09/10 20:39:00 [emerg] 277#0: bind() to 0.0.0.0:81 failed (98: Address already in use)
Ma netstat - comando nltp mi dà il seguente:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:28080 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:20081 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:18080 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:18081 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:18082 0.0.0.0:* LISTEN 246/nginx: master p
tcp 0 0 0.0.0.0:18083 0.0.0.0:* LISTEN 246/nginx: master p
Ciò significa che nginx è attivo e funzionante. Ma il supervisore sta provando a lanciare più processi nginx o non sta ricevendo segnale da nginx che è stato avviato. Qualcuno può far luce su questo?
Sembra che nginx (processo principale e sottoprocessi) sia già in esecuzione. Controlla la tua configurazione di nginx (/etc/nginx/nginx.conf) molto probabilmente ha la definizione di quelle porte. Arrestare supervisore, uccidere tutti i processori nginx 'pkill nginx' e riprovare. – danielgpm