Cant Start Rocket.Chat Service or MongoDB

Description

Server Setup Information

  • Version of Rocket.Chat Server: 3.6
  • Operating System: Ubuntu 20.04
  • Deployment Method:
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version: 4.0.19

Hi, after a unclean restart of my vm iam not able to run Rocket.Chat
The Rocket.Chat Service generally runs but Mongo is not avaible:

administrator@vm01:/etc$ sudo service snap.rocketchat-server.rocketchat-server status
● snap.rocketchat-server.rocketchat-server.service - Service for snap application rocketchat-server.rocketchat-server
Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-server.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-09-21 18:22:35 CEST; 1min 3s ago
Main PID: 23748 (startRocketChat)
Tasks: 2 (limit: 2178)
Memory: 3.0M
CGroup: /system.slice/snap.rocketchat-server.rocketchat-server.service
├─23748 /bin/bash /snap/rocketchat-server/1440/bin/startRocketChat
└─24019 sleep 25

Sep 21 18:22:35 vm01 systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
Sep 21 18:22:35 vm01 rocketchat-server.rocketchat-server[23748]: Mongo is not available, can’t start. Waiting 10 seconds and trying again
Sep 21 18:22:45 vm01 rocketchat-server.rocketchat-server[23748]: Mongo is not available, can’t start. Waiting 15 seconds and trying again
Sep 21 18:23:00 vm01 rocketchat-server.rocketchat-server[23748]: Mongo is not available, can’t start. Waiting 20 seconds and trying again
Sep 21 18:23:20 vm01 rocketchat-server.rocketchat-server[23748]: Mongo is not available, can’t start. Waiting 25 seconds and trying again

If i check MongoDB or want to start i get this:

administrator@vm01:/etc$ sudo service snap.rocketchat-server.rocketchat-mongo status
● snap.rocketchat-server.rocketchat-mongo.service - Service for snap application rocketchat-server.rocketchat-mongo
Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-mongo.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-09-21 17:27:18 CEST; 58min ago
Process: 6011 ExecStart=/usr/bin/snap run rocketchat-server.rocketchat-mongo (code=exited, status=48)
Main PID: 6011 (code=exited, status=48)
Sep 21 17:27:18 vm01 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Scheduled restart job, restart counter is at 5.
Sep 21 17:27:18 vm01 systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-mongo.
Sep 21 17:27:18 vm01 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Start request repeated too quickly.
Sep 21 17:27:18 vm01 systemd[1]: snap.rocketchat-server.rocketchat-mongo.service: Failed with result ‘exit-code’.
Sep 21 17:27:18 vm01 systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-mongo.

If i try to look at the db i get this:
administrator@vm01:/etc$ mongo
MongoDB shell version v4.0.19
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
Implicit session: session { “id” : UUID(“d79ef0dd-4edf-4056-95b2-629105b64716”) }
MongoDB server version: 4.0.19
Welcome to the MongoDB shell.
For interactive help, type “help”.
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2020-09-21T17:19:57.194+0200 I STORAGE [initandlisten]
2020-09-21T17:19:57.194+0200 I STORAGE [initandlisten] ** WARNING: Support for MMAPV1 storage engine has been deprecated and will be
2020-09-21T17:19:57.195+0200 I STORAGE [initandlisten] ** removed in version 4.2. Please plan to migrate to the wiredTiger
2020-09-21T17:19:57.195+0200 I STORAGE [initandlisten] ** storage engine.
2020-09-21T17:19:57.195+0200 I STORAGE [initandlisten]
2020-09-21T17:19:57.344+0200 I CONTROL [initandlisten]
2020-09-21T17:19:57.344+0200 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2020-09-21T17:19:57.344+0200 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2020-09-21T17:19:57.344+0200 I CONTROL [initandlisten]
Enable MongoDB’s free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).

The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.

To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()


show dbs
2020-09-21T18:26:25.677+0200 E QUERY [js] Error: listDatabases failed:{
“operationTime” : Timestamp(0, 0),
“ok” : 0,
“errmsg” : “not master and slaveOk=false”,
“code” : 13435,
“codeName” : “NotMasterNoSlaveOk”,
“$clusterTime” : {
“clusterTime” : Timestamp(0, 0),
“signature” : {
“hash” : BinData(0,“AAAAAAAAAAAAAAAAAAAAAAAAAAA=”),
“keyId” : NumberLong(0)
}
}
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
Mongo.prototype.getDBs@src/mongo/shell/mongo.js:139:1
shellHelper.show@src/mongo/shell/utils.js:882:13
shellHelper@src/mongo/shell/utils.js:766:15
@(shellhelp2):1:1

Maybe someone can help me, i am not that Linux Pro.
I hope that the database is not broken or something like this…

Seems that MongoD runs and blocked the Socket.
I stopped MongoD, Rocketchat & Caddy.

sudo service snap.rocketchat-server.rocketchat-server start
sudo service snap.rocketchat-server.rocketchat-mongo start
sudo service snap.rocketchat-server.rocketchat-caddy start

Im happy and weird because yesterday that didn’t work :smiley:
But it looks like it work and i have no dataloss.

1 Like