使用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及以上

上一篇:115私人订制资源


下一篇:openresty应用场景以及研发网关系统功能说明