The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 26

Unable to install rocketchat server on Centos7

I followed the instructions: Rocket.Chat in CentOS - Rocket.Chat Docs
But after executing this command:
sudo systemctl enable rocketchat && sudo systemctl start rocketchat
about 20 secs later the service fails:
service rocketchat status
Message:

Redirecting to /bin/systemctl status rocketchat.service
● rocketchat.service - The Rocket.Chat server
   Loaded: loaded (/usr/lib/systemd/system/rocketchat.service; enabled; vendor preset: disabled)
   Active: failed (Result: signal) since Tue 2021-10-12 11:25:00 +0330; 1s ago
  Process: 27267 ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js (code=killed, signal=SEGV)
 Main PID: 27267 (code=killed, signal=SEGV)

Oct 12 11:24:51 server.shetabit.ir systemd[1]: Started The Rocket.Chat server.
Oct 12 11:25:00 server.shetabit.ir systemd[1]: rocketchat.service: main process exited, code=killed, status=11/SEGV
Oct 12 11:25:00 server.shetabit.ir systemd[1]: Unit rocketchat.service entered failed state.
Oct 12 11:25:00 server.shetabit.ir systemd[1]: rocketchat.service failed.

I see some relevant logs but they are old. I’m not sure if it’s the reason.

Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: ## There is an issue with `node-fibers` ##
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: `/opt/Rocket.Chat/programs/server/node_modules/fibers/bin/linux-x64-72-glibc
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: Try running this to fix the issue: /usr/local/bin/node /opt/Rocket.Chat/prog
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: Error: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Module.load (internal/modules/cjs/loader.js:985:32)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Module.Mp.load (/opt/Rocket.Chat/programs/server/runtime.js:15:31)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Function.Module._load (internal/modules/cjs/loader.js:878:14)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Module.require (internal/modules/cjs/loader.js:1025:19)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at require (internal/modules/cjs/helpers.js:72:18)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Object.<anonymous> (/opt/Rocket.Chat/programs/server/node_modules/fibers/
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Module._compile (internal/modules/cjs/loader.js:1137:30)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Module.Mp._compile (/opt/Rocket.Chat/programs/server/runtime.js:50:23)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: /opt/Rocket.Chat/programs/server/node_modules/fibers/fibers.js:23
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: throw new Error('Missing binary. See message above.');
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: ^
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: Error: Missing binary. See message above.
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Object.<anonymous> (/opt/Rocket.Chat/programs/server/node_modules/fibers/
Oct 12 10:05:27 server.shetabit.ir rocketchat[26276]: at Module._compile (internal/modules/cjs/loader.js:1137:30)

I am facing similar problem too on my CentOS7:
● rocketchat.service - The Rocket.Chat server
Loaded: loaded (/usr/lib/systemd/system/rocketchat.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2021-10-13 17:15:51 +08; 2min 17s ago
Process: 12618 ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js (code=exited, status=1/FAILURE)
Main PID: 12618 (code=exited, status=1/FAILURE)

If this is the same problem, I hope someone can help us.

Thanks.

Hi @yee and @12parsa !

I am afraid that this doc was created against an older version of Rocket.Chat (3.9.0) and may not work as expect for latest version (4.0.0).

We are reviewing all the deployment methods, and will eventually review this one.

However…, this may take some time.

Do you guys have some hard prerequisite for it to be installed at CENTOS directly or can use docker?

I’ll ping @debdut.chakraborty here as he is the one that knows a lot about deployment.

Thank you so much. For me, I can go for Docker if this is the tested option. Can you advise the Doc LINK?

Actually, I wanted to do Meteor build from the source code, however, I facing lots of issues. I posted in another Topic about this.

Here you have it:

Bear in mind that latest versions of Rocket.Chat (4.X) deprecates mongo version 4.X and older.

This docker-compose.yml is not with mongo 4.2> right now (it will be soon: Chore: update compose file by debdutdeb · Pull Request #23426 · RocketChat/Rocket.Chat · GitHub)

The migration from mongo 4.0 to mongo 4.2 require some steps https://docs.rocket.chat/quick-start/installing-and-updating/manual-installation/mongodb-mmap-to-wiredtiger-migration

So you can either change the docker-compose yourself, changing the mongo version to 4.2, removing the --smallfiles flag, and changing the storage engine to wiredtiger, or use it as it is, knowing that you will have to do this migration sometime in the future and will receive some deprecation warnings along the way.

if you want to dev Rocket.Chat with us, you can follow this steps https://developer.rocket.chat/quick-start/choosing-a-development-host/linux

Also, you are more than welcome to hang out at our #dev channel:

happy rocking :slight_smile:

Thanks a lot.

I managed to run a Docker. I am using Mongo 4.0 for now, it is fine with me:
mongo:
image: mongo:4.0
restart: unless-stopped
volumes:
- ./data/db:/data/db
#- ./data/dump:/dump
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1

My next question is, how am I configure the Mobile Reactnative code to connect to this Docket server? Appreciate your help.

Thanks.

Hi!

For that, you will need to expose your Rocket.Chat server with an SSL connection, using NGINX or Apache as a reverse-proxy (or traefik, caddy, etc)

This is how you do it with apache or nginx

I am not sure, but SSL will only not be required if the server is at the same network as the device.

After all that, you can install our App already published at Google Play and Apple Store, and point it at your server.

IF you are willing to whitelabel your app (build and publish it youself), you can do it following this doc:

Let me know if you have any other doubts!

Happy Rocking :slight_smile:

Truly thankful for your prompt advice.

I will do the White Labelling first, then come back to setting up the SSL.

I have followed every single steps in the Mobile App White Labelling page, but I failed to build the iOS App. Any idea of these errors below?

I have built errors:

** BUILD FAILED **

The following build commands failed:
ValidateEmbeddedBinary /Users/christan/Library/Developer/Xcode/DerivedData/RocketChatRN-gbsjedfydysoqncxnhisrmnffatq/Build/Products/Debug-iphonesimulator/Rocket.Chat\ Experimental.app/PlugIns/ShareRocketChatRN.appex
ValidateEmbeddedBinary /Users/christan/Library/Developer/Xcode/DerivedData/RocketChatRN-gbsjedfydysoqncxnhisrmnffatq/Build/Products/Debug-iphonesimulator/Rocket.Chat\ Experimental.app/PlugIns/NotificationService.appex
(2 failures)