Skip to content

dubbo2.7.x config-center的配置namespace参数与代码获取配置的变量值不一致 #3872

Closed

Description

@nevin9939

Environment

  • Dubbo version: 2.7.1
  • Dubbo Admin version: 0.2.0
  • Java version: 1.8

Steps to reproduce this issue

在dubbo-admin中添加权重设置和负载均衡设置
在zookeeper里面能看到设置的结果在config下面
a000
a1111
a2222

但是实际dubbo在调用时,并没有从config下面获取配置,仍然从服务接口下面的配置中获取,到账新的配置不生效,而且从服务接口拿配置,也没有应用级一说,仍是服务级

Activity

  1. nevin9939 commented on Apr 16, 2019

    @nevin9939
    Author

    aaaaa

    <dubbo:config-center address="${dubbo.address}" namespace="yk" />

    这应该是个bug,造成配置从错误的地方获取,导致获取不到配置,给人假象是配置未生效

  2. chickenlj commented on Apr 16, 2019

    @chickenlj
    Contributor

    请问你这里指定namespace="yk"是想达到什么目的?
    <dubbo:config-center address="${dubbo.address}" namespace="yk" />

    这样,会导致zk监听路径为:
    /yk/config/xxx
    因此这里指定的namespace需与dubbo-admin中配置保持一致,否则dubbo-admin写入的路径仍为:
    /dubbo/config/xxx

  3. nevin9939 commented on Apr 16, 2019

    @nevin9939
    Author

    namespace="yk"是为了做环境隔离,跟
    <dubbo:registry group="yk"/>
    保持一致

  4. chickenlj commented on Apr 17, 2019

    @chickenlj
    Contributor

    你目前同时使用了两个环境吗:dubbo、yk?
    dubbo-admin是否配置了configcenter使用yk?

  5. nevin9939 commented on Apr 17, 2019

    @nevin9939
    Author

    是的,配置都配了,实际需要区分的环境有4个

  6. nevin9939 commented on Apr 19, 2019

    @nevin9939
    Author

    问题点不是应该在配置文件的参数key 与 实际获取参数的key不一致吗

  7. changed the title [-]dubbo2.7.x服务治理应用级权重和负载均衡设置不生效[/-] [+]dubbo2.7.x config-center的配置namespace参数与代码获取配置的变量值不一致[/+] on Apr 23, 2019
  8. panghuchi commented on Jun 5, 2019

    @panghuchi

    遇到同样问题

  9. added this to the 2.7.3 milestone on Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions