1

When I use an online lab environment through my browser: https://labs.play-with-docker.com/, I can start the container when I execute the docker-compose.yml file through the docker-compose up -d command. But after a minute or so, the application automatically disconnects. Switching networks doesn't work either. Looking forward to reply!!! The docker-compose.yml file has the following contents:

version: '3.8' services: zoo1: image: zookeeper:3.6.3 hostname: zoo1 container_name: zoo1 ports:

  • "2181:2181" environment: ZOO_MY_ID: 1 ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181

zoo2: image: zookeeper:3.6.3 hostname: zoo2 container_name: zoo2 ports:

  • "2182:2181" environment: ZOO_MY_ID: 2 ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181

zoo3: image: zookeeper:3.6.3 hostname: zoo3 container_name: 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=zoo3:2888:3888;2181

This problem does not occur when the docker-compose.yml file is not executed. Not even if you switch networks Looking forward to reply

2
  • Might it be related to Zookeeper? Commented Jun 21 at 13:20
  • @ryanwebjackson Thank you, it is the problem of zookeeper. When I change it to redis, there is no problem above, but I am still looking for the specific reason Commented Jun 25 at 0:46

0

Browse other questions tagged or ask your own question.