已解决Exception in thread “Thread-0“ redis.clients.jedis.exceptions.JedisConnectionException: java.n(代码

Posted 来老铁干了这碗代码

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了已解决Exception in thread “Thread-0“ redis.clients.jedis.exceptions.JedisConnectionException: java.n(代码相关的知识,希望对你有一定的参考价值。

问题:

Exception in thread “Thread-0” redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out

可能的原因:
1、没启动redis。
2、没关闭防火墙,导致端口无法连接
3、代码中的ip地址写错了

关闭防火墙的方法:
service iptables stop
仅当前这次关闭防火墙,下次无效。

以上是关于已解决Exception in thread “Thread-0“ redis.clients.jedis.exceptions.JedisConnectionException: java.n(代码的主要内容,如果未能解决你的问题,请参考以下文章

Exception in thread "main" java.util.MissingResourceException: Can't find bundle for b

错误记录Java AWT 图形界面编程报错 ( Exception in thread “main“ java.awt.AWTError: BoxLayout can‘t be shared )

Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/t

ERROR: Field 'PostId' doesn't have a default value Exception in thread "main"

Exception in thread "Thread-1" java.util.ConcurrentModificationException 异常原因和解决方法

Eclipse 运行弹出A Java Exception has occurred.并报错Exception in thread 的解决方案