You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/06/28 09:16:39 UTC

[GitHub] [dubbo] jeffchanjunwei opened a new issue #8158: Does "zone-aware" cluster(ZoneClusterInvoker) work ?

jeffchanjunwei opened a new issue #8158:
URL: https://github.com/apache/dubbo/issues/8158


   
   ### Environment
   
   * Dubbo version: 2.7.12
   * Operating System version: win10
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. start provider-1 registried in zk-1
   2. start provider-2 registried in zk-2
   3. start consumer refer the provider on zk-1 and zk-2(preferred=true) 
   4. consumer refer interface of the provider failed with the following error:
   
   [28/06/21 17:06:36:663 CST] SpringContextShutdownHook  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Destroy unregister url consumer://172.19.192.1/org.apache.dubbo.demo.DemoService?application=demo-consumer&category=consumers&check=false&cluster=zone-aware&dubbo=2.0.2&init=false&interface=org.apache.dubbo.demo.DemoService&metadata-type=remote&methods=sayHello,sayHelloAsync&pid=4836&qos.port=33333&release=2.7.11&side=consumer&sticky=false&timestamp=1624871181015, dubbo version: 2.7.11, current host: 172.19.192.1
   Exception in thread "main" java.lang.ClassCastException: org.apache.dubbo.registry.integration.RegistryDirectory$InvokerDelegate cannot be cast to org.apache.dubbo.rpc.cluster.ClusterInvoker
   	at org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker.doInvoke(ZoneAwareClusterInvoker.java:77)
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:265)
   	at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
   	at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:93)
   	at org.apache.dubbo.registry.client.migration.MigrationInvoker.invoke(MigrationInvoker.java:169)
   	at org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker.doInvoke(ZoneAwareClusterInvoker.java:105)
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:265)
   	at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
   	at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:93)
   	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:96)
   	at org.apache.dubbo.common.bytecode.proxy0.sayHelloAsync(proxy0.java)
   	at org.apache.dubbo.demo.consumer.Application.main(Application.java:34)
   
   
   5. the config of the consumer is :
   <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:consumer cluster="zone-aware"/>
   
       <dubbo:registry id="r1" address="zookeeper://192.168.132.193:2181" preferred="true" timeout="25000"/>
   
       <dubbo:registry id="r2" address="zookeeper://192.168.132.194:2181" timeout="25000"/>
   
       <dubbo:reference id="demoService" check="false" interface="org.apache.dubbo.demo.DemoService" registry="r1,r2"/>
   
   </beans>
   
   
   Does the zone-aware cluster work? Is the config right? 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] CrazyHZM commented on issue #8158: Does "zone-aware" cluster(ZoneClusterInvoker) work ?

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #8158:
URL: https://github.com/apache/dubbo/issues/8158#issuecomment-1000663365


   Try it with the latest version, if you still have problems, you can reopen the issue


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] CrazyHZM closed issue #8158: Does "zone-aware" cluster(ZoneClusterInvoker) work ?

Posted by GitBox <gi...@apache.org>.
CrazyHZM closed issue #8158:
URL: https://github.com/apache/dubbo/issues/8158


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org