weibocom / motan

A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.
Other
5.89k stars 1.78k forks source link

1.1.0版本订阅服务返回值finalResult为空输出日志报空异常 #608

Open zfvipgit opened 6 years ago

zfvipgit commented 6 years ago

版本:1.1.0 集群:consul

异常日志: 2017-12-12 11:16:02.442 INFO 19616 --- [pool-1-thread-1] info : [ConsulRegistry] Retry subscribe {motan://192.168.1.126:0/com.xtr.tx.service.SysExampleService?group=default_rpc=[com.weibo.api.motan.cluster.support.ClusterSupport@5878904e], motan://192.168.1.126:0/com.xtr.tx.service.SysDemoService?group=default_rpc=[com.weibo.api.motan.cluster.support.ClusterSupport@5706842a]} 2017-12-12 11:16:02.442 INFO 19616 --- [pool-1-thread-1] info : [ConsulRegistry] Listener (com.weibo.api.motan.cluster.support.ClusterSupport@5878904e) will subscribe to url (motan://192.168.1.126:0/com.xtr.tx.service.SysExampleService?group=default_rpc) in Registry [consul://127.0.0.1:8500/default_rpc/com.weibo.api.motan.registry.RegistryService/1.0/service] 2017-12-12 11:16:02.443 INFO 19616 --- [pool-1-thread-1] info : CommandFailbackRegistry subscribe. url: motan://192.168.1.126:0/com.xtr.tx.service.SysExampleService?group=default_rpc 2017-12-12 11:16:02.443 INFO 19616 --- [pool-1-thread-1] info : CommandFailbackRegistry discover. url: motan://192.168.1.126:0/com.xtr.tx.service.SysExampleService?group=default_rpc 2017-12-12 11:16:02.447 INFO 19616 --- [pool-1-thread-1] info : no command in group: default_rpc 2017-12-12 11:16:02.447 INFO 19616 --- [pool-1-thread-1] info : command data not change: group=default_rpc, command=: 2017-12-12 11:16:02.448 INFO 19616 --- [pool-1-thread-1] info : CommandFailbackRegistry discover command. commandStr: , rpccommand is null. 2017-12-12 11:16:02.449 WARN 19616 --- [pool-1-thread-1] warn : [ConsulRegistry] Failed to retry subscribe, retry later, failedSubscribed.size=2, cause=null

java.lang.NullPointerException: null at com.weibo.api.motan.registry.support.command.CommandFailbackRegistry.doDiscover(CommandFailbackRegistry.java:96) ~[motan-core-1.1.0.jar:na] at com.weibo.api.motan.registry.support.command.CommandFailbackRegistry.doSubscribe(CommandFailbackRegistry.java:50) ~[motan-core-1.1.0.jar:na] at com.weibo.api.motan.registry.support.AbstractRegistry.subscribe(AbstractRegistry.java:106) ~[motan-core-1.1.0.jar:na] at com.weibo.api.motan.registry.support.FailbackRegistry.retry(FailbackRegistry.java:231) [motan-core-1.1.0.jar:na] at com.weibo.api.motan.registry.support.FailbackRegistry.access$100(FailbackRegistry.java:47) [motan-core-1.1.0.jar:na] at com.weibo.api.motan.registry.support.FailbackRegistry$2.run(FailbackRegistry.java:75) [motan-core-1.1.0.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_79] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_79] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_79] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]

rayzhang0603 commented 6 years ago

这个异常的原因是没有从consul注册中心获取到server节点,请确认一下server端是否正常注册成功,并打开了心跳开关。 这个NPE的报错信息会在下个版本中进行修改,感谢反馈。