Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from 6.13.1 to 7.0.9 Fails #35708

Open
LeeThompson opened this issue Apr 6, 2025 · 2 comments
Open

Upgrade from 6.13.1 to 7.0.9 Fails #35708

LeeThompson opened this issue Apr 6, 2025 · 2 comments

Comments

@LeeThompson
Copy link

LeeThompson commented Apr 6, 2025

Description:

I'm preparing for our migration from RocketChat 6.13.1 to 7.x. This is problematic since the current machine does not support the AVX instruction set which is required for MongoDB 5.x+. I have a new host for it now and I have a recent (last week) copy of the MongoDB database so I can do a dry run of the migration. That part of the process has been going okay until now.

  1. I upgraded MongoDB from 4.4 to 7.0.18 (not in one jump obviously)
  2. RocketChat 6.13.1 works fine.
  3. MongoDB 7 is set to use the 7.0 Feature Set and works properly. Oplog is enabled.

When I make a new RocketChat 7 container (7.0.9) and start it, I get the following error which is so vague it's useless to me.

MongoTopologyClosedError: Topology is closed
    at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/src/sdam/topology.ts:515:42
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  [Symbol(errorLabels)]: Set(0) {}
}
MongoServerSelectionError: getaddrinfo EAI_AGAIN mongodb
    at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/src/sdam/topology.ts:591:30)
    at listOnTimeout (node:internal/timers:581:17)
    at processTimers (node:internal/timers:519:7) {
  reason: TopologyDescription {
    type: 'ReplicaSetNoPrimary',
    servers: Map(1) { 'mongodb:27017' => [ServerDescription] },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: 'rs0',
    maxElectionId: new ObjectId("7fffffff0000000000000008"),
    maxSetVersion: 2,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: null
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {}
}

packages/core-runtime.js:189
            throw error;
errorClass [Error]: [An error occurred when creating an index for collection "users: Topology is closed]
    at Collection.createIndexAsync (packages/mongo/collection.js:1140:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at module.wrapAsync.self (packages/accounts-password/password_server.js:1107:1) {
  isClientSafe: true,
  error: 'An error occurred when creating an index for collection "users: Topology is closed',
  reason: undefined,
  details: undefined,
  errorType: 'Meteor.Error'
}

Steps to reproduce:

  1. Update MongoDB to 7.0.18
  2. Attempt to update RocketChat from 6.13.1 to 7.0.9

Expected behavior:

I expected it to work.

Actual behavior:

Already covered

Server Setup Information:

  • Version of Rocket.Chat Server: 6.13.1
  • License Type: Community
  • Number of Users: 5
  • Operating System: Debian (Synology DSM 7.2.2)
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 20.17.0
  • MongoDB Version: 7.0.18
@LeeThompson
Copy link
Author

Update: This also occurs with MongoDB 5.0.30 (fresh from a 4.4.6 upgrade).

@LeeThompson
Copy link
Author

This appears to be due to a failure of documenting that RocketChat 7 no longer supports docker --link.

If anyone ends up with this problem:

  1. Put RocketChat and Mongo on the same docker network. It can still be a bridge type (if it is, be sure it allows for intra-container communications.) (RocketChat 6.13.1 and earlier will support Mongo just being linked just fine.)
  2. RocketChat's MongoDB URIs need to use the name of the Mongo container. If you called the Mongo container "MongoDB" then it needs to be mongodb://MongoDB:27017/rocketchat; if you called it "MongoDatabase" then mongodb://MongoDatabase:27017/rocketchat.

I hope this saves someone else hours of work trying to figure this out from a very vague error message. (Worse, in Mongo's log I could see RocketChat 7 actually connecting initially and then failing for some reason. I still don't know why.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant