Docker.Official.Image
Docker.Official.Image copied to clipboard
Can't start up by using `docker-compose up --build -d`
I've cloned this repo(@commit: 1af353) and start it up with docker-compose up --build -d
as the README.md
saying. But I've got the error log from the container of rocket.chat
:
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
Then, I tried to modify the start-up command of mongo-init-replica
in docker-compose file:
command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs01'', members: [ { _id: 0, host: ''mongo:27017'' } ]})"'
# change localhost:27017 to mongo:27017
At this time, all containers status shown Up xxx seconds
. But http://localhost
is still not available. Then I have looked at the logs of rocket.chat
. It shows:
SERVER ERROR:
YOUR CURRENT MONGODB VERSION IS NOT SUPPORTED,
PLEASE UPGRADE TO VERSION 3.4 OR LATER
After I pull down the mongo:3.4
and restart it, it finally running.
I didn't know why I'm failed to start it up with previous docker-compose file. I didn't see anybody put forward similar issue, so I guess it should be working as expected before. Is there something wrong with my operation?
I'm having the same issue running the current docker-compose.yml file.
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
name: 'MongoNetworkError'
}]
at Pool.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/topologies/server.js:438:11)
at Pool.emit (events.js:314:20)
at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/pool.js:562:14
at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/pool.js:1009:9
at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/connect.js:32:7
at callback (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/connect.js:280:5)
at Socket.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/connect.js:310:7)
at Object.onceWrapper (events.js:421:26)
at Socket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
/app/bundle/programs/server/node_modules/fibers/future.js:313
throw(ex);
Changing the command doesn't seem to change my results.
Oh, I had to clear the contents of ./data/db ;). Still, docker-file should be updated and the docs here and on the website seem really unmaintained.