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
Consumer rebalance problem when using docker container #667
Comments
What's the current clientId generation rule in ClientConfig class? And how to reproduce it? |
clientId:
instanceName:
在docker环境下(使用host模式),获取到的clientIp和pid都是一样的。当然clientIp一样的确切原因还没完全确认,可能和引入Rancher有关。 |
I encountered the same problem. Under HOST networking mode, all dockers managed by Rancher are with the same docker0 IP, which is 172.17.0.1. Thus, RemotingUtil.getLocalAddress() always returns "172.17.0.1" for those dockers, which leads to collision between consumers with the same pid, if using default "IP@pid" clientId.
|
@huanwei This is a known problem in the docker container if we deploy mutl-docker containers in the one machine. |
That's known issue caused by Rancher container network. Setting different instanceName should solve this problem, just as @duhenglucky suggested. |
Which version have been solved, I also meeting the same problem. |
Has this be fixed? |
除了通过手动自定义instanceName外,RocketMQ会做什么来兼容吗?还是不考虑兼容了? |
I would like a more general way to completely solve the problem of instance conflicts. #3680 |
BUG REPORT
docker环境下,2个不同的consumer实例,生成的clientId是重复的,进而导致rebalance的结果混乱。(经过debug发现获取到的ip是一样的,怀疑跟rancher网络有关)
rocketmq client "4.3.0"
java version "1.8.0_181"
Docker version "18.09.0"
建议:改进ClientConfig类中instanceName的生成规则
The text was updated successfully, but these errors were encountered: