RocketChat / RocketChat/Rocket.Chat

Snap: Startup failure due to MongoDB's real spinup time

Open
#14,384 0 comments 0 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

Description:

Snap: RocketChat startup timings -> not really waiting for MongoDB

Steps to reproduce:

MongoDB writes PID-File, but needs more time to really startup

Mai 05 03:00:41 rocket rocketchat-server.rocketchat-mongo[685]: 2019-05-05T03:00:41.688+0200 I CONTROL [initandlisten] MongoDB starting : pid=788 port=27017 dbpath=/var/snap/rocketchat-server/common 64-bit host=rocket

Mai 05 03:01:19 rocket rocketchat-server.rocketchat-mongo[685]: 2019-05-05T03:01:19.423+0200 I REPL [rsSync] transition to primary complete; database writes are now permitted

RC's Snap Startup Script startRocketChat waits only for PID, but not if a connection could made up, resulting in:

startup_log.txt

Expected behavior:

RC should really wait for MongoDB-Connection.

Actual behavior:

RC does not start.

Server Setup Information:
  • Version of Rocket.Chat Server: 0.74.3
  • Operating System: Debian 9.9
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: 1
  • NodeJS Version: 8.11.3 - x64
  • MongoDB Version: 3.2.7

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 .snapcraft/resources/startRocketChat and compare its startup checks with the MongoDB log timings in the issue. Reproduce the snap startup sequence using the provided startup log and verify that Rocket.Chat starts only after MongoDB accepts connections, not merely after its PID file appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.