{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/spring-cloud-alibaba/issues/1151","repository_url":"https://api.github.com/repos/alibaba/spring-cloud-alibaba","labels_url":"https://api.github.com/repos/alibaba/spring-cloud-alibaba/issues/1151/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/spring-cloud-alibaba/issues/1151/comments","events_url":"https://api.github.com/repos/alibaba/spring-cloud-alibaba/issues/1151/events","html_url":"https://github.com/alibaba/spring-cloud-alibaba/issues/1151","id":544098262,"node_id":"MDU6SXNzdWU1NDQwOTgyNjI=","number":1151,"title":"dubbo + spring cloud 启动warning","user":{"login":"runzexia","id":31230341,"node_id":"MDQ6VXNlcjMxMjMwMzQx","avatar_url":"https://avatars3.githubusercontent.com/u/31230341?v=4","gravatar_id":"","url":"https://api.github.com/users/runzexia","html_url":"https://github.com/runzexia","followers_url":"https://api.github.com/users/runzexia/followers","following_url":"https://api.github.com/users/runzexia/following{/other_user}","gists_url":"https://api.github.com/users/runzexia/gists{/gist_id}","starred_url":"https://api.github.com/users/runzexia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runzexia/subscriptions","organizations_url":"https://api.github.com/users/runzexia/orgs","repos_url":"https://api.github.com/users/runzexia/repos","events_url":"https://api.github.com/users/runzexia/events{/privacy}","received_events_url":"https://api.github.com/users/runzexia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-12-31T06:02:37Z","updated_at":"2019-12-31T09:02:26Z","closed_at":null,"author_association":"NONE","body":"```\r\n2019-12-31 13:58:22  WARN [employee-service,,,]  [DUBBO] Connection refused (Connection refused), dubbo version: 2.7.3, current host: 192.168.196.214\r\njava.net.ConnectException: Connection refused (Connection refused)\r\n\tat java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_181]\r\n\tat java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_181]\r\n\tat java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_181]\r\n\tat java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_181]\r\n\tat java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_181]\r\n\tat java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_181]\r\n\tat org.apache.dubbo.config.ServiceConfig.findConfigedHosts(ServiceConfig.java:698) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:560) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:457) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:415) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:378) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60) [dubbo-2.7.3.jar:2.7.3]\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.1.12.RELEASE.jar:5.1.12.RELEASE]\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.1.12.RELEASE.jar:5.1.12.RELEASE]\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.1.12.RELEASE.jar:5.1.12.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) [spring-context-5.1.12.RELEASE.jar:5.1.12.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) [spring-context-5.1.12.RELEASE.jar:5.1.12.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) [spring-context-5.1.12.RELEASE.jar:5.1.12.RELEASE]\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) [spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) [spring-context-5.1.12.RELEASE.jar:5.1.12.RELEASE]\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.11.RELEASE.jar:2.1.11.RELEASE]\r\n\tat io.kubesphere.services.employee.EmployeeApplication.main(EmployeeApplication.java:25) [classes/:na]\r\n```\r\n\r\n```\r\nspring:\r\n  application:\r\n    name: employee-service\r\n  cloud:\r\n    nacos:\r\n      config:\r\n        server-addr: localhost:8848\r\n        file-extension: yaml\r\ndubbo:\r\n  scan:\r\n    base-packages: io.kubesphere.services.employee\r\n  protocols:\r\n    dubbo:\r\n      name: dubbo\r\n    rest:\r\n      name: rest\r\n      port: ${PORT:8090}\r\n      server: tomcat\r\n  registry:\r\n    #   The Spring Cloud Dubbo's registry extension\r\n    address: nacos://localhost:8848\r\n    address: springcloud://localhost   #上下两种配置都会有warning，但是服务都可以调用成功，不知道是不是哪里配置的有问题\r\n```\r\n```\r\n\t<dependencies>\r\n\t\t<dependency>\r\n\t\t\t<groupId>com.alibaba.cloud</groupId>\r\n\t\t\t<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>com.alibaba.cloud</groupId>\r\n\t\t\t<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>org.springframework.boot</groupId>\r\n\t\t\t<artifactId>spring-boot-starter-web</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>org.springframework.boot</groupId>\r\n\t\t\t<artifactId>spring-boot-starter-actuator</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>io.springfox</groupId>\r\n\t\t\t<artifactId>springfox-swagger2</artifactId>\r\n\t\t\t<version>2.9.2</version>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>org.springframework.cloud</groupId>\r\n\t\t\t<artifactId>spring-cloud-starter-sleuth</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>io.kubesphere.services</groupId>\r\n\t\t\t<artifactId>api</artifactId>\r\n\t\t\t<version>${project.version}</version>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>com.alibaba.cloud</groupId>\r\n\t\t\t<artifactId>spring-cloud-starter-dubbo</artifactId>\r\n\t\t</dependency>\r\n\t</dependencies>\r\n```\r\nnacos config:\r\n```\r\nserver:\r\n  port: ${PORT:8090}\r\nlogging:\r\n  pattern:\r\n    console: \"%d{yyyy-MM-dd HH:mm:ss} ${LOG_LEVEL_PATTERN:-%5p} %m%n\"\r\nspring:\r\n  cloud:\r\n    nacos:\r\n      discovery:\r\n        server-addr: localhost:8848\r\n```"},"comment":{"url":"https://api.github.com/repos/alibaba/spring-cloud-alibaba/issues/comments/569892436","html_url":"https://github.com/alibaba/spring-cloud-alibaba/issues/1151#issuecomment-569892436","issue_url":"https://api.github.com/repos/alibaba/spring-cloud-alibaba/issues/1151","id":569892436,"node_id":"MDEyOklzc3VlQ29tbWVudDU2OTg5MjQzNg==","user":{"login":"runzexia","id":31230341,"node_id":"MDQ6VXNlcjMxMjMwMzQx","avatar_url":"https://avatars3.githubusercontent.com/u/31230341?v=4","gravatar_id":"","url":"https://api.github.com/users/runzexia","html_url":"https://github.com/runzexia","followers_url":"https://api.github.com/users/runzexia/followers","following_url":"https://api.github.com/users/runzexia/following{/other_user}","gists_url":"https://api.github.com/users/runzexia/gists{/gist_id}","starred_url":"https://api.github.com/users/runzexia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runzexia/subscriptions","organizations_url":"https://api.github.com/users/runzexia/orgs","repos_url":"https://api.github.com/users/runzexia/repos","events_url":"https://api.github.com/users/runzexia/events{/privacy}","received_events_url":"https://api.github.com/users/runzexia/received_events","type":"User","site_admin":false},"created_at":"2019-12-31T09:02:26Z","updated_at":"2019-12-31T09:02:26Z","author_association":"NONE","body":"> > Thanks a lot for the quick reply.\r\n> > I have similar errors when I set `dubbo.registry.address=spring-cloud://localhost`\r\n> > @yuhuangbin\r\n> \r\n> In my local, it works well\r\n\r\nhttps://github.com/runzexia/spring-microservices-sample/tree/alibaba-dubbo\r\nI set up the project as a public project, this is a springcloud and dubbo demo.\r\nYou can try run employee-service, it does not depend on any service.\r\nThe configuration in nacos is saved in this file, you need to create it in advance\r\nhttps://github.com/runzexia/spring-microservices-sample/blob/alibaba-dubbo/employee-service/nacos-config.yaml"}}
{"actor":{"display_login":"runzexia"}}