Rocket.Chat - SLACK alternative (with MongoDB as backend)

Docker Rocket.Chat - SLACK alternative (with MongoDB as backend)

Currently reading
Docker Rocket.Chat - SLACK alternative (with MongoDB as backend)

14
0
NAS
Synology DS218+
can you show me the exact error from the log? The one saying "failed to connect to server db:2017

2019-08-24 14:48:45,stdout,MongoNetworkError: failed to connect to server [db:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.17.0.2:27017]
 

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
172.17.0.2 is your NAS local static ip?
 
14
0
NAS
Synology DS218+
No, its IP is this : 192.168.86.25

Here's a screenshot of the Docker network panel, I don't get why it shows this IP.

At the launch of the containers should I have specified to pick the same IP as Docker Host instead of bridge?
 

Attachments

  • Capture d’écran 2019-08-24 à 16.10.13.png
    Capture d’écran 2019-08-24 à 16.10.13.png
    170.6 KB · Views: 50
  • Capture d’écran 2019-08-24 à 16.12.39.png
    Capture d’écran 2019-08-24 à 16.12.39.png
    111.9 KB · Views: 54

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
well that explains it... its targeting your Mongo docker internal IP on port 27017 and there is nothing there. This could mean 2 things. That RC is not mapped correctly to mongo container using the "Links" tab, or that mongo db is not running as it should.

Can you use your computer and try a telnet command: telnet 192.168.86.25 27017? If you get a black screen then mongo is running on that port on your NAS. If that is the case then we are back to the problems that I just wrote about.

Double check that mongodb is running, and try and reconfigure again your RC container with "links" options to mongo container.

If nothing else works, change RC variables (mongo_url and mongo_oplog_url) and instead of mongodb://root:[email protected]:27017/db?authSource=admin set it as mongodb://root:[email protected]:27017/db?authSource=admin
 

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Here's a screenshot of the Docker network panel, I don't get why it shows this IP.

At the launch of the containers should I have specified to pick the same IP as Docker Host instead of bridge?
This is fine. That's why I asked. Leave that bridge network as it is.
 
14
0
NAS
Synology DS218+
well that explains it... its targeting your Mongo docker internal IP on port 27017 and there is nothing there. This could mean 2 things. That RC is not mapped correctly to mongo container using the "Links" tab, or that mongo db is not running as it should.

Can you use your computer and try a telnet command: telnet 192.168.86.25 27017? If you get a black screen then mongo is running on that port on your NAS. If that is the case then we are back to the problems that I just wrote about.

Double check that mongodb is running, and try and reconfigure again your RC container with "links" options to mongo container.

If nothing else works, change RC variables (mongo_url and mongo_oplog_url) and instead of mongodb://root:[email protected]:27017/db?authSource=admin set it as mongodb://root:[email protected]:27017/db?authSource=admin

Telnet returns this :

amine$ telnet 192.168.86.25 27017?
192.168.86.25: nodename nor servname provided, or not known

Changing the RC variables doesn't do anything.I attached both logs from mongo and RC. Thank you again!

Mongo log :mongo.csv
RC log :rocket.chat-2.csv
 

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Telnet command without ? at the end. That was just the end of a sentence that had a ? mark on the end.
 

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Telnet returns this :

amine$ telnet 192.168.86.25 27017?
192.168.86.25: nodename nor servname provided, or not known

Changing the RC variables doesn't do anything.I attached both logs from mongo and RC. Thank you again!

Mongo log :mongo.csv
RC log :rocket.chat-2.csv
From the logs its reporting again problem with RC talking to your mongoDB container. Make sure that the DB is running on that port and try the telnet command again. You need be sure that mongo DB is broadcasting on your network.
 
14
0
NAS
Synology DS218+
From the logs its reporting again problem with RC talking to your mongoDB container. Make sure that the DB is running on that port and try the telnet command again. You need be sure that mongo DB is broadcasting on your network.

It says connection is refused.
 

Attachments

  • Capture d’écran 2019-08-24 à 16.38.03.png
    Capture d’écran 2019-08-24 à 16.38.03.png
    47.5 KB · Views: 39

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
That means that mongo is not visible on the network on that port. Show me mongoDB continer port mappings
 

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Aaa thats the problem. You need to set the Auto value to the same port number. Atm your mongoDB is broadcasting on a custom port and not on 27017. So configure both sides with same port number. I can see that you have also left RocketChat port on auto. Set it to 3000 as well, considering thats the values that you have set in the enviromental variable.
 
14
0
NAS
Synology DS218+
I got telnet to connect successfully to mongodb but when launching RC it still stops.
Here's the new log, I still have faith :)
 

Attachments

  • Capture d’écran 2019-08-24 à 16.47.48.png
    Capture d’écran 2019-08-24 à 16.47.48.png
    127.2 KB · Views: 47
14
0
NAS
Synology DS218+
It works! Thank you Rusty for your patience and your help. Next step, is getting it to work with a domain name with reverse proxy.
 

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
It works! Thank you Rusty for your patience and your help. Next step, is getting it to work with a domain name with reverse proxy.
Well thats simple. Just follow the other guide and you will be off in matter of minutes.
 
163
40
Hi,
Thanks for the great tutorial! I have manage to install Rocket.Chat successful for testing purpose.
So far everything went smooth and is working.

But I have notice that the mounted /data/db folder is empty Is this normal? Or this I missed (miss-configured) something?
 

Rusty

Moderator
NAS Support
4,098
1,179
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
But I have notice that the mounted /data/db folder is empty Is this normal? Or this I missed (miss-configured) something?
I have no mapping to RC, just mongoDB, thats where the data is.
 
163
40
I have no mapping to RC, just mongoDB, thats where the data is.
That's what I meant the data/db folder of MongoDB
Volume:
/your/local/folder/mongodb:/data/db (This is still empty?)
/your/local/folder/mongodb/mongod.conf:/etc/mongod.conf
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top