在搭配完dubbo环境后,进行了一个小demo进行测试环境,一直报这样一个错误:
Error creating bean with name 'brandController' defined in file
[*/*/*/*/*/*Controller.class]:
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanInitializationException:
Failed to init remote service reference at filed bs in class
com.youlexuan.manager.controller.BrandController; nested
exception is java.lang.IllegalStateException: Failed to check
the status of the service
com.youlexuan.sellergoods.service.BrandService. No provider
available for the service
com.youlexuan.sellergoods.service.BrandService from the url
zookeeper://192.168.25.128:2181/com.alibaba.
-
于是在网上查找各种原因,发现代码上和配置上并没有任何问题;一直找不到问题的所在原因。仅过几天的查找原因没有任何结果,几乎要到崩溃的地步……。最终,在一次早上打开电脑准备在运行一遍试试,结果却意外的好用了。
-
然后我就怀疑很有可能是计算机本地程序影响的,然后我就一个个检查是哪个程序造成的这个问题,最后发现我的电脑里的WiFi热点只要是开着的就会一直出现这个错误,关闭之后就能正常运行;**这个原因很有可能是ip地址或者端口号发生了冲突造成的这个错误,所以在运行环境时后台的程序尽量关闭掉,**再重新测试环境是否好使。