2015-06-09 57 views
5

當用supervisor開始重新啓動時,redis進程正在運行,但在主管中顯示退避。用主管開始redis

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

,它下面顯示:

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) 

有人能幫助我,謝謝。

+1

我看着辦吧,只需設置守護進程沒有,然後開始與主管Redis的。 – zimmer

+0

嗨, 你能告訴我你的/etc/conf/supervisor/conf.d/redis_local.conf配置是什麼?我似乎無法將路徑傳遞到/etc/redis/redis.conf到可執行文件,並讓supervisor成功啓動redis。謝謝! – einarc

+0

@einarc,它只是redis配置文件,你可以用sudo啓動監督員,並用sudo啓動redis,也許這可以幫助你。 – zimmer

回答

6

當使用Supervisord來管理服務器程序(如經常產卵或守護進程的數據庫)時,請在啓動命令或配置文件中查找標誌。 MySQL等數據庫存在一個例外,推薦的做法是使用代理來啓動mysqld_safe並讓其管理子進程。

對於較新版本(即3.x)的0​​,缺省值是禁用守護進程,但它可能已被您的包編輯。還要確保你沒有安裝一個能重生的新貴腳本。

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 

例監事CONFIGS

+0

它適合我。謝謝 – Rajiv