美文网首页
zookeeper docker集群出现 Client port

zookeeper docker集群出现 Client port

作者: 安易学车 | 来源:发表于2020-10-15 16:08 被阅读0次

    配置文件要做如下修改:

    version: '3.0'

    services:

      zoo1:

        image: zookeeper

        restart: always

        hostname: zoo1

        ports:

          - 2181:2181

        environment:

          ZOO_MY_ID: 1

          ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181

      zoo2:

        image: zookeeper

        restart: always

        hostname: zoo2

        ports:

          - 2182:2181

        environment:

          ZOO_MY_ID: 2

          ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=0.0.0.0:2888:3888;2181 server.3=zoo3:2888:3888;2181

      zoo3:

        image: zookeeper

        restart: always

        hostname: zoo3

        ports:

          - 2183:2181

        environment:

          ZOO_MY_ID: 3

          ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=0.0.0.0:2888:3888;2181

    相关文章

      网友评论

          本文标题:zookeeper docker集群出现 Client port

          本文链接:https://www.haomeiwen.com/subject/fklopktx.html