redis启动失败
老师,redis启动失败,请帮忙看看
[root@pc-two system]# systemctl start redis Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details. [root@pc-two system]# systemctl status redis ● redis.service - Redis Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since 五 2023-01-13 12:19:56 CST; 23s ago Process: 8735 ExecStart=/usr/local/redis-4.0.14/src/redis-server /usr/local/redis-4.0.14/redis.conf (code=exited, status=203/EXEC) Main PID: 8004 (code=exited, status=203/EXEC) 1月 13 12:19:56 pc-two systemd[1]: Starting Redis... 1月 13 12:19:56 pc-two systemd[8735]: Failed at step EXEC spawning /usr/local/redis-4.0.14/src/redis-server: N...ectory 1月 13 12:19:56 pc-two systemd[1]: redis.service: control process exited, code=exited status=203 1月 13 12:19:56 pc-two systemd[1]: Failed to start Redis. 1月 13 12:19:56 pc-two systemd[1]: Unit redis.service entered failed state. 1月 13 12:19:56 pc-two systemd[1]: redis.service failed. Hint: Some lines were ellipsized, use -l to show in full.
[root@pc-two system]# vim redis.service [Unit] Description=Redis After=syslog.target network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/run/redis_6379.pid ExecStart=/usr/local/redis-4.0.14/src/redis-server /usr/local/redis-4.0.14/redis.conf ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target
27
收起
正在回答
1回答
同学你好,尝试注释Type=forking ,如下所示:
[Service] #Type=forking PIDFile=/run/redis_6379.pid ExecStart=/usr/lcoal/redis-6.2.1/src/redis-server /usr/local/redis-6.2.1/redis.conf ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true
之后重新加载 Service 文件并启动 Redis 服务
sudo systemctl daemon-reload sudo systemctl start redis
祝学习愉快~
相似问题
登录后可查看更多问答,登录/注册
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星