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

k8s 外部的客户端 (producer/consumer) 如何访问rocketmq cluster #52

Open
walk1ng opened this issue Aug 12, 2020 · 5 comments
Open

Comments

@walk1ng
Copy link

walk1ng commented Aug 12, 2020

需求是 rocketmq cluster 搭建在一个 k8s 集群中,客户端运行在 k8s 集群外部,请问这种情况如何正确访问 mq 集群呢?
比如:

[root@mybrokercluster-1-0 bin]# ./mqadmin clusterList -n 10.224.xx.xx:32730
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
#Cluster Name     #Broker Name            #BID  #Addr                  #Version                #InTPS(LOAD)       #OutTPS(LOAD) #PCWait(ms) #Hour #SPACE
DefaultCluster    mybrokercluster-0-0.mybrokercluster-svc-0.rocketmq-operator.svc.cluster.local  0     10.42.0.112:10911      V4_3_2                   0.00(0,0ms)         0.00(0,0ms)          0 443671.72 0.4013
DefaultCluster    mybrokercluster-1-0.mybrokercluster-svc-1.rocketmq-operator.svc.cluster.local  0     10.42.0.113:10911      V4_3_2                   0.00(0,0ms)         0.00(0,0ms)          0 443671.72 0.4013

当客户端在 k8s 集群外部时,dial pod IP 一定会失败。如下:

WARN[0003] send heart beat to broker error               underlayError="dial tcp 10.42.0.112:10911: i/o timeout"
WARN[0006] send heart beat to broker error               underlayError="dial tcp 10.42.0.113:10911: i/o timeout"
ERRO[0009] get consumer list of group from broker error  broker="10.42.0.112:10911" consumerGroup=test underlayError="dial tcp 10.42.0.112:10911: i/o timeout"
ERRO[0013] get consumer list of group from broker error  broker="10.42.0.113:10911" consumerGroup=test underlayError="dial tcp 10.42.0.113:10911: i/o timeout"

期待回复,谢谢~

/triage support

@huanwei
Copy link
Owner

huanwei commented Aug 12, 2020

@walk1ng 这是典型的容器网络层面需要解决的问题,需打通容器网络和二层网络间的路由

@walk1ng
Copy link
Author

walk1ng commented Aug 13, 2020

@walk1ng 这是典型的容器网络层面需要解决的问题,需打通容器网络和二层网络间的路由

谢谢回复。
请问能再详细说明吗?
另外能否通过node_ip:nodeport的形式解决呢?用来指定brokerIP1, listenPort?

@huanwei
Copy link
Owner

huanwei commented Aug 13, 2020

@walk1ng 可以考虑从网络层面解决,二层网络例如macvlan、bridge,或者calico bgp reflector这种网络模式

@walk1ng
Copy link
Author

walk1ng commented Aug 18, 2020

@walk1ng 可以考虑从网络层面解决,二层网络例如macvlan、bridge,或者calico bgp reflector这种网络模式

好的,谢谢!

@xuyf1001
Copy link

@walk1ng 可以考虑从网络层面解决,二层网络例如macvlan、bridge,或者calico bgp reflector这种网络模式

好的,谢谢!

请问您解决了吗?是修改的网络模式?还是修改的broker.conf配置文件里加brokerIP为pod的宿主机IP?哪一种比较好解决呢?

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

3 participants