gpt4 book ai didi

redis - 更改目录后无法启动redis服务器

转载 作者:可可西里 更新时间:2023-11-01 11:24:32 27 4
gpt4 key购买 nike

我用

安装了redis
sudo apt-get -y install redis-server 

默认数据目录是/var/lib/redis/,但是当我换到另一个目录/some path/redisDB 文件:sudo gedit/etc/redis/redis.conf 时,我无法再次启动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.service
redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled;
vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Do 2018-06-14 17:29:03 CEST; 8s ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 18601 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.post-down.d (code=exited, status=0/SUCCESS)
Process: 18597 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 18594 ExecStop=/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d (code=exited, status=0/SUCCESS)
Process: 18730 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
Process: 18727 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)
Main PID: 18000 (code=exited, status=0/SUCCESS)

Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: Failed to start Advanced key-value store.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Unit entered failed state.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: Stopped Advanced key-value store.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: redis-server.service: Start request repeated too quickly.
Jun 14 17:29:03 gaurav-GB-BSi3-6100 systemd[1]: Failed to start Advanced key-value store.

最佳答案

你引用的路径不存在或者启动redis的用户没有写入权限。

关于redis - 更改目录后无法启动redis服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50861215/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com