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

ZoneAwareClusterInvoker ClassCastException #6320

Closed
2 tasks done
liuzhaozhao opened this issue Jun 14, 2020 · 2 comments
Closed
2 tasks done

ZoneAwareClusterInvoker ClassCastException #6320

liuzhaozhao opened this issue Jun 14, 2020 · 2 comments
Milestone

Comments

@liuzhaozhao
Copy link

liuzhaozhao commented Jun 14, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.7
  • Operating System version: windows 10
  • Java version: 1.8

现象:
在测试cluster: zone-aware时,ZoneAwareClusterInvoker类的doInvoke方法抛出了java.lang.ClassCastException,异常信息为:
java.lang.ClassCastException: org.apache.dubbo.registry.integration.RegistryDirectory$InvokerDelegate cannot be cast to org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker
at org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker.doInvoke(ZoneAwareClusterInvoker.java:63)

配置:
Provider#1
server:
port: 8090
dubbo:
scan:
base-packages: cn.service.test.api
application:
name: dubbo-service
config:
multiple: true
protocol:
name: dubbo
port: 2080
threads: 200
provider:
version: 1.0.0
registry:
check: false
timeout: 20000
use-as-config-center: false
address: zookeeper://localhost:2181
zone: zone-1

Provider#2
server:
port: 8091
dubbo:
scan:
base-packages: cn.service.test.api
application:
name: dubbo-service
config:
multiple: true
protocol:
name: dubbo
port: 2081
threads: 200
provider:
version: 1.0.0
registry:
check: false
timeout: 20000
use-as-config-center: false
address: nacos://nacos.ym:80
zone: zone-2

Consumer
server:
port: 8092
dubbo:
scan:
base-packages: cn.service.test.api
application:
name: dubbo-client
protocol:
name: dubbo
port: 2082
threads: 200
config:
multiple: true
provider:
version: 1.0.0
registries:
zone1:
address: zookeeper://localhost:2181
timeout: 20000
use-as-config-center: false
cluster: zone-aware
zone2:
address: nacos://nacos.ym:80
timeout: 20000
preferred: true
use-as-config-center: false
cluster: zone-aware

问题
目前dubbo的文档中未发现zone-aware的使用方式,请问是配置错误导致吗?

skyguard1 pushed a commit to skyguard1/dubbo that referenced this issue Jun 29, 2020
@cityiron
Copy link

cityiron commented Jul 9, 2020

I see this problem too. Who can give me an example?

@qixiaobo
Copy link
Contributor

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

4 participants