RocketChat / RocketChat/Rocket.Chat

Fresh Docker install fail with Error creating users index

Open
#29,199 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Hi, I’m setting up a fresh install on RockyLinux 9 using docker, following instructions here

https://docs.rocket.chat/deploy/prepare-for-your-deployment/rapid-deployment-methods/docker-and-docker-compose

Docker runs fine, but when I access the logs, it show this error. Mongo logs look fine, it is default without password.

{“log”:“\n”,“stream”:“stderr”,“time”:“2023-04-29T09:11:11.012875203Z”}
{“log”:“/app/bundle/programs/server/node_modules/fibers/future.js:313\n”,“stream”:“stderr”,“time”:“2023-04-29T09:11:11.012965221Z”}
{“log”:“\u0009\u0009\u0009\u0009\u0009\u0009throw(ex);\n”,“stream”:“stderr”,“time”:“2023-04-29T09:11:11.012972635Z”}
{“log”:“\u0009\u0009\u0009\u0009\u0009\u0009^\n”,“stream”:“stderr”,“time”:“2023-04-29T09:11:11.012976401Z”}
{“log”:“errorClass [Error]: [An error occurred when creating an index for collection "users: getaddrinfo ENOTFOUND mongodb]\n”,“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261942114Z”}
{“log”:" at Collection.createIndex (packages/mongo/collection.js:801:15)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261962073Z”}
{“log”:" at setupUsersCollection (packages/accounts-base/accounts_server.js:1776:9)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261964983Z”}
{“log”:" at new AccountsServer (packages/accounts-base/accounts_server.js:75:5)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261966848Z”}
{“log”:" at packages/accounts-base/server_main.js:7:12\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261968664Z”}
{“log”:" at module (packages/accounts-base/server_main.js:19:31)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261970389Z”}
{“log”:" at fileEvaluate (packages/modules-runtime.js:336:7)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261972082Z”}
{“log”:" at Module.require (packages/modules-runtime.js:238:14)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261973728Z”}
{“log”:" at require (packages/modules-runtime.js:258:21)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.26197541Z”}
{“log”:" at /app/bundle/programs/server/packages/accounts-base.js:2192:15\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261977166Z”}
{“log”:" at /app/bundle/programs/server/packages/accounts-base.js:2199:3\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261978868Z”}
{“log”:" at /app/bundle/programs/server/boot.js:369:38\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261980515Z”}
{“log”:" at Array.forEach (\u003canonymous\u003e)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261982138Z”}
{“log”:" at /app/bundle/programs/server/boot.js:210:21\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261984149Z”}
{“log”:" at /app/bundle/programs/server/boot.js:423:7\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261985792Z”}
{“log”:" at Function.run (/app/bundle/programs/server/profile.js:256:14)\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261987426Z”}
{“log”:" at /app/bundle/programs/server/boot.js:422:13 {\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261989079Z”}
{“log”:" isClientSafe: true,\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261990717Z”}
{“log”:" error: ‘An error occurred when creating an index for collection "users: getaddrinfo ENOTFOUND mongodb’,\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.26199242Z”}
{“log”:" reason: undefined,\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261994216Z”}
{“log”:" details: undefined,\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261995789Z”}
{“log”:" errorType: ‘Meteor.Error’\n",“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261997398Z”}
{“log”:“}\n”,“stream”:“stderr”,“time”:“2023-04-29T09:11:11.261999022Z”}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Docker deployment instructions linked in the issue and compare them with the reported container setup. Trace the failure from packages/mongo/collection.js:801 through packages/accounts-base/accounts_server.js:1776, using the Mongo logs and the ENOTFOUND mongodb message as the initial evidence. Done means a fresh Docker deployment starts successfully and creates the users index.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mongodb
Domain
backend, databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.