使用JedisCluster连接Redis集群时报 --> java.lang.NumberFormatException: For input string: "7004@17004
作者:互联网
java.lang.NumberFormatException: For input string: "7004@17004"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at redis.clients.util.ClusterNodeInformationParser.getHostAndPortFromNodeLine(ClusterNodeInformationParser.java:38)
at redis.clients.util.ClusterNodeInformationParser.parse(ClusterNodeInformationParser.java:14)
at redis.clients.jedis.JedisClusterInfoCache.discoverClusterNodesAndSlots(JedisClusterInfoCache.java:43)
at redis.clients.jedis.JedisClusterConnectionHandler.initializeSlotsCache(JedisClusterConnectionHandler.java:52)
at redis.clients.jedis.JedisClusterConnectionHandler.<init>(JedisClusterConnectionHandler.java:37)
at redis.clients.jedis.JedisSlotBasedConnectionHandler.<init>(JedisSlotBasedConnectionHandler.java:16)
at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:48)
at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:35)
at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:27)
at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:31)
at JedisTest.testJedisCluster(JedisTest.java:54)
pom.xml文件中的版本过低,redis-4.0.0 应该使用jedis版本2.9.0及以上
标签:lang,java,JedisCluster,redis,clients,Redis,jedis 来源: https://www.cnblogs.com/xiaowenwen/p/11946171.html