# Trying to set up a collaboration platform for our club in this time of pandemic

**URL:** <https://forums.rocket.chat/t/trying-to-set-up-a-collaboration-platform-for-our-club-in-this-time-of-pandemic/6115>\
**Category:** Community Support\
**Created:** [March 17, 2020, 9:31pm UTC](https://forums.rocket.chat/t/trying-to-set-up-a-collaboration-platform-for-our-club-in-this-time-of-pandemic/6115 "2020-03-17T21:31:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DereckKay](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DereckKay](https://forums.rocket.chat/u/DereckKay)\
**Post date:** [March 17, 2020, 9:31pm UTC](https://forums.rocket.chat/t/trying-to-set-up-a-collaboration-platform-for-our-club-in-this-time-of-pandemic/6115/1 "2020-03-17T21:31:06Z")

</div>

### Description

### Server Setup Information

- Version of Rocket.Chat Server: 3.0.4

- Operating System: Debian 9 Stretch (5.3.18-1-pve)

- Deployment Method: tar

- Number of Running Instances: 1

- DB Replicaset Oplog: (how do I find this ? 🤔 )

- NodeJS Version: v13.11.0

- MongoDB Version: 4.0.16

- Proxy: apache2

- Firewalls involved: IPtables

Hello world ! I am new here, simply trying to get a server organised for our extended family / club of friends, to get through this ‘lockdown’ in Western Europe. I thought it would be nice to have our own (encrypted) video chat server, to maintain social contact 🙂

I installed node + Rocket.chat by following this guide: [https://www.vultr.com/docs/how-to-install-rocket-chat-on-debian-9](https://www.vultr.com/docs/how-to-install-rocket-chat-on-debian-9)  
After that I (tried to) set up the proxy, by making use of the apache2 instance already running on our server by following this page: [https://rocket.chat/docs/installation/manual-installation/configuring-ssl-reverse-proxy/](https://rocket.chat/docs/installation/manual-installation/configuring-ssl-reverse-proxy/)

I do not have nginx installed, so I changed the line in /etc/systemd/system/rocketchat.service from  
After=network.target remote-fs.target nss-lookup.target mongod.target nginx.target  
to  
After=network.target remote-fs.target nss-lookup.target mongod.target apache2.target

When I start the Rocket.chat server by issuing the command ‘systemctl start rocketchat’, I do not get any errors. All seems to be well when I ‘systemctl sttus rocketchat’.

I cannot connect to the server in a browser afterwards: ‘connection timed out’.

I did discover some information in syslog:

> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on #, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on Remove, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on or, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on Replace, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on nginx, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on with, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on your, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:4] Failed to add dependency on proxy, ignoring: Invalid argument  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:8] Failed to parse service restart specifier, ignoring: always # When is set to always, the service will be restarted in any case (hit a timeout, got terminated)  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:9] Failed to parse sec value, ignoring: 15 # If node service crashes, restart the service after 15 seconds  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:10] Failed to parse output specifier, ignoring: syslog # Output to syslog  
> Mar 17 21:18:17 trapper systemd[1]: [/etc/systemd/system/rocketchat.service:11] Failed to parse output specifier, ignoring: syslog # Output to syslog

I also noticed troubles with this ‘meteor’-thing (which I have never used before, tbh), while trying to check if mongo was running ok:

> mongo mongo/meteor --eval “rs.initiate({ \_id: ‘‘rs0’’, members: [{ \_id: 0, host: ‘‘mongo:27017’’ }]})”  
> MongoDB shell version v4.0.16  
> connecting to: mongodb://mongo:27017/meteor?gssapiServiceName=mongodb  
> 2020-03-17T22:38:06.529+0100 E QUERY [js] Error: couldn’t connect to server mongo:27017, connection attempt failed: SocketException: Error connecting to mongo:27017 (134.x.x.5:27017) :: caused by :: Connection timed out :  
> connect@src/mongo/shell/mongo.js:344:17  
> @(connect):2:6  
> exception: connect failed

It seems like mongo wants to connect to ‘localhost’, but somehow this is resolved to an external IP. My /etc/hosts looks like this:

> 127.0.0.1 localhost.localnet localhost  
> ::1 localhost.localnet localhost

I have been looking into this for several hours now and I am ready to abandon my project. As a last resort I turn to the Community here, for help 😃

Thanks in advance for your time !

D

### Any additional Information

Not atm, but please ask me for more !

---

<div class="post-metadata">

**Author:** ![aaron.ogle](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aaron.ogle/32/15_2.png) [@aaron.ogle](https://forums.rocket.chat/u/aaron.ogle)\
**Post date:** [March 18, 2020, 1:39am UTC](https://forums.rocket.chat/t/trying-to-set-up-a-collaboration-platform-for-our-club-in-this-time-of-pandemic/6115/2 "2020-03-18T01:39:49Z")

</div>

It looks like you might have followed a combo of different tutorials. Maybe consider following the debian guide from our documentation?

[https://rocket.chat/docs/installation/manual-installation/debian/](https://rocket.chat/docs/installation/manual-installation/debian/)

the mongo section you have there kinda looks like instructions from a docker install 🙈

---

<div class="post-metadata">

**Author:** ![DereckKay](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DereckKay](https://forums.rocket.chat/u/DereckKay)\
**Post date:** [March 19, 2020, 4:42pm UTC](https://forums.rocket.chat/t/trying-to-set-up-a-collaboration-platform-for-our-club-in-this-time-of-pandemic/6115/3 "2020-03-19T16:42:48Z")

</div>

First of all: thank you very much for your time, Mr Aaron!

I had no idea I was following different tutorials. I should indeed follow the ‘official’ ones first. My apologies 😌

I tried to ‘clean the board’ as much as possible: I purged mongo and node and deleted as many config files as I could remember creating.  
I have not yet figured out how to delete/uninstall/remove this meteor-thing, but I went ahead and followed the tutorial you so kindly pointed me to.

I did get mongod & mongodb up and running, but the rocketchat service errors out after a few seconds.

Please refer to the syslog output for more info:

> Mar 19 16:07:29 escout systemd[1]: rocketchat.service: Failed to reset devices.list: Operation not permitted  
> Mar 19 16:07:36 escout nodejs-example[9115]: /opt/Rocket.Chat/programs/server/node\_modules/fibers/future.js:280  
> Mar 19 16:07:36 escout nodejs-example[9115]: #011#011#011#011#011#011throw(ex);  
> Mar 19 16:07:36 escout nodejs-example[9115]: #011#011#011#011#011#011^  
> Mar 19 16:07:36 escout nodejs-example[9115]: Error: Error: Unable to find Mongodb Oplog. You must run the server with oplog enabled. Try the following:  
> Mar 19 16:07:36 escout nodejs-example[9115]: #011#011#011#0111. Start your mongodb in a replicaset mode: mongod --smallfiles --oplogSize 128 --replSet rs0  
> Mar 19 16:07:36 escout nodejs-example[9115]: #011#011#011#0112. Start the replicaset via mongodb shell: mongo mongo/meteor --eval “rs.initiate({ \_id: ‘‘rs0’’, members: [{ \_id: 0, host: ‘‘localhost:27017’’ }]})”  
> Mar 19 16:07:36 escout nodejs-example[9115]: #011#011#011#0113. Start your instance with OPLOG configuration: export MONGO\_OPLOG\_URL=mongodb://localhost:27017/local MONGO\_URL=mongodb://localhost:27017/meteor node main.js  
> Mar 19 16:07:36 escout nodejs-example[9115]: #011#011#011#011  
> Mar 19 16:07:36 escout nodejs-example[9115]: at BaseDb.handleListener (app/models/server/models/\_BaseDb.js:51:11)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at BaseDb.emit (events.js:210:5)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at BaseDb.EventEmitter.emit (domain.js:475:20)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at \_addListener (events.js:236:14)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at BaseDb.addListener (events.js:284:10)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at new Base (app/models/server/models/\_Base.js:21:12)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at new Settings (app/models/server/models/Settings.js:5:3)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at module (app/models/server/models/Settings.js:243:16)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at fileEvaluate (packages/modules-runtime.js:336:7)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at Module.require (packages/modules-runtime.js:238:14)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at Module.moduleLink [as link] (/opt/Rocket.Chat/programs/server/npm/node\_modules/meteor/modules/node\_modules/reify/lib/runtime/index.js:52:22)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at module (app/settings/server/functions/settings.js:1:251)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at fileEvaluate (packages/modules-runtime.js:336:7)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at Module.require (packages/modules-runtime.js:238:14)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at Module.moduleLink [as link] (/opt/Rocket.Chat/programs/server/npm/node\_modules/meteor/modules/node\_modules/reify/lib/runtime/index.js:52:22)  
> Mar 19 16:07:36 escout nodejs-example[9115]: at module (app/settings/server/index.js:1:60)  
> Mar 19 16:07:36 escout systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE  
> Mar 19 16:07:36 escout systemd[1]: rocketchat.service: Unit entered failed state.  
> Mar 19 16:07:36 escout systemd[1]: rocketchat.service: Failed with result ‘exit-code’.

Thanks again for your time and please let me know if you want me to post other config settings or logs 🤓

---

<div class="post-metadata">

**Author:** ![aaron.ogle](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aaron.ogle/32/15_2.png) [@aaron.ogle](https://forums.rocket.chat/u/aaron.ogle)\
**Post date:** [March 20, 2020, 2:39am UTC](https://forums.rocket.chat/t/trying-to-set-up-a-collaboration-platform-for-our-club-in-this-time-of-pandemic/6115/4 "2020-03-20T02:39:03Z")

</div>

> [@DereckKay](#):
>
> Start the replicaset via mongodb shell: mongo mongo/meteor --eval “rs.initiate({ \_id: ‘‘rs0’’, members: [{ \_id: 0, host: ‘‘localhost:27017’’ }]})”

This makes it look like you hadn’t initialized the mongo replicaset?

---

<div class="post-metadata">

**Author:** ![DereckKay](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DereckKay](https://forums.rocket.chat/u/DereckKay)\
**Post date:** [March 21, 2020, 11:13am UTC](https://forums.rocket.chat/t/trying-to-set-up-a-collaboration-platform-for-our-club-in-this-time-of-pandemic/6115/5 "2020-03-21T11:13:49Z")

</div>

> [@aaron.ogle](#):
>
> rs.initiate({ \_id: ‘‘rs0’’, members: [{ \_id: 0, host: ‘‘localhost:27017’’ }]})

Thank you for your input, Mr Aaron.  
I did as you suggested. Please have a look at my syslog:

> Mar 21 10:17:08 escout systemd[1]: rocketchat.service: Failed to reset devices.list: Operation not permitted  
> Mar 21 10:17:10 escout nodejs-example[20665]: /opt/Rocket.Chat/programs/server/node\_modules/fibers/future.js:313  
> Mar 21 10:17:10 escout nodejs-example[20665]: #011#011#011#011#011#011throw(ex);  
> Mar 21 10:17:10 escout nodejs-example[20665]: #011#011#011#011#011#011^  
> Mar 21 10:17:10 escout nodejs-example[20665]: MongoError: not master and slaveOk=false  
> Mar 21 10:17:10 escout nodejs-example[20665]: at Connection. (/opt/Rocket.Chat/programs/server/npm/node\_modules/meteor/npm-mongo/node\_modules/mongodb-core/lib/connection/pool.js:443:61)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at Connection.emit (events.js:210:5)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at processMessage (/opt/Rocket.Chat/programs/server/npm/node\_modules/meteor/npm-mongo/node\_modules/mongodb-core/lib/connection/connection.js:364:10)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at Socket. (/opt/Rocket.Chat/programs/server/npm/node\_modules/meteor/npm-mongo/node\_modules/mongodb-core/lib/connection/connection.js:533:15)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at Socket.emit (events.js:210:5)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at addChunk (\_stream\_readable.js:309:12)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at readableAddChunk (_stream\_readable.js:290:11)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at Socket.Readable.push (stream\_readable.js:224:10)  
> Mar 21 10:17:10 escout nodejs-example[20665]: at TCP.onStreamRead (internal/stream\_base\_commons.js:182:23) {  
> Mar 21 10:17:10 escout nodejs-example[20665]: operationTime: Timestamp { bsontype: ‘Timestamp’, low: 0, high: 0 },  
> Mar 21 10:17:10 escout nodejs-example[20665]: ok: 0,  
> Mar 21 10:17:10 escout nodejs-example[20665]: errmsg: ‘not master and slaveOk=false’,  
> Mar 21 10:17:10 escout nodejs-example[20665]: code: 13435,  
> Mar 21 10:17:10 escout nodejs-example[20665]: codeName: ‘NotMasterNoSlaveOk’,  
> Mar 21 10:17:10 escout nodejs-example[20665]: ‘$clusterTime’: {  
> Mar 21 10:17:10 escout nodejs-example[20665]: clusterTime: Timestamp { bsontype: ‘Timestamp’, low: 0, high_: 0 },  
> Mar 21 10:17:10 escout nodejs-example[20665]: signature: { hash: [Binary], keyId: 0 }  
> Mar 21 10:17:10 escout nodejs-example[20665]: },  
> Mar 21 10:17:10 escout nodejs-example[20665]: name: ‘MongoError’,  
> Mar 21 10:17:10 escout nodejs-example[20665]: [Symbol(mongoErrorContextSymbol)]: {}  
> Mar 21 10:17:10 escout nodejs-example[20665]: }  
> Mar 21 10:17:10 escout systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE  
> Mar 21 10:17:10 escout systemd[1]: rocketchat.service: Unit entered failed state.  
> Mar 21 10:17:10 escout systemd[1]: rocketchat.service: Failed with result ‘exit-code’.
