bootstrap.yml:
` spring: application: name: wlzs profiles: active: '@Profile@' cloud: zookeeper: enabled: true connect-string: '@zk.connect-string@' config: enabled: true watcher: enabled: false discovery: enabled: true instanceHost: '@zk.connect-string@' dubbo: protocols: dubbo: name: dubbo port: -1 registries: cloud: address: spring-cloud://localhost application: qos: port: 16665 accept: foreign: ip: false
feign: hystrix: enabled: true `
独立provider应用启动,警告异常: 2019-09-05 19:36:31 [WARN] org.apache.dubbo.config.AbstractInterfaceConfig.checkMetadataReport(AbstractInterfaceConfig.java:265) [main 54897] [-/ ]: [DUBBO] There's no valid metadata config found, if you are using the simplified mode of registry url, please make sure you have a metadata address configured properly., dubbo version: 2.7.3, current host: 192.168.1.43 2019-09-05 19:39:21 [WARN] org.apache.dubbo.config.ServiceConfig.findConfigedHosts(ServiceConfig.java:702) [main 224427] [-/ ]: [DUBBO] Connection refused (Connection refused), dubbo version: 2.7.3, current host: 192.168.1.43 java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_161] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_161] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_161] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_161] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_161] at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_161] at org.apache.dubbo.config.ServiceConfig.findConfigedHosts(ServiceConfig.java:698) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:560) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:457) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:415) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:378) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60) ~[dubbo-2.7.3.jar:2.7.3] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) ~[spring-boot-2.1.3.RELEASE]
以下dubbo配置
dubbo: registry: address: spring-cloud://localhost protocol: name: dubbo port: -1
应用启动也一样有警告异常
原提问者GitHub用户hyw520110
参考https://github.com/alibaba/spring-cloud-alibaba/tree/master/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples
原回答者GitHub用户echooymxq
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。