Rancher部署zookeeper集群时,无法绑定请求地址
错误提示 "Cannot assign requested address (Bind failed)"
2022-07-11 03:28:24,363 [myid:1] - ERROR [zookeeper-node1/10.43.226.253:3888:QuorumCnxManager$Listener@958] - Exception while listening
java.net.BindException: Cannot assign requested address (Bind failed)
at java.base/java.net.PlainSocketImpl.socketBind(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.base/java.net.ServerSocket.bind(Unknown Source)
at java.base/java.net.ServerSocket.bind(Unknown Source)
at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener.run(QuorumCnxManager.java:931)
原因
因为3888端口通过K8S服务暴露,需要添加配置项quorumListenOnAllIPs=true
以保证扫描所有网卡
解决
通过环境变量添加配置项
ZOO_CFG_EXTRA=“quorumListenOnAllIPs=true”
Comments | NOTHING