客户端开启多个线程获取多个pool时出现异常,JedisResourcePool jedisPool = RoundRobinJedisPool.create().curatorClient("localhost:2181", 30000)
.zkProxyDir("/zk/codis/db_kok/proxy").build();
异常信息:org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss
at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:198) [curator-client-2.5.0.jar:na]
at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:88) [curator-client-2.5.0.jar:na]
at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115) [curator-client-2.5.0.jar:na]
at org.apache.curator.utils.EnsurePath$InitialHelper$1.call(EnsurePath.java:148) [curator-client-2.5.0.jar:na]
at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107) [curator-client-2.5.0.jar:na]
at org.apache.curator.utils.EnsurePath$InitialHelper.ensure(EnsurePath.java:140) [curator-client-2.5.0.jar:na]
at org.apache.curator.utils.EnsurePath.ensure(EnsurePath.java:99) [curator-client-2.5.0.jar:na]
at org.apache.curator.framework.recipes.cache.PathChildrenCache.rebuild(PathChildrenCache.java:320) [curator-recipes-2.5.0.jar:na]
at org.apache.curator.framework.recipes.cache.PathChildrenCache.start(PathChildrenCache.java:297) [curator-recipes-2.5.0.jar:na]
at com.wandoulabs.jodis.RoundRobinJedisPool.(RoundRobinJedisPool.java:239) [jodis-0.2.2.jar:na]
at com.wandoulabs.jodis.RoundRobinJedisPool.(RoundRobinJedisPool.java:64) [jodis-0.2.2.jar:na]
at com.wandoulabs.jodis.RoundRobinJedisPool$Builder.build(RoundRobinJedisPool.java:479) [jodis-0.2.2.jar:na]
求解决办法
客户端开启多个线程获取多个pool时出现异常,JedisResourcePool jedisPool = RoundRobinJedisPool.create().curatorClient("localhost:2181", 30000) .zkProxyDir("/zk/codis/db_kok/proxy").build(); 异常信息:org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:198) [curator-client-2.5.0.jar:na] at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:88) [curator-client-2.5.0.jar:na] at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115) [curator-client-2.5.0.jar:na] at org.apache.curator.utils.EnsurePath$InitialHelper$1.call(EnsurePath.java:148) [curator-client-2.5.0.jar:na] at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107) [curator-client-2.5.0.jar:na] at org.apache.curator.utils.EnsurePath$InitialHelper.ensure(EnsurePath.java:140) [curator-client-2.5.0.jar:na] at org.apache.curator.utils.EnsurePath.ensure(EnsurePath.java:99) [curator-client-2.5.0.jar:na] at org.apache.curator.framework.recipes.cache.PathChildrenCache.rebuild(PathChildrenCache.java:320) [curator-recipes-2.5.0.jar:na] at org.apache.curator.framework.recipes.cache.PathChildrenCache.start(PathChildrenCache.java:297) [curator-recipes-2.5.0.jar:na] at com.wandoulabs.jodis.RoundRobinJedisPool.(RoundRobinJedisPool.java:239) [jodis-0.2.2.jar:na]
at com.wandoulabs.jodis.RoundRobinJedisPool.(RoundRobinJedisPool.java:64) [jodis-0.2.2.jar:na]
at com.wandoulabs.jodis.RoundRobinJedisPool$Builder.build(RoundRobinJedisPool.java:479) [jodis-0.2.2.jar:na]
求解决办法