java.lang.NumberFormatException: For input string: "7003@17003"
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)
....后面就不写了
解决方案:(仅供参考,大家不喜勿喷)
		/**
		 * 报错如下:
		 * 		java.lang.NumberFormatException: For input string: "7006@17006"
		 * 集群环境Redis使用的是4.0.1的版本
		 * 		报错之前使用的jedis版本为2.7.x
		 * 		之后版本替换为2.9.0完美解决问题
		 * 	<dependency>
		 *	    <groupId>redis.clients</groupId>
		 *    	<artifactId>jedis</artifactId>
		 *	    <version>2.9.0</version>
		 *	    <type>jar</type>
		 *	    <scope>compile</scope>
		 *	</dependency>
		 * 
		 */

相关文章:

  • 2021-12-05
  • 2021-09-13
  • 2021-11-06
  • 2021-10-16
  • 2021-05-27
  • 2021-07-20
  • 2022-12-23
  • 2022-01-15
猜你喜欢
  • 2022-02-22
  • 2021-05-29
  • 2021-12-06
  • 2022-01-06
  • 2021-06-13
  • 2021-10-24
  • 2021-10-09
相关资源
相似解决方案