Blank gray page showed after run RocketChat service

Description:

Hi, I Installed latest version of Rocket Chat on my ubuntu 18.04 server, after installed based on RocketChat Doc, a simple gray paged show whit white box centered.

Steps to reproduce:

  1. Run RocketChat service
  2. open web site url in browser

Expected behavior:

Start or welcome page of Rocket Chat with some text box to register user.

Actual behavior:

Showing blank gray page!

Server Setup Information:

  • Version of Rocket.Chat Server: 2.1
  • Operating System: ubuntu 18.04
  • Deployment Method: manual install with tar file
  • Number of Running Instances: 1
  • DB Replicaset Oplog: ReplicaSet OpLog: Enabled
  • NodeJS Version: v8.11.4
  • MongoDB Version: 4.0.12

Additional context

Relevant logs:

sudo systemctl status rocketchat
● rocketchat.service - The Rocket.Chat server
   Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-09-29 09:35:40 +0330; 24min ago
 Main PID: 1671 (node)
    Tasks: 10 (limit: 4632)
   CGroup: /system.slice/rocketchat.service
           └─1671 /usr/local/bin/node /opt/Rocket.Chat/main.js

Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |      MongoDB Version: 4.0.12                      |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |       MongoDB Engine: mmapv1                      |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |             Platform: linux                       |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |         Process Port: 3000                        |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |             Site URL: http://domain:3000/  |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |     ReplicaSet OpLog: Enabled                     |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |          Commit Hash: 92c00dc3c2                  |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |        Commit Branch: HEAD                        |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ |                                                   |
Sep 29 09:36:23 GITLAB-WEB rocketchat[1671]: ➔ +---------------------------------------------------+

I had similar issue where either I get a gray screen like yours or the page keeps clocking forever… Here is what I did after a week of troubleshooting & testing out different scenarios:

  1. First, I see you are running Mongo v4.0.12 - why don’t you upgrade Mongo to latest version: v4.2.0

  2. Change mongDB engine from mmapv1 to wiredTiger. Note: MongoDB no longer support mmapv1 starting on v4.0 - see article link below.

  3. rocketchat.service file was also one of my issues - I removed port 3000 which I had it appended to my domain name, and only kept this parameter:
    Environment=PORT=3000 - see sample of my rockectchat.servie below.

Lastly, make sure you have a forward slash at the end of the your sitename -
exp: Environment=ROOT_URL=https://chat.mysite.com/ <=

Below is the my rockectchat.service I used on my RC setup:

[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target
After=syslog.target

[Service]
Type=simple
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=RocketChat
User=rocketchat
Group=rocketchat
Environment=MONGO_URL=mongodb://localhost:27017/yourDBName?replicaSet=rs01
Environment=MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
Environment=ROOT_URL=https://chat.mysite.com/
Environment=PORT=3000

-Note: below is the path where your RC bundle is move to - you can call it anything you want 
WorkingDirectory=/opt/rcchat/mychat         
ExecStart=/usr/local/bin/node /opt/rcchat/mychat/main.js

[Install]
WantedBy=multi-user.target
  1. I see you used tarball installation - with Mongo, I am sure you had to create your own directories, but the downside, you have to make sure you set the proper permissions which can lead to problems if the permissions are not set properly.

But, if you do Mongo installation via the pacakge manager, all the default directories are created by default with the proper permissions - the is the route I took since I am not an expert with Mongo.

Below is the article from Mongo regarding installation using package manager vs tarballs

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/#configure-the-package-management-system-yum

Article regarding MMAPv1 depricaiton
https://docs.mongodb.com/manual/release-notes/4.0/#deprecate-mmapv1

Hope this helps. I spent a lot of time on this which I don’t mind at all since it is a great learning experience - thought to share some of the challenges I had in hopes some of my solutions can resolve your issues…

-AJ

1 Like

I’d be interested if that changes anything. If you are using any sort of special connections string to mongo this can also cause that. It for sure looks like taking too long to get settings for some reason which is why it’s not showing the login form. Make sure you are running on a machine with enough resources

Thank you so much for your time and for trying to help me.
I did not make any changes to the source code or packages of the software exactly as I followed the steps on the main site.
As you could see below, I think there is enough resources for running services.
image

Does it do this always? Or only under certain load? What happens if from incognito window?

yes it does always, I did not even pass first step and this blank page show after running server for first time. it is same in incognito