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

2.7.5-dubbo.metadata No effect #5667

Closed
yipixiaofeiyang opened this issue Jan 16, 2020 · 3 comments
Closed

2.7.5-dubbo.metadata No effect #5667

yipixiaofeiyang opened this issue Jan 16, 2020 · 3 comments
Milestone

Comments

@yipixiaofeiyang
Copy link

Environment

  • Dubbo version: 2.7.5
  • Operating System version: win10 or centos7
  • Java version: 1.8.0
  • Zookeeper version: 3.5.6

Steps to reproduce this issue

My previous dubbo service version was 2.7.3. Today, I upgraded to 2.7.5. I found that the metadata can't be displayed all the time. The dubbo service registry in zookeeper, but zookeeper not /dubbo/metadata node path view. If I switch back to 2.7.3 and 2.7.4.1, it can be displayed. Are there any bugs? I need help~~

xml-config:
<dubbo:metadata-report address="zookeeper://192.168.11.100:2181?backup=192.168.11.105:2181" />

@jinyingxiong
Copy link

2.7.5变动较大,需要在parameter中增加新参数才行。
<dubbo:provider id="providerRpt" scope="remote" timeout="60000" token="false" registry="registryRpt"> <dubbo:parameter key="protocolIds" value="ptlDubbo"/> <!-- Dubbo-2.7.5 support --> <dubbo:parameter key="metadata" value="remote"/> <!-- 报表上报 --> <dubbo:service interface="xxx.xxx.ServiceRptService" ref="rmiRptService" /> </dubbo:provider>

<dubbo:parameter key="metadata" value="remote"/>

主要是这句

@laddcn
Copy link
Contributor

laddcn commented Jan 22, 2020

2.7.5 版本中dubbo.xsd中"metadata"标签改成了"metadata-type",但是在服务和引用初始化的实际metadata上传获取元数据服务类型还是用的“metadata”,所以导致metadata没法上传,提交的PR修复了这个bug,在application中设置metadata-type为remote可以是metadata上传生效,记得要同时配置metadata-report,类似下面的示例
<dubbo:application name="demo-provider" metadata-type="remote"/>
<dubbo:metadata-report address="nacos://127.0.0.1:8848"/>

PS:对于上楼说的方法,也可以兼容

@laddcn
Copy link
Contributor

laddcn commented Jan 22, 2020

这部分代码也是最近几天看的,PR还麻烦 @tswstarplanet @chickenlj 帮着检视

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