-> # service redis-server start Job for redis-server.service failed because the control process exited with error code. See "systemctl status redis-server.service" and "journalctl -xe" for details.
May 1014:48:08 VM-73-203-debian systemd[1]: Starting Advanced key-value store... May 1014:48:08 VM-73-203-debian run-parts[29515]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example May 1014:48:08 VM-73-203-debian redis-server[29517]: 29517:C 10 May 14:48:08.460# Fatal error, can't open config file '/etc/redis/redi May 1014:48:08 VM-73-203-debian systemd[1]: redis-server.service: Control process exited, code=exited status=1 May 1014:48:08 VM-73-203-debian systemd[1]: Failed to start Advanced key-value store. May 1014:48:08 VM-73-203-debian systemd[1]: redis-server.service: Unit entered failed state. May 1014:48:08 VM-73-203-debian systemd[1]: redis-server.service: Failed with result 'exit-code'.
-> # journalctl -xe May 1014:48:08 VM-73-203-debian systemd[1]: Starting Advanced key-value store... -- Subject: Unit redis-server.service has begun start-up -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit redis-server.service has begun starting up. May 1014:48:08 VM-73-203-debian run-parts[29515]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example May 1014:48:08 VM-73-203-debian redis-server[29517]: 29517:C 10 May 14:48:08.460# Fatal error, can't open config file '/etc/redis/redi May 1014:48:08 VM-73-203-debian systemd[1]: redis-server.service: Control process exited, code=exited status=1 May 1014:48:08 VM-73-203-debian systemd[1]: Failed to start Advanced key-value store. -- Subject: Unit redis-server.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit redis-server.service has failed. -- -- The result is failed. May 1014:48:08 VM-73-203-debian systemd[1]: redis-server.service: Unit entered failed state. May 1014:48:08 VM-73-203-debian systemd[1]: redis-server.service: Failed with result 'exit-code'.
里面有关键的一句: redis-server[29517]: 29517:C 10 May 14:48:08.460 # Fatal error, can't open config file '/etc/redis/redi 这句话让我想起了我修改了redis.conf,现在redis.conf是root用户,而redis用户是没有权限读取的。
解决方法:
1 2
chmod 644/etc/redis/redis.conf service redis-server start