SpringCloud / spring-cloud-dubbo

spring-cloud-dubbo
http://springcloud.cn/view/254
Apache License 2.0
442 stars 106 forks source link

启动两个使用nacos + cloud dubbo 的应用,它们互为消费者与提供者的时候,永远有一方找不到服务提供者,事实上这个提供者已经在线 #10

Open WuQuDeRen opened 5 years ago

WuQuDeRen commented 5 years ago

1、启动两个互为消费者与提供者的应用,则其中一个应用永远找不到服务提供者,另一个却可以 nacos + cloud dubbo 备注:如果不使用 nacos + cloud dubbo,而换成最原始的 nacos + dubbo 则一定可以找到服务提供者 2、bootstrap.yml配置 1) dubbo: application: qos-port: 20221 qos-accept-foreign-ip: false scan: base-packages: com.fj.nacos.order.web.remote protocol: name: dubbo port: -1 registry: address: spring-cloud://127.0.0.1 check: false consumer: check: false

2) dubbo: scan: base-packages: com.fj.nacos.crm.web.remote protocol: name: dubbo port: -1 registry: address: spring-cloud://127.0.0.1 consumer: check: false application: qos-enable: true qos-accept-foreign-ip: false qos-port: 22223


  1. pom依赖 org.springframework.cloud spring-cloud-dependencies Greenwich.SR1 pom import
    <dependency>
           <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-alibaba-dependencies</artifactId>
            <version>0.9.0.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
    </dependency>
    org.springframework.cloud spring-cloud-starter-dubbo
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
    </dependency>