apache / dubbo-spring-boot-project

Spring Boot Project for Apache Dubbo
https://dubbo.apache.org
Apache License 2.0
5.41k stars 1.88k forks source link

dubbo.registry.address 不起作用 初始化的总是本地的zookeeper #48

Closed fengzijk closed 6 years ago

mercyblitz commented 6 years ago

Please attach code

mercyblitz commented 6 years ago

Thanks, I will check this issue

fengzijk commented 6 years ago

后面继续测试了下 大概原因是我使用了spring-boot-devtools 热部署 devtools提供了两个ClassLoader,加载策略问题导致出现这个问题 可以注册成功 但是如果消费者Reference的url 换成目标IP 不成功 换成127.0.0.1就可以。

mercyblitz commented 6 years ago

Please do not use spring-boot-devtools , it will cause strange issues

fengzijk commented 6 years ago

ok

Jukewu commented 6 years ago

I get the same problem,I config the registry address of 192.168.86.119:2181 ,but it just Export dubbo service XXXXService to local registry, dubbo version: 2.6.1, current host: 192.168.86.222.I still can't find method solving it.

zonghaishang commented 6 years ago

@Jukewu see: com.alibaba.dubbo.config.ServiceConfig#exportLocal Default exposes an injvm protocol service, I don't think it will affect your service invocation, please check that .

Jukewu commented 6 years ago

@zonghaishang thank you,I tracked the log and found that it dosen't affect my service invocation in fact.but my provider project can still not register service to the zookeeper.I debug the project with my old one which use another spring-boot-starter-dubbo but get no result,I am feeling down。 bingo! it works well now,but I still don't know where is wrong and what I did affact -_-!