通过Jedis连接linux中的redis出现的问题
2017-11-14 17:35
441 查看
1.连接超时
原因:连接redis的端口为6379,linux防火墙没有打开6379这个端口
解决:
a. 通过
vim /etc/sysconfig/iptables 打开防火墙配置文件,添加如下代码:
b.修改完成通过
service iptables restart 重新启动防火墙
2.不允许连接
原因:redis默认只能localhost登录(在redis.conf查看) 或者redis服务器未启动
解决:要使其他ip地址允许登录,需要在redis.conf添加
bind ip地址
例子:
完成配置后,外部可以通过192.168.91.128访问redis
原因:连接redis的端口为6379,linux防火墙没有打开6379这个端口
解决:
a. 通过
vim /etc/sysconfig/iptables 打开防火墙配置文件,添加如下代码:
b.修改完成通过
service iptables restart 重新启动防火墙
2.不允许连接
原因:redis默认只能localhost登录(在redis.conf查看) 或者redis服务器未启动
解决:要使其他ip地址允许登录,需要在redis.conf添加
bind ip地址
例子:
完成配置后,外部可以通过192.168.91.128访问redis
相关文章推荐
- 关于Jedis连接Linux上的redis出现 DENIED Redis is running in protected mode问题的解决方案
- 关于Jedis连接Linux上的redis出现 DENIED Redis is running in protected mode问题的解决方案
- 关于Jedis连接Linux上的redis出现 DENIED Redis is running in protected mode问题的解决方案
- Linux中4.0.1版本的redis和java连接出现的redis被保护的问题以及解决办法
- 在linux上通过JDBC连接ORACLE 时总是出现 java.sql.SQLRecoverableException: IO Error: Connection reset 的问题
- linux环境通过ssh连接控制台显示中文乱码问题
- 解决通过VNC连Linux时只出现终端,没显示桌面的问题
- 解决SecureCRT连接linux出现乱码问题
- Qt工程在Linux下编译时出现.ui文件编译不通过的问题
- Linux下通过yum来安装 mysql 5.1,以及以前的旧版本(因服务器网络问题,安装后无法连接,无法验证正确性)
- Java 连接hive2 server 通过jdbc 出现了问题 Required field 'client_protocol' is unset! Struct:TOpenSessionReq
- 通过VM Workstation内的Linux系统和开发板的串口连接出现的问题
- win下通过vnc连接linux服务器出现黑屏的问题
- 解决ssh工具远程连接linux出现中文乱码问题
- window的客户端连接linux中的cvs服务器出现问题
- mysql连接linux系统提示“登录出现1130 is not allowed to connect to this MySql server”问题,解决方法
- Winscp和SecureCRT远程连接Linux出现connect error的问题
- 关于Putty连接Linux出现Network error:Connection reset by peer LINUX问题解决
- mysql连接linux系统提示“登录出现1130 is not allowed to connect to this MySql server”问题,解决方法
- windows客户端jprofiler连接远程Linux Tomcat出现的破解身份验证问题