Newb in need of assistance

Description

Complete newb who has been struggling to set up Rocket.Chat for my gaming group. I am looking for guidance for of all things editing my .env file. I’ve been looking for step by step / idiot proof instructions. I am setting it up on Docker for Windows, docker is set up as is MongoDB. I need guidance for of all things how to edit the .env file as it crashes every time I start it and can’t edit it unless it’s up.

Server Setup Information

  • Version of Rocket.Chat Server: Latest version as of 2023-12-18
  • Operating System: Windows 10 Pro
  • Deployment Method: <!-- docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: don’t know
  • NodeJS Version: promise_server.js:218
  • MongoDB Version: 5.0 on Ubuntu
  • Proxy:
  • Firewalls involved:

Any additional Information

I’d love an idiot proof guide.

I got it sorted this morning with a docker cp command. Hopefully this works now.

Not resolved.

I got the .env file added so that is positive but it still isn’t running.

This is the result of the latest unsuccessful run:

2023-12-22 19:41:41 /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:218
2023-12-22 19:41:41 throw error;
2023-12-22 19:41:41 ^
2023-12-22 19:41:41
2023-12-22 19:41:41 MongoServerSelectionError: getaddrinfo ENOTFOUND db
2023-12-22 19:41:41 at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/sdam/topology.js:292:38)
2023-12-22 19:41:41 at listOnTimeout (internal/timers.js:557:17)
2023-12-22 19:41:41 at processTimers (internal/timers.js:500:7)
2023-12-22 19:41:41 => awaited here:
2023-12-22 19:41:41 at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
2023-12-22 19:41:41 at new MongoConnection (packages/mongo/mongo_driver.js:213:11)
2023-12-22 19:41:41 at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:9:16)
2023-12-22 19:41:41 at Object. (packages/mongo/remote_collection_driver.js:66:18)
2023-12-22 19:41:41 at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
2023-12-22 19:41:41 at new Collection (packages/mongo/collection.js:127:40)
2023-12-22 19:41:41 at AccountsServer._initializeCollection (packages/accounts-base/accounts_common.js:98:20)
2023-12-22 19:41:41 at new AccountsCommon (packages/accounts-base/accounts_common.js:46:23)
2023-12-22 19:41:41 at new AccountsServer (packages/accounts-base/accounts_server.js:30:5)
2023-12-22 19:41:41 at packages/accounts-base/server_main.js:7:12
2023-12-22 19:41:41 at module (packages/accounts-base/server_main.js:19:31)
2023-12-22 19:41:41 at fileEvaluate (packages/modules-runtime.js:336:7)
2023-12-22 19:41:41 at Module.require (packages/modules-runtime.js:238:14)
2023-12-22 19:41:41 at require (packages/modules-runtime.js:258:21)
2023-12-22 19:41:41 at /app/bundle/programs/server/packages/accounts-base.js:2219:15
2023-12-22 19:41:41 at /app/bundle/programs/server/packages/accounts-base.js:2226:3 {
2023-12-22 19:41:41 reason: TopologyDescription {
2023-12-22 19:41:41 type: ‘Unknown’,
2023-12-22 19:41:41 servers: Map(1) {
2023-12-22 19:41:41 ‘db:27017’ => ServerDescription {
2023-12-22 19:41:41 address: ‘db:27017’,
2023-12-22 19:41:41 type: ‘Unknown’,
2023-12-22 19:41:41 hosts: ,
2023-12-22 19:41:41 passives: ,
2023-12-22 19:41:41 arbiters: ,
2023-12-22 19:41:41 tags: {},
2023-12-22 19:41:41 minWireVersion: 0,
2023-12-22 19:41:41 maxWireVersion: 0,
2023-12-22 19:41:41 roundTripTime: -1,
2023-12-22 19:41:41 lastUpdateTime: 41942901,
2023-12-22 19:41:41 lastWriteDate: 0,
2023-12-22 19:41:41 error: MongoNetworkError: getaddrinfo ENOTFOUND db
2023-12-22 19:41:41 at connectionFailureError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connect.js:387:20)
2023-12-22 19:41:41 at Socket. (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connect.js:310:22)
2023-12-22 19:41:41 at Object.onceWrapper (events.js:520:26)
2023-12-22 19:41:41 at Socket.emit (events.js:400:28)
2023-12-22 19:41:41 at emitErrorNT (internal/streams/destroy.js:106:8)
2023-12-22 19:41:41 at emitErrorCloseNT (internal/streams/destroy.js:74:3)
2023-12-22 19:41:41 at processTicksAndRejections (internal/process/task_queues.js:82:21) {
2023-12-22 19:41:41 cause: Error: getaddrinfo ENOTFOUND db
2023-12-22 19:41:41 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
2023-12-22 19:41:41 errno: -3008,
2023-12-22 19:41:41 code: ‘ENOTFOUND’,
2023-12-22 19:41:41 syscall: ‘getaddrinfo’,
2023-12-22 19:41:41 hostname: ‘db’
2023-12-22 19:41:41 },
2023-12-22 19:41:41 [Symbol(errorLabels)]: Set(1) { ‘ResetPool’ }
2023-12-22 19:41:41 },
2023-12-22 19:41:41 topologyVersion: null,
2023-12-22 19:41:41 setName: null,
2023-12-22 19:41:41 setVersion: null,
2023-12-22 19:41:41 electionId: null,
2023-12-22 19:41:41 logicalSessionTimeoutMinutes: null,
2023-12-22 19:41:41 primary: null,
2023-12-22 19:41:41 me: null,
2023-12-22 19:41:41 ‘$clusterTime’: null
2023-12-22 19:41:41 }
2023-12-22 19:41:41 },
2023-12-22 19:41:41 stale: false,
2023-12-22 19:41:41 compatible: true,
2023-12-22 19:41:41 heartbeatFrequencyMS: 10000,
2023-12-22 19:41:41 localThresholdMS: 15,
2023-12-22 19:41:41 setName: null,
2023-12-22 19:41:41 maxElectionId: null,
2023-12-22 19:41:41 maxSetVersion: null,
2023-12-22 19:41:41 commonWireVersion: 0,
2023-12-22 19:41:41 logicalSessionTimeoutMinutes: null
2023-12-22 19:41:41 },
2023-12-22 19:41:41 code: undefined,
2023-12-22 19:41:41 [Symbol(errorLabels)]: Set(0) {}
2023-12-22 19:41:41 }
2023-12-23 09:18:36 /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:218
2023-12-23 09:18:36 throw error;
2023-12-23 09:18:36 ^
2023-12-23 09:18:36
2023-12-23 09:18:36 MongoServerSelectionError: getaddrinfo ENOTFOUND db
2023-12-23 09:18:36 at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/sdam/topology.js:292:38)
2023-12-23 09:18:36 at listOnTimeout (internal/timers.js:557:17)
2023-12-23 09:18:36 at processTimers (internal/timers.js:500:7)
2023-12-23 09:18:36 => awaited here:
2023-12-23 09:18:36 at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
2023-12-23 09:18:36 at new MongoConnection (packages/mongo/mongo_driver.js:213:11)
2023-12-23 09:18:36 at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:9:16)
2023-12-23 09:18:36 at Object. (packages/mongo/remote_collection_driver.js:66:18)
2023-12-23 09:18:36 at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
2023-12-23 09:18:36 at new Collection (packages/mongo/collection.js:127:40)
2023-12-23 09:18:36 at AccountsServer._initializeCollection (packages/accounts-base/accounts_common.js:98:20)
2023-12-23 09:18:36 at new AccountsCommon (packages/accounts-base/accounts_common.js:46:23)
2023-12-23 09:18:36 at new AccountsServer (packages/accounts-base/accounts_server.js:30:5)
2023-12-23 09:18:36 at packages/accounts-base/server_main.js:7:12
2023-12-23 09:18:36 at module (packages/accounts-base/server_main.js:19:31)
2023-12-23 09:18:36 at fileEvaluate (packages/modules-runtime.js:336:7)
2023-12-23 09:18:36 at Module.require (packages/modules-runtime.js:238:14)
2023-12-23 09:18:36 at require (packages/modules-runtime.js:258:21)
2023-12-23 09:18:36 at /app/bundle/programs/server/packages/accounts-base.js:2219:15
2023-12-23 09:18:36 at /app/bundle/programs/server/packages/accounts-base.js:2226:3 {
2023-12-23 09:18:36 reason: TopologyDescription {
2023-12-23 09:18:36 type: ‘Unknown’,
2023-12-23 09:18:36 servers: Map(1) {
2023-12-23 09:18:36 ‘db:27017’ => ServerDescription {
2023-12-23 09:18:36 address: ‘db:27017’,
2023-12-23 09:18:36 type: ‘Unknown’,
2023-12-23 09:18:36 hosts: ,
2023-12-23 09:18:36 passives: ,
2023-12-23 09:18:36 arbiters: ,
2023-12-23 09:18:36 tags: {},
2023-12-23 09:18:36 minWireVersion: 0,
2023-12-23 09:18:36 maxWireVersion: 0,
2023-12-23 09:18:36 roundTripTime: -1,
2023-12-23 09:18:36 lastUpdateTime: 90959507,
2023-12-23 09:18:36 lastWriteDate: 0,
2023-12-23 09:18:36 error: MongoNetworkError: getaddrinfo ENOTFOUND db
2023-12-23 09:18:36 at connectionFailureError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connect.js:387:20)
2023-12-23 09:18:36 at Socket. (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connect.js:310:22)
2023-12-23 09:18:36 at Object.onceWrapper (events.js:520:26)
2023-12-23 09:18:36 at Socket.emit (events.js:400:28)
2023-12-23 09:18:36 at emitErrorNT (internal/streams/destroy.js:106:8)
2023-12-23 09:18:36 at emitErrorCloseNT (internal/streams/destroy.js:74:3)
2023-12-23 09:18:36 at processTicksAndRejections (internal/process/task_queues.js:82:21) {
2023-12-23 09:18:36 cause: Error: getaddrinfo ENOTFOUND db
2023-12-23 09:18:36 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
2023-12-23 09:18:36 errno: -3008,
2023-12-23 09:18:36 code: ‘ENOTFOUND’,
2023-12-23 09:18:36 syscall: ‘getaddrinfo’,
2023-12-23 09:18:36 hostname: ‘db’
2023-12-23 09:18:36 },
2023-12-23 09:18:36 [Symbol(errorLabels)]: Set(1) { ‘ResetPool’ }
2023-12-23 09:18:36 },
2023-12-23 09:18:36 topologyVersion: null,
2023-12-23 09:18:36 setName: null,
2023-12-23 09:18:36 setVersion: null,
2023-12-23 09:18:36 electionId: null,
2023-12-23 09:18:36 logicalSessionTimeoutMinutes: null,
2023-12-23 09:18:36 primary: null,
2023-12-23 09:18:36 me: null,
2023-12-23 09:18:36 ‘$clusterTime’: null
2023-12-23 09:18:36 }
2023-12-23 09:18:36 },
2023-12-23 09:18:36 stale: false,
2023-12-23 09:18:36 compatible: true,
2023-12-23 09:18:36 heartbeatFrequencyMS: 10000,
2023-12-23 09:18:36 localThresholdMS: 15,
2023-12-23 09:18:36 setName: null,
2023-12-23 09:18:36 maxElectionId: null,
2023-12-23 09:18:36 maxSetVersion: null,
2023-12-23 09:18:36 commonWireVersion: 0,
2023-12-23 09:18:36 logicalSessionTimeoutMinutes: null
2023-12-23 09:18:36 },
2023-12-23 09:18:36 code: undefined,
2023-12-23 09:18:36 [Symbol(errorLabels)]: Set(0) {}
2023-12-23 09:18:36 }

As well, I am wondering if there is a way I need to commit the changes as in my docker instance it shows the added .env as added and the root as changed.

I’ve isolated the issue down to the connection to MongoDB.

Mongo is up and running.

This is the section of the .env that applies

MongoDB endpoint (include ?replicaSet= parameter)

MONGO_URL=mongodb://172.17.0.2:27017/?replicaSet=repl1

MongoDB endpoint to the local database

MONGO_OPLOG_URL=mongodb://172.17.0.2:27017/

But from the error it doesn’t seem to see the db.

2023-12-23 09:18:36 error: MongoNetworkError: getaddrinfo ENOTFOUND db

Ok tracked down that problem - it is with MongoDB. Not sure how it came up with that IP, but now I have to change it to something in range.

so that IP was in the hosts file of the MongoDb now I need to figure out (remember) how to change the hosts file.

(Sorry if this seems really basic but I had a stroke 3 years ago and am trying to re-establish my skills)