Rancher部署zookeeper集群时,无法绑定请求地址


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”

声明:初心|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - Rancher部署zookeeper集群时,无法绑定请求地址


愿你勿忘初心,并从一而终