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

显示重复消费者 #355

Closed
ghost opened this issue Apr 4, 2019 · 16 comments
Closed

显示重复消费者 #355

ghost opened this issue Apr 4, 2019 · 16 comments

Comments

@ghost
Copy link

ghost commented Apr 4, 2019

在服务查询功能,选择其中一个服务,点击详情按钮,在服务信息区域,消费者tab,发现有重复应用“dubbo-admin”

@nzomkxia
Copy link
Member

nzomkxia commented Apr 9, 2019

@TJLing 消费者的IP是否一样?截个图看下

@ghost
Copy link
Author

ghost commented Apr 9, 2019

Uploading QQ截图20190409171749.jpg…

@ghost
Copy link
Author

ghost commented Apr 9, 2019

IP 是相同的

@ghost
Copy link
Author

ghost commented Apr 9, 2019

发现只要我在dubbo-admin执行一次测试,在消费者就会显示多一个重复的“dubbo-admin”

@nzomkxia
Copy link
Member

图片无法打开,请确认下

@ghost
Copy link
Author

ghost commented Apr 11, 2019

QQ截图20190411080157

@shaofei007
Copy link
Contributor

楼上你这个问题还在吗?
我用最新的包在本地重现没有成功啊

@pjqdyd
Copy link

pjqdyd commented May 20, 2019

我也有这个问题, 每次重启提供者或消费者就显示多一个重复的服务

@rushicheng
Copy link

每次重启提供者或消费者就显示多一个重复的服务

需要设置dynamic属性

@sunbufu
Copy link
Contributor

sunbufu commented Jun 22, 2019

可能跟 dubbo 的这个 issue apache/dubbo#4213 有关

@Donaldhan
Copy link

感觉这个问题一致没有修复

@Donaldhan
Copy link

不是说在2.7.2修复吗?apache/dubbo#4213

@Donaldhan
Copy link

@rushicheng , 没用的
我的pom,用的是dububo:2.7.8, spring-boot:2.3.0.RELEASE

   <dependency>
             <groupId>org.apache.dubbo</groupId>
             <artifactId>dubbo-spring-boot-starter</artifactId>
             <version>${dubbo.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.dubbo</groupId>
             <artifactId>dubbo-dependencies-zookeeper</artifactId>
             <version>${dubbo.version}</version>
             <type>pom</type>
             <exclusions>
                 <exclusion>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-log4j12</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>

dubbo服务

@DubboService(version = "1.0.0", validation = "true", dynamic = true)
public class AccountRemoteServiceImpl implements AccountRemoteService {
    @Autowired
    AccountBizService accountBizService;

    @Override
    public Boolean debit(String userId, BigDecimal money) {
        return  accountBizService.debit(userId, money);
    }
}

查看zk服务的节点信息,
image

ip地址一样;

4213来看,同样存在这样的问题?说是dynamic的问题,默认false,则持久路径,true为临时路径,2.7.8为true还是没用。
DubboService
···java
/**
* Whether the service is dynamic, default value is true
*/
boolean dynamic() default true;
···

调试结果:

image

临时节点,在连接断开后,zk会自动删除, 这不应该呀!

我们dubbo版本为2.6.9,dubbo-boot:0.2.1.RELEASE,spring-boot:2.1..RELEASE 存在同样的问题,重复注册?
pom

<!--0.2.1.RELEASE start-->
        <dependency>
            <groupId>com.alibaba.boot</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>${alibaba.boot.dubbo.springboot.starter}</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
            <version>${dubbo.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-framework</artifactId>
            <version>2.8.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-recipes</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.15.Final</version>
        </dependency>
        <!--0.2.1.RELEASE end-->

dubbo 服务

@Service(version = "1.0.0", validation = "true", dynamic = true)
public class AccountRemoteServiceImpl implements AccountRemoteService {
    @Autowired
    AccountBizService accountBizService;

    @Override
    public Boolean debit(String userId, BigDecimal money) {
        return  accountBizService.debit(userId, money);
    }
}
public @interface Service {
...
 boolean dynamic() default false;
...
}

dynamic 为false还是有;

从这两个例子来看,跟dynamic 无关。

这是一个问题,另外我想问一下,服务节点路径的timestamp 是做什么用了

/dubbo/com.story.home.cherry.api.domain.account.service.AccountRemoteService/providers/dubbo%3A%2F%2F10.242.214.156%3A20880%2Fcom.story.home.cherry.api.domain.account.service.AccountRemoteService%3Fanyhost%3Dtrue%26application%3Dcomosus-cherry%26deprecated%3Dfalse%26dubbo%3D2.0.2%26dynamic%3Dtrue%26generic%3Dfalse%26interface%3Dcom.story.home.cherry.api.domain.account.service.AccountRemoteService%26metadata-type%3Dremote%26methods%3Ddebit%26pid%3D14688%26release%3D2.7.8%26retries%3D0%26revision%3D1.0.0%26service.filter%3DelapsedTimeFilter%26side%3Dprovider%26threads%3D400%26timeout%3D6000000%26timestamp%3D1611295886073%26version%3D1.0.0

去掉timestamp,是不是,就保持一个节点了;

@Donaldhan
Copy link

持续跟进这个问题:apache/dubbo#7124

@Donaldhan
Copy link

问题已解决,应该是没有优雅关机的问题

@KeRan213539
Copy link
Contributor

Sorry, because this issue was raised very early, we have closed it temporarily. You can verify whether this problem still exists in the latest code of the develop branch. If this problem still exists, please reopen it at any time.

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

7 participants