DUBBO的com.alibaba.dubbo.rpc.RpcException解决方法

联接超时问题

Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method subscribe in the service com.alibab

a.dubbo.registry.RegistryService. Tried 3 times of the providers[172.168.1.167:2181] (1/1) from the registry

172.168.1.167:2181 on the consumer 169.254.249.102 using the dubbo version2.4.9. Last error is: Invoke remote

method timeout.

解决方法

如果注册中心使用zookeeper则protocol属性必须设置为zookeeper

<dubbo:registry id="myzookeeper" protocol="zookeeper" address="172.168.1.10:2181"/>
<dubbo:protocol id="mydubbo" anme="dubbo"/>

你可能感兴趣的:(zookeeper,DUBBO)