RocketChat / Docker.Official.Image

Docker hub - community managed image
293 stars 218 forks source link

Not connecting to mongo when using docker-compose #140

Closed inn0minatus closed 3 years ago

inn0minatus commented 3 years ago

Git latest, no changes to docker-compose. sudo docker-compose up --build =>

mongo-init-replica_1  | MongoDB shell version v4.0.24
mongo-init-replica_1  | connecting to: mongodb://mongo:27017/rocketchat?gssapiServiceName=mongodb
mongo-init-replica_1  | 2021-04-28T12:08:00.255+0000 E QUERY    [js] Error: couldn't connect to server mongo:27017, connection attempt failed: SocketException: Error connecting to mongo:27017 (172.20.0.2:27017) :: caused by :: Connection refused :
mongo-init-replica_1  | connect@src/mongo/shell/mongo.js:356:17
mongo-init-replica_1  | @(connect):2:6
mongo-init-replica_1  | exception: connect failed
sprklinginfo commented 2 years ago

Hi @Neovet , Have you found a solution to fix the error finally? I have been struggling with the docker-compose.yml file for a week now and keep getting this error. Both containers are showing 'restarting' all the time. I'd appreciate if you can share some tips on fixing this error.