RocketChat / RocketChat/Rocket.Chat
Exception in setInterval callback: MongoServerSelectionError: connection timed out while Deploying on AWS
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
i am deploying the rocketchat on aws ec2 instance . DOcker images are running but when i check the logs i am getting this error
Server Setup Information:
- Version of Rocket.Chat Server: 5.0.3
- Operating System: linux
- Deployment Method: docker
- DB Replicaset Oplog: - MONGO_OPLOG_URL=mongodb://mongo:27017/local
- NodeJS Version: 14.19.3 - x64
- MongoDB Version:4.0.28
Relevant logs:
Exception in setInterval callback: MongoServerSelectionError: connection closed
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) { 'mongo:27017' => [ServerDescription] },
rocketchat_1 | stale: false,
rocketchat_1 | compatible: true,
rocketchat_1 | heartbeatFrequencyMS: 10000,
rocketchat_1 | localThresholdMS: 15,
rocketchat_1 | setName: 'rs0',
rocketchat_1 | maxSetVersion: 2,
rocketchat_1 | maxElectionId: new ObjectId("7fffffff0000000000000005"),
rocketchat_1 | commonWireVersion: 7,
rocketchat_1 | logicalSessionTimeoutMinutes: undefined
rocketchat_1 | }
rocketchat_1 | }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Docker deployment and the MONGO_OPLOG_URL configuration, then inspect the MongoDB replica-set logs and container connectivity on the AWS EC2 instance. The issue is done when Rocket.Chat can consistently reach a primary in the rs0 replica set without MongoServerSelectionError timeouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, mongodb, node.js
- Domain
- backend, cloud, databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100