Hi people!
Config: Raspbian 9.6, Node 8.11.4, Rocketchat 0.73.2
I have been hosting a RocketChat on a distant server from Scaleway using Docker for a while and now i’m trying to host it on a home RaspberryPi running Debian.
I try to do it without Docker so i can learn how this app works better but i’m unable to make it work (with systemd). I followed the documentation for Debian manual installation.
MongoDB seems to run well.
But when i do sudo service rocketchat status
this is the error i have
janv. 12 05:37:19 raspberrypi systemd[1]: Started The Rocket.Chat server.
janv. 12 05:37:22 raspberrypi rocketchat[2465]: /opt/Rocket.Chat/programs/server/node_modules/fibers/future.js:313
janv. 12 05:37:22 raspberrypi systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
janv. 12 05:37:22 raspberrypi systemd[1]: rocketchat.service: Unit entered failed state.
janv. 12 05:37:22 raspberrypi systemd[1]: rocketchat.service: Failed with result 'exit-code'.
After a reboot for example and running sudo service rocketchat start
here is the complete output of status
● rocketchat.service - The Rocket.Chat server
Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-01-12 06:08:35 CET; 1s ago
Process: 1113 ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js (code=exited, status=1/FAILURE)
Main PID: 1113 (code=exited, status=1/FAILURE)
CPU: 3.820s
janv. 12 06:08:35 raspberrypi rocketchat[1113]: /opt/Rocket.Chat/programs/server/node_modules/fibers/future.js:313
janv. 12 06:08:35 raspberrypi rocketchat[1113]: throw(ex);
janv. 12 06:08:35 raspberrypi rocketchat[1113]: ^
janv. 12 06:08:35 raspberrypi rocketchat[1113]: MongoError: Server at localhost:27017 reports wire version 0, but this version of Node.js Driver
janv. 12 06:08:35 raspberrypi rocketchat[1113]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-c
janv. 12 06:08:35 raspberrypi rocketchat[1113]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-c
janv. 12 06:08:35 raspberrypi rocketchat[1113]: at _combinedTickCallback (internal/process/next_tick.js:131:7)
janv. 12 06:08:35 raspberrypi rocketchat[1113]: at process._tickCallback (internal/process/next_tick.js:180:9)
janv. 12 06:08:35 raspberrypi systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
janv. 12 06:08:35 raspberrypi systemd[1]: rocketchat.service: Unit entered failed state.
janv. 12 06:08:35 raspberrypi systemd[1]: rocketchat.service: Failed with result 'exit-code'.
Everytime it points to this file future.js and i don’t know what it is…
@Julianoe What do you see when you do an npm -v
?
npm -v
5.6.0
(FYI i’m trying to migrate from a Scaleway hosted server (running on ubuntu with docker) to a self hosted Raspberry Pi B+. It’s a small instance (~5 users connected simultaneously max, 500mo db backup), i’m trying to do it by any means possible… that’s why i’m running two tests, with bundle manual install or via snap)
There is something funny about the npm
version and perhaps even the nodejs version. I’d expect npm version to be 6.4.1
. Since you reported that you’re using node 8.11.4
. Can you please double check your node version and upgrade npm + node if necessary?
I’ve updated : now is npm (6.5.0), node still (8.11.4)
Then i ran sudo npm install
in the Rocket.Chat/programs/server folder
Here is the output:
pi@raspberrypi:/opt/Rocket.Chat/programs/server $ sudo npm install
npm WARN lifecycle meteor-dev-bundle@~install: cannot run in wd meteor-dev-bundle@ node npm-rebuild.js (wd=/opt/Rocket.Chat/programs/server)
audited 326 packages in 6.249s
found 4 moderate severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
pi@raspberrypi:/opt/Rocket.Chat/programs/server $ sudo npm audit fix
+ node-gyp@3.8.0
added 6 packages from 6 contributors, removed 14 packages and updated 14 packages in 9.626s
fixed 4 of 4 vulnerabilities in 326 scanned packages
When i try to restart the services, the gyp related error is indeed gone.
There is a new one:
● rocketchat.service - The Rocket.Chat server
Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2019-01-13 17:19:28 CET; 3s ago
Process: 4582 ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js (code=exited, status=1/FAILURE)
Main PID: 4582 (code=exited, status=1/FAILURE)
CPU: 3.831s
janv. 13 17:19:28 raspberrypi rocketchat[4582]: throw(ex);
janv. 13 17:19:28 raspberrypi rocketchat[4582]: ^
janv. 13 17:19:28 raspberrypi rocketchat[4582]: MongoError: Server at localhost:27017 reports wire version 0, but this version of Node.js Driver requires at least 2 (MongoDB2.6).
janv. 13 17:19:28 raspberrypi rocketchat[4582]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:438:39
janv. 13 17:19:28 raspberrypi rocketchat[4582]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:532:18
janv. 13 17:19:28 raspberrypi rocketchat[4582]: at _combinedTickCallback (internal/process/next_tick.js:131:7)
janv. 13 17:19:28 raspberrypi rocketchat[4582]: at process._tickCallback (internal/process/next_tick.js:180:9)
janv. 13 17:19:28 raspberrypi systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE
janv. 13 17:19:28 raspberrypi systemd[1]: rocketchat.service: Unit entered failed state.
janv. 13 17:19:28 raspberrypi systemd[1]: rocketchat.service: Failed with result 'exit-code'.
I tried to update MongoDB but it seems there is no version available above the currently installed 2.4.14 for armhf chips… I’m not sure what i could do next?
Yes - that’s a now classic stuck-point
There might be a 3.2 release of MongoDB (unofficial) working on Pi ARMHF - I’ve been trying to determine if it is available from Tom ( universal Meteor maintainer).
I was hoping you might have been on a 64bit version of the OS - where Mongo support is a lot better.
The only other good news is that → if you just go back a few releases of RC —> you’ll notice that they DO NOT require 3.2. If you can live with that / those releases , it should work fine.
Good luck, and please let us know the PATH you choose.