If your server isn’t starting check your mongo logs:
journalctl -u snap.rocketchat-server.rocketchat-mongo
If you encounter an error like:
Nov 5 23:46:25 {} rocketchat-server.rocketchat-mongo[18930]: 2019-11-05T23:46:25.359+0000 F CONTROL [initandlisten] ** IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details.
IMPORTANT: If you do not have the above in your logs. DO NOT FOLLOW BELOW
Instead just wait for it to come up. It does take a while. The database has to update some of the files.
If you have:
UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6;
Then please try:
# Stop Mongo
sudo systemctl stop snap.rocketchat-server.rocketchat-mongo
# Revert version back
snap revert --revision=1416 rocketchat-server
# If that fails run:
snap refresh rocketchat-server --channel stable/migrate-mongo3.2
# Give it a few to start up and then run:
rocketchat-server.mongo --eval "printjson(db.adminCommand ({getParameter: 1, featureCompatibilityVersion: 1}))"
Example of output:
MongoDB shell version v3.4.20 ----> not important
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.20
{ "featureCompatibilityVersion" : "3.2", "ok" : 1 } ------> this is the important part!
# If it outputs 3.2 then run
rocketchat-server.mongo --eval "printjson(db.adminCommand ({ setFeatureCompatibilityVersion: \"3.4\" }))"
# Check again and make sure its 3.4
rocketchat-server.mongo --eval "printjson(db.adminCommand ({getParameter: 1, featureCompatibilityVersion: 1}))"
# Finally then you should be able to refresh back to latest
snap refresh rocketchat-server --channel=stable
Update if you get connection refused check the mongo logs. It’s likely still starting mongo.
journalctl -u snap.rocketchat-server.rocketchat-mongo
If it says any of the above commands aren’t valid try:
export PATH=$PATH:/snap/bin
A few distros it apparently don’t have this automatically added to path
If it’s just not starting but no errors. Give it time to finish starting.