Client On Error: Error: connect ETIMEDOUT 192.168.xxx.xxx:6379 Config right?Warning: ALREADY_ENABLED

问题描述:

今天在Redis图形化工具尝试连接CentOS里的Redis,点击测试连接的时候报了下述这个错误

Client On Error: Error: connect ETIMEDOUT 192.168.xxx.xxx:6379 Config right?

连接redis服务器提示:Redis Client On Error: Error: connect ECONNREFUSED 127.0.0.1:6379 Config right?_redis client on error:error connect eacces-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/weixin_44629395/article/details/125405718

Warning: ALREADY_ENABLED: 6379:tcp

我的redis.conf配置:

bind 0.0.0.0

设置了 requirepass  密码

daemonize yes

问题解决 

 redis拒绝连接:Could not connect to Redis at 192.168.xx.xx:6379:Connection refused_could not connect to redis at 192.168.102.31:6379:-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/zyf_smile/article/details/120868606

conf里还是按照上述没有改动,也没有把  protected-mode 改为 no

 1、检查redis是否启动

ps -ef | grep redis 

1.1 停止当前reids 

systemctl stop redis

2、查看防火墙

firewall-cmd --list-all

2.1 将6379添加到防火墙

firewall-cmd --add-port=6379/tcp --permanent

2.2 刷新防火墙

firewall-cmd --reload

命令控制台应该会显示 success

2.3 检查是否添加成功

firewall-cmd --query-port=6379/tcp

添加成功应该显示 yes

再次输入  firewall-cmd --list-all  能看到 ports: 6379/tcp

 3、最后

启动redis

此前编写过  配置文件启动redis 

根据配置文件启动Redis: redis-server redis.conf

systemctl start redis

 参考下列文章的后台启动

Linux下安装redis并配置开机自启保姆级教程-----附带每一步截图_redis开机自启动linux-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/m0_73537205/article/details/138852023Linux 环境下指定配置启动 Redis 并设置开机自启_linux图形界面配置redis开机自启动-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/m0_60721514/article/details/123777643

没有配置启动文件的效果图 

 

配置启动文件效果图 

 

再次用图形化工具连接就能成功了

4、总结

这个问题是因为防火墙没有添加端口6379,导致Redis图形化工具无法连接Redis

若有不足之处欢迎指点

  • 20
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Nobody.sir

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值