2015-06-09 30 views
5

All'avvio di redis con supervisor, il processo redis è in esecuzione, ma nel supervisore mostra il backoff.start redis con supervisor

[email protected]:~$ sudo supervisorctl -c /etc/conf/supervisor/supervisord.conf 
    redis       BACKOFF Exited too quickly (process log may have details) 

nel registro supervisore, mostra di seguito:

2015-06-09 07:09:28,407 CRIT Supervisor running as root (no user in config file) 
    2015-06-09 07:09:28,407 WARN Included extra file "/etc/conf/supervisor/conf.d/redis_local.conf" during parsing 
    2015-06-09 07:09:28,407 INFO RPC interface 'supervisor' initialized 
    2015-06-09 07:09:28,407 CRIT Server 'unix_http_server' running without any HTTP authentication checking 
    2015-06-09 07:09:28,407 INFO supervisord started with pid 23191 
    2015-06-09 07:09:29,410 INFO spawned: 'redis' with pid 23332 
    2015-06-09 07:09:29,416 INFO exited: redis (exit status 0; not expected) 
    2015-06-09 07:09:30,418 INFO spawned: 'redis' with pid 23334 
    2015-06-09 07:09:30,425 INFO exited: redis (exit status 0; not expected) 
    2015-06-09 07:09:32,429 INFO spawned: 'redis' with pid 23336 
    2015-06-09 07:09:32,434 INFO exited: redis (exit status 0; not expected) 
    2015-06-09 07:09:36,067 INFO spawned: 'redis' with pid 23342 
    2015-06-09 07:09:36,072 INFO exited: redis (exit status 0; not expected) 
    2015-06-09 07:09:37,073 INFO gave up: redis entered FATAL state, too many start retries too quickly 
    2015-06-09 07:11:04,079 CRIT Supervisor running as root (no user in config file) 
    2015-06-09 07:11:04,079 WARN Included extra file "/etc/conf/supervisor/conf.d/redis_local.conf" during parsing 
    2015-06-09 07:11:04,080 INFO RPC interface 'supervisor' initialized 
    2015-06-09 07:11:04,080 CRIT Server 'unix_http_server' running without any HTTP authentication checking 
    2015-06-09 07:11:04,080 INFO supervisord started with pid 23191 
    2015-06-09 07:11:05,083 INFO spawned: 'redis' with pid 23486 
    2015-06-09 07:11:05,089 INFO exited: redis (exit status 0; not expected) 

qualcuno mi può aiutare, grazie.

+1

ho capirlo, è sufficiente impostare demonizzare nessuno e quindi avviare Redis con supervisore. – zimmer

+0

Ciao, Puoi dirmi qual è la tua configurazione di /etc/conf/supervisor/conf.d/redis_local.conf? Non riesco a passare il percorso di /etc/redis/redis.conf al file eseguibile e far avviare correttamente il supervisore su redis. Grazie! – einarc

+0

@einarc, è solo un file di configurazione redis ed è possibile avviare supervisore con sudo e ricominciare i redis con sudo, forse questo può aiutarti. – zimmer

risposta

6

Quando si utilizza Supervisord per gestire programmi server come database che generano o demone spesso, cercare un flag nel comando di avvio o nel file di configurazione. C'è un'eccezione con database come MySQL dove la pratica raccomandata è usare un proxy per avviare mysqld_safe e lasciarlo gestire i sub processi.

In redis.conf per le versioni più recenti (ad esempio, 3.x) l'impostazione predefinita è disabilitare demone ma potrebbe essere stato modificato dal pacchetto. Assicurati anche di non averlo installato con uno script upstart che verrà respawn.

sezione del file di configurazione Redis

# By default Redis does not run as a daemon. Use 'yes' if you need it. 
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. 
daemonize no 

Esempio Supervisor configurazioni

+0

Funziona per me. Grazie – Rajiv