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

dubbo 2.7.2配置zookeeper,提示不支持 #4263

Closed
zhangkangyue opened this issue Jun 6, 2019 · 10 comments
Closed

dubbo 2.7.2配置zookeeper,提示不支持 #4263

zhangkangyue opened this issue Jun 6, 2019 · 10 comments

Comments

@zhangkangyue
Copy link

Exception in thread "main" java.lang.IllegalStateException: No such extension org.apache.dubbo.configcenter.DynamicConfigurationFactory by name zookeeper

@zhangkangyue
Copy link
Author

<dubbo:registry address="zookeeper://127.0.0.1:2181"/>

@CrazyHZM
Copy link
Member

CrazyHZM commented Jun 6, 2019

在pom文件里面加入configcenter的依赖例如加入dubbo-configcenter-zookeeper依赖你就可以跑demo了

@arjenzhou
Copy link

@zhangkangyue
You can refer to https://github.com/arjenzhou/dubbo-demo, there are some my experience about it.

@zhangkangyue
Copy link
Author

@zhangkangyue
You can refer to https://github.com/arjenzhou/dubbo-demo, there are some my experience about it.

provider端:
<dubbo:application name="dubbo-provider"/>
<dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181" simplified="true"/>
<dubbo:metadata-report address="zookeeper://127.0.0.1:2181"/>

<dubbo:service interface="cn.jcorn.dubbo.api.GreetingService" ref="greetingService"/>

consumer端:<dubbo:application name="dubbo-consumer"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
<dubbo:reference id="greetingService" check="false" interface="cn.jcorn.dubbo.api.GreetingService"/>

启动dubbo-demo consumer报错:
Exception in thread "main" org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service cn.jcorn.dubbo.api.GreetingService. No provider available for the service cn.jcorn.dubbo.api.GreetingService from registry 127.0.0.1:2181 on the consumer 30.16.96.186 using the dubbo version 2.7.1. Please check if the providers have been started and registered.
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:265)
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:57)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:242)
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:76)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:57)
at org.apache.dubbo.common.bytecode.proxy0.sayHello(proxy0.java)
at cn.jcorn.dubbo.consumer.Consumer.main(Consumer.java:11)

@arjenzhou
Copy link

arjenzhou commented Jun 12, 2019

@zhangkangyue
You can take a look at zookeeper client whether provider is properly resgisted to zookeeper or not.

@arjenzhou
Copy link

Also, is 30.16.96.186 your ip address?

Provide your environment will be a good way for help.

@zhangkangyue
Copy link
Author

Also, is 30.16.96.186 your ip address?

Provide your environment will be a good way for help.

是的

@zhangkangyue
Copy link
Author

@zhangkangyue
You can take a look at zookeeper client whether provider is properly resgisted to zookeeper or not.

我把zk 节点/dubbo删除,consumer消费正常了。是脏数据导致的吗?

@arjenzhou
Copy link

#4213
#3785

You can refer to these two issues.

@wallacefw1987
Copy link

@zhangkangyue
You can refer to https://github.com/arjenzhou/dubbo-demo, there are some my experience about it.

provider端:
<dubbo:application name="dubbo-provider"/>
<dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181" simplified="true"/>
<dubbo:metadata-report address="zookeeper://127.0.0.1:2181"/>

<dubbo:service interface="cn.jcorn.dubbo.api.GreetingService" ref="greetingService"/>

consumer端:<dubbo:application name="dubbo-consumer"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
<dubbo:reference id="greetingService" check="false" interface="cn.jcorn.dubbo.api.GreetingService"/>

启动dubbo-demo consumer报错:
Exception in thread "main" org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service cn.jcorn.dubbo.api.GreetingService. No provider available for the service cn.jcorn.dubbo.api.GreetingService from registry 127.0.0.1:2181 on the consumer 30.16.96.186 using the dubbo version 2.7.1. Please check if the providers have been started and registered.
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:265)
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:57)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:242)
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:76)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:57)
at org.apache.dubbo.common.bytecode.proxy0.sayHello(proxy0.java)
at cn.jcorn.dubbo.consumer.Consumer.main(Consumer.java:11)

@zhangkangyue
You can refer to https://github.com/arjenzhou/dubbo-demo, there are some my experience about it.

provider端:
<dubbo:application name="dubbo-provider"/>
<dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181" simplified="true"/>
<dubbo:metadata-report address="zookeeper://127.0.0.1:2181"/>

<dubbo:service interface="cn.jcorn.dubbo.api.GreetingService" ref="greetingService"/>

consumer端:<dubbo:application name="dubbo-consumer"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
<dubbo:reference id="greetingService" check="false" interface="cn.jcorn.dubbo.api.GreetingService"/>

启动dubbo-demo consumer报错:
Exception in thread "main" org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service cn.jcorn.dubbo.api.GreetingService. No provider available for the service cn.jcorn.dubbo.api.GreetingService from registry 127.0.0.1:2181 on the consumer 30.16.96.186 using the dubbo version 2.7.1. Please check if the providers have been started and registered.
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:265)
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:57)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:242)
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:76)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:57)
at org.apache.dubbo.common.bytecode.proxy0.sayHello(proxy0.java)
at cn.jcorn.dubbo.consumer.Consumer.main(Consumer.java:11)


我也遇到这个问题 , 不过我跟着这个 demo https://github.com/arjenzhou/dubbo-demo.git 去覆盖(dubbo-demo-xml)项目后,问题解决了

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

5 participants