CodisLabs / jodis

A java client for codis based on Jedis and Curator
MIT License
218 stars 97 forks source link

生产环境中出现NullPointerException #16

Closed panqiushi closed 8 years ago

panqiushi commented 8 years ago

在线上生产环境中出现以下Exception: ERROR o.a.c.framework.recipes.cache.PathChildrenCache - java.lang.NullPointerException: null at io.codis.jodis.RoundRobinJedisPool$1.logEvent(RoundRobinJedisPool.java:135) ~[io.codis.jodis.jodis-0.3.0.jar:na] at io.codis.jodis.RoundRobinJedisPool$1.childEvent(RoundRobinJedisPool.java:144) ~[io.codis.jodis.jodis-0.3.0.jar:na] at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:518) [org.apache.curator.curator-recipes-2.9.1.jar:na] at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:512) [org.apache.curator.curator-recipes-2.9.1.jar:na] at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92) [org.apache.curator.curator-framework-2.9.1.jar:na] at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) [com.google.guava.guava-18.0.jar:na] at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83) [org.apache.curator.curator-framework-2.9.1.jar:na] at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:509) [org.apache.curator.curator-recipes-2.9.1.jar:na] at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) [org.apache.curator.curator-recipes-2.9.1.jar:na] at org.apache.curator.framework.recipes.cache.PathChildrenCache$9.run(PathChildrenCache.java:766) [org.apache.curator.curator-recipes-2.9.1.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_51] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_51] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]

是因为获取不到zookeeper信息造成的?

Apache9 commented 8 years ago

应该是个bug,有些event没有data,我改一下。不过应该不影响正确性,对proxy列表有影响的时间应该都是有data的。