Redis 错误:Failed with result 'start-limit-hit'
背景
Redis 版本为 5.0.4;
文件 /etc/systemd/system/redis.service
内容如下:
[Unit]
Description=Redis Datastore Server
After=network.target
[Service]
Type=forking
PIDFile=/var/run/redis/redis_6379
User=redis
Group=redis
Environment=statedir=/var/run/redis
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p ${statedir}
ExecStartPre=/bin/chown -R redis:redis ${statedir}
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf --supervised systemd
ExecReload=/bin/kill -USR2 $MAINPID
ExecStop=/usr/local/bin/redis-cli shutdown
Restart=always
[Install]
WantedBy=multi-user.target
运行
在使用 systemctl 启动 Redis 时报错:
sudo systemctl daemon-reload
sudo systemctl start redis
错误日志:
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.
根据提示用命令 systemctl status redis-server.s