RocketChat / Docker.Official.Image

Docker hub - community managed image
291 stars 217 forks source link

Latest develop image does not respect MONGO_URL variable #165

Closed bkraul closed 2 years ago

bkraul commented 2 years ago

The latest develop image (git hash 8158bee) doesn't seem to be respecting the MONGO_URL variable. As a result, it tries to find the database on localhost, and it fails with the following error:

A previous develop image (git hash 4f390d7) does not seem to have this problem.

rocketchat_1          | /app/bundle/programs/server/node_modules/fibers/future.js:313
rocketchat_1          |                                                 throw(ex);
rocketchat_1          |                                                 ^
rocketchat_1          |
rocketchat_1          | MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
rocketchat_1          |     at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/sdam/topology.js:312:38)
rocketchat_1          |     at listOnTimeout (internal/timers.js:557:17)
rocketchat_1          |     at processTimers (internal/timers.js:500:7) {
rocketchat_1          |   reason: TopologyDescription {
rocketchat_1          |     type: 'ReplicaSetNoPrimary',
rocketchat_1          |     servers: Map(1) {
rocketchat_1          |       'localhost:27017' => ServerDescription {
rocketchat_1          |         _hostAddress: HostAddress { isIPv6: false, host: 'localhost', port: 27017 },
rocketchat_1          |         address: 'localhost:27017',
rocketchat_1          |         type: 'Unknown',
rocketchat_1          |         hosts: [],
rocketchat_1          |         passives: [],
rocketchat_1          |         arbiters: [],
rocketchat_1          |         tags: {},
rocketchat_1          |         minWireVersion: 0,
rocketchat_1          |         maxWireVersion: 0,
rocketchat_1          |         roundTripTime: -1,
rocketchat_1          |         lastUpdateTime: 1584242409,
rocketchat_1          |         lastWriteDate: 0,
rocketchat_1          |         error: MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
rocketchat_1          |             at connectionFailureError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connect.js:381:20)
rocketchat_1          |             at Socket.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connect.js:301:22)
rocketchat_1          |             at Object.onceWrapper (events.js:520:26)
rocketchat_1          |             at Socket.emit (events.js:400:28)
rocketchat_1          |             at emitErrorNT (internal/streams/destroy.js:106:8)
rocketchat_1          |             at emitErrorCloseNT (internal/streams/destroy.js:74:3)
rocketchat_1          |             at processTicksAndRejections (internal/process/task_queues.js:82:21)
rocketchat_1          |       }
rocketchat_1          |     },
bkraul commented 2 years ago

Turned out to be a monogo/node.js issue. Documented my own solution here

cutzenfriend commented 2 years ago

This issue is also a problem in 5.0.0 Production Image and should be reopened!