Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nacos Service Discovery can't work normally #7724

Closed
horizonzy opened this issue May 10, 2021 · 0 comments
Closed

Nacos Service Discovery can't work normally #7724

horizonzy opened this issue May 10, 2021 · 0 comments

Comments

@horizonzy
Copy link
Member

Environment

  • Dubbo version: master

Steps to reproduce this issue

This issue should after #7723 merged.

  1. modify dubbo-demo-xml-provider spring file as follow:
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
       http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">

    <dubbo:application name="demo-provider" metadata-type="remote">
        <dubbo:parameter key="mapping-type" value="config"/>
    </dubbo:application>

    <dubbo:config-center address="nacos://127.0.0.1:8848"/>
    <dubbo:metadata-report address="nacos://127.0.0.1:8848"/>
    <dubbo:registry id="registry1" address="nacos://127.0.0.1:8848?registry-type=service"/>

    <dubbo:protocol name="dubbo" port="-1"/>

    <bean id="demoService" class="org.apache.dubbo.demo.provider.DemoServiceImpl"/>
    <bean id="greetingService" class="org.apache.dubbo.demo.provider.GreetingServiceImpl"/>

    <dubbo:service interface="org.apache.dubbo.demo.DemoService" timeout="3000" ref="demoService" registry="registry1"/>
    <dubbo:service version="1.0.0" group="greeting" timeout="5000" interface="org.apache.dubbo.demo.GreetingService"
                   ref="greetingService"/>

</beans>
  1. modify dubbo-demo-xml-consumer spring file as follow:
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
       http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">

    <dubbo:application name="demo-consumer" >
        <dubbo:parameter key="mapping-type" value="config"/>
        <dubbo:parameter key="enable-auto-migration" value="true"/>
    </dubbo:application>

    <dubbo:metadata-report address="nacos://127.0.1:8848"/>

    <dubbo:registry address="nacos://127.0.0.1:8848"/>

    <dubbo:reference id="demoService" check="true"
                     interface="org.apache.dubbo.demo.DemoService"/>

    <dubbo:reference version="1.0.0" group="greeting" id="greetingService" check="false"
                     interface="org.apache.dubbo.demo.GreetingService"/>

</beans>
  1. Run provider and consumer
  2. Result: consumer can't discovery provider.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant