Redis无法启动或无法连接上

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.
或者客户端去链接时的错误信息:
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Could not connect to Redis at 127.0.0.1:6379 Connection refused
ps -ef|grep redis 查看redis服务器进程
sudo kill -9 pid 杀死redis服务器
sudo redis-server /etc/redis/redis.conf 指定加载的配置文件把redis的所有显示的都杀掉
包括python 104924 103363 0 00:08 pts/23 00:00:00 grep --color=auto redis
但是这个是会自动重启的,这就对了。
然后再次 sudo redis-server /etc/redis/redis.conf 启动 连接redisredis-cli就完成了。

发布了1 篇原创文章 · 获赞 2 · 访问量 24

猜你喜欢

转载自blog.csdn.net/weixin_45644922/article/details/105509507