You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "beimx (GitHub)" <gi...@apache.org> on 2020/02/13 04:07:54 UTC

[GitHub] [dubbo] beimx opened issue #5742: Dubbo2.7.5 使用Zookeeper元数据中心,元数据未上报

- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 2.7.5
* Zookeeper version: 3.4.14
* Operating System version: macos
* Java version: 1.8

### Steps to reproduce this issue

1. 按官方文档搭建provider,两种方式:annotation/xml
2. 分别配置

```xml
    <dubbo:metadata-report address="zookeeper://127.0.0.1:2181"/>
```

```java
        @Bean
        public MetadataReportConfig metadataReportConfig() {
            MetadataReportConfig metadataReportConfig = new MetadataReportConfig();
            metadataReportConfig.setAddress("zookeeper://127.0.0.1:2181");
            return metadataReportConfig;
        }
```

3. 应用正常启动
4. Consumer端正常调用
4. 观察Zookeeper节点数据,元数据节点/dubbo/metadata 未创建

### Expected Result
元数据正常上报

### Actual Result

元数据节点在Zookeeper上未创建,元数据未上报

> 将dubbo版本号更改为2.7.4.1、2.7.3,代码或配置未改动,元数据正常上报


[ Full content available at: https://github.com/apache/dubbo/issues/5742 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo] laddcn commented on issue #5742: Dubbo2.7.5 使用Zookeeper元数据中心,元数据未上报

Posted by "laddcn (GitHub)" <gi...@apache.org>.
@chickenlj @mercyblitz 应该是 metadata-type 这个属性默认是local导致的这个问题,是不是可以在配置了dubbo:metadata-report address,metadata-type没有配置的情况下,将metadata-type属性默认设置为remote?这样能解决兼容问题,低版本的项目升级到2.7.5都需要增加metadata-type为remote的配置才能解决兼容性问题,容易出错

[ Full content available at: https://github.com/apache/dubbo/issues/5742 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo] mercyblitz commented on issue #5742: Dubbo2.7.5 使用Zookeeper元数据中心,元数据未上报

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
> @chickenlj @mercyblitz 应该是 metadata-type 这个属性默认是local导致的这个问题,是不是可以在配置了dubbo:metadata-report address,metadata-type没有配置的情况下,将metadata-type属性默认设置为remote?这样能解决兼容问题。要不然,低版本的项目升级到2.7.5都需要增加metadata-type为remote的配置才能解决兼容性问题,容易出错。
> 如果该方案可行,我可以提个PR

Yes, please PR, thanks~

[ Full content available at: https://github.com/apache/dubbo/issues/5742 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo] laddcn commented on issue #5742: Dubbo2.7.5 使用Zookeeper元数据中心,元数据未上报

Posted by "laddcn (GitHub)" <gi...@apache.org>.
@chickenlj @mercyblitz 应该是 metadata-type 这个属性默认是local导致的这个问题,是不是可以在配置了dubbo:metadata-report address,metadata-type没有配置的情况下,将metadata-type属性默认设置为remote?这样能解决兼容问题。要不然,低版本的项目升级到2.7.5都需要增加metadata-type为remote的配置才能解决兼容性问题,容易出错

[ Full content available at: https://github.com/apache/dubbo/issues/5742 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo] laddcn commented on issue #5742: Dubbo2.7.5 使用Zookeeper元数据中心,元数据未上报

Posted by "laddcn (GitHub)" <gi...@apache.org>.
@chickenlj @mercyblitz 应该是 metadata-type 这个属性默认是local导致的这个问题,是不是可以在配置了dubbo:metadata-report address,metadata-type没有配置的情况下,将metadata-type属性默认设置为remote?这样能解决兼容问题。要不然,低版本的项目升级到2.7.5都需要增加metadata-type为remote的配置才能解决兼容性问题,容易出错。
如果该方案可行,我可以提个PR

[ Full content available at: https://github.com/apache/dubbo/issues/5742 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org