1.在注册中心找不到对应的服务
java.lang.IllegalStateException: Failed to check the status of the service com.offcn.sellergoods.service.BrandService.
No provider available for the service com.offcn.sellergoods.service.BrandService from the url
zookeeper://192.168.25.129:2181/com.alibaba.dubbo.registry.RegistryService?application=youle xuan-manager-
web&dubbo=2.8.4&interface=com.offcn.sellergoods.service.BrandService&metho
ds=update,get,delete,selectOptionList,add,getListByPage&pid=3980&revision=0.0.1-SNAPSHOT&
side=consumer×tamp=1501146823396 to the consumer 172.16.17.14 use dubbo version 2.8.4
这种错误是服务层代码没有成功注册到注册中心导致,请检查一下你的服务层代码是否添加 了@service 注解,并且该注解的包一定是 com.alibaba.dubbo.config.annotation 包,不是org.springframework.stereotype.Service,这个地方极容易出错。另外还有一个原因就是你的 服务层工程由于某些原因没有正常启动,也无法注册到注册中心里。
2.无法连接到注册中心
[org.apache.zookeeper.ClientCnxn] - Opening socket connection to server 192.168.188.137/192.168.188.137:2181. Will not attempt to authenticate using SASL (unknown error)
[org.apache.zookeeper.ClientCnxn] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.ja va:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
[org.apache.zookeeper.ClientCnxnSocketNIO] - Ignoring exception during shutdown input
请检查 IP 与端口是否填写正确,检查注册中心是否正常启动