zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

redis端口不通解决方法

Redis方法 解决 端口 不通
2023-06-13 09:12:48 时间

reids服务器的6379端口telnet不通

[root@summer01 dist]# telnet 192.168.0.1 6379
Trying 192.168.0.1...
telnet: connect to address 192.168.0.1: Connection refused

查看reids进程和端口,都是存在的。Butip地址是127.0.0.1 So只是本机能使用

[root@summer02]# netstat -ntulp |grep 6379
tcp        0      0 127.0.0.1:6379            0.0.0.0:*               LISTEN      12209/./redis-serve 

# 解决办法

编辑配置文件vim */redis.conf

bind 0.0.0.0 最后重启redis服务即可

[root@summer02]# netstat -ntulp |grep 6379
tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN      1892/./redis-serve