2017-09-25 2 views
0

実際、私は会社の新しいプロダクションサーバのためにdebian 9に切り替えるつもりです。これまでのところ、すべて正常に動作しますが、今はredis-serverに悩まされています。Debian Stretch(9)のRedisスタートアップに関する問題

デフォルトでは、Debian 9にはバージョン3.2のredisが付属しています。私はapt-get install redis-server経由でパッケージをインストールしています。その後、バックグラウンドでデーモンとして起動します。ここでは、2つの異なるIP(127.0.0.1とサーバーIP)にバインドするなどのカスタム構成を適用したいと考えています。

daemonizeオプション(yes)と同様にこれを変更すると、赤色はバックグラウンドで開始されなくなります。 service redis-server startまたは/etc/init.d/redis-server startのいずれかを実行するたびに、コマンドは単に停止します。

journalctl -xe

はinit.dスクリプトに応じてそれを作成する必要があるにもかかわらず、pidファイルが読めないこと、( redis-server.service: PID file /var/run/redis/redis-server.pid not readable (yet?) after start-post: No such file or directoryを)私に語った:

start) 
    echo -n "Starting $DESC: " 
    mkdir -p $RUNDIR 
    touch $PIDFILE 
    chown redis:redis $RUNDIR $PIDFILE 
    chmod 755 $RUNDIR 

すべての後、私は見ることができ、両方service redis-server start/etc/init.d/redis-serverことサーバーを起動しており、redis-cli経由でサーバーに接続することもできます。しかし、悪いプロセスが続きました。

誰でも手助けできますか?詳しい情報が必要な場合は、私に知らせてください。これで問題が解決すれば、これまでに可能なことは何でも提供します!

最高 クリス

+0

これはおそらく、[スーパーユーザー](http://superuser.com/)または[UNIX&Linuxのスタック交換](http://unix.stackexchange.com/)のためのより良い質問です。それは設定上の問題ではなくプログラミング上の問題ではないかと思います。 – jww

答えて

0

私はCentOSに7サーバー上で似たような状況がありました。

解像度は、私があれば(あなたがデーモンとしてプロセスを実行すると、それは、プロセス管理のためにsystemdと対話する必要がsupervisedから無に自動

# 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 yes 
 

 
# If you run Redis from upstart or systemd, Redis can interact with your 
 
# supervision tree. Options: 
 
# supervised no  - no supervision interaction 
 
# supervised upstart - signal upstart by putting Redis into SIGSTOP mode 
 
# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET 
 
# supervised auto - detect upstart or systemd method based on 
 
#      UPSTART_JOB or NOTIFY_SOCKET environment variables 
 
# Note: these supervision methods only signal "process is ready." 
 
#  They do not enable continuous liveness pings back to your supervisor. 
 
supervised auto

を変更しましたいくつかのドキュメントをよく読んでください)。

おかげ

関連する問題