When start redis with supervisor, the redis process is running, but in supervisor it shows backoff.
vagrant@jinming:~$ sudo supervisorctl -c /etc/conf/supervisor/supervisord.conf
redis BACKOFF Exited too quickly (process log may have details)
in supervisor log, it shows below:
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)
anyone can help me, thanks.
When using Supervisord to manage server programs like databases that often spawn or daemonize, look for a flag in the startup command or in the config file. There is an exception with databases like MySQL where recommended practice is to use a proxy to start mysqld_safe and let it manage the sub processes.
In
redis.conf
for newer versions (i.e. 3.x) the default is to disable daemon but it may have been edited by your package. Also be sure you didn't install with an upstart script that will respawn.Redis config file section
Example Supervisor configs