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)

4
1
NAS
DS418play
Operating system
  1. Linux
  2. macOS
  3. Windows
Mobile operating system
  1. Android
  2. iOS
@zpoj
Glad you sorted it out. I can see we have the same NAS model, but I still can't make it work. That MONGO_URL is already inside, so I just update it, then I add MONGO_OPLOG_URL and Save.

Always the same error. Can't connect to mongodb.

Can you paste in the related errors from the mongo logs? It sounds like you are skipping the link step in the Rocket.Chat container if it can't connect at all. From the instructions:

Code:
LINKS: your mongoDB container > alias: db

Also check the port is set to 3000:3000 for the Rocket.Chat container. Maybe posting all the env vars from both containers can help us troubleshoot?
 
351
91
NAS
DS418play
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
  2. Windows
Mobile operating system
  1. iOS
Last edited:
It sounds like you are skipping the link step in the Rocket.Chat container if it can't connect at all.
I have a link.

Working with Rusty one-on-one... But still no luck. Not sure what's wrong...


This is from my RC container:
Code:
2020-03-23 21:20:23    stdout    }
2020-03-23 21:20:23    stdout      [[32mSymbol(mongoErrorContextSymbol)[39m]: {}
2020-03-23 21:20:23    stdout      errorLabels: [ [32m'TransientTransactionError'[39m ],
2020-03-23 21:20:23    stdout      name: [32m'MongoNetworkError'[39m,
2020-03-23 21:20:23    stdout    [90m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)[39m {
2020-03-23 21:20:23    stdout    [90m    at Socket.Readable.push (_stream_readable.js:224:10)[39m
2020-03-23 21:20:23    stdout    [90m    at readableAddChunk (_stream_readable.js:290:11)[39m
2020-03-23 21:20:23    stdout    [90m    at addChunk (_stream_readable.js:309:12)[39m
2020-03-23 21:20:23    stdout    [90m    at Socket.emit (events.js:210:5)[39m
2020-03-23 21:20:23    stdout        at Socket.<anonymous> (/app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/connection/connection.js:533:15)
2020-03-23 21:20:23    stdout        at processMessage (/app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/connection/connection.js:364:10)
2020-03-23 21:20:23    stdout    [90m    at Connection.emit (events.js:210:5)[39m
2020-03-23 21:20:23    stdout        at Connection.messageHandler (/app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/connection/connect.js:334:5)
2020-03-23 21:20:23    stdout        at /app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/auth/scram.js:177:16
2020-03-23 21:20:23    stdout        at /app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/auth/auth_provider.js:66:11
2020-03-23 21:20:23    stdout        at /app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/connection/connect.js:352:21
2020-03-23 21:20:23    stdout        at callback (/app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/connection/connect.js:109:5)
2020-03-23 21:20:23    stdout        at /app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/connection/pool.js:557:14
2020-03-23 21:20:23    stdout    [90m    at Pool.emit (events.js:210:5)[39m
2020-03-23 21:20:23    stdout        at Pool.<anonymous> (/app/bundle/programs/server/npm/node_modules/[4mmeteor[24m/npm-mongo/node_modules/[4mmongodb-core[24m/lib/topologies/server.js:431:11)
2020-03-23 21:20:23    stdout    }]
2020-03-23 21:20:23    stdout      [Symbol(mongoErrorContextSymbol)]: {}
2020-03-23 21:20:23    stdout      name: 'MongoError',
2020-03-23 21:20:23    stdout        at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
2020-03-23 21:20:23    stdout        at Socket.Readable.push (_stream_readable.js:224:10)
2020-03-23 21:20:23    stdout        at readableAddChunk (_stream_readable.js:290:11)
2020-03-23 21:20:23    stdout        at addChunk (_stream_readable.js:309:12)
2020-03-23 21:20:23    stdout        at Socket.emit (events.js:210:5)
2020-03-23 21:20:23    stdout        at Socket.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:533:15)
2020-03-23 21:20:23    stdout        at processMessage (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:364:10)
2020-03-23 21:20:23    stdout        at Connection.emit (events.js:210:5)
2020-03-23 21:20:23    stdout        at Connection.messageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connect.js:334:5)
2020-03-23 21:20:23    stdout        at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/auth/scram.js:175:31
2020-03-23 21:20:23    stdout        at Function._getError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/auth/scram.js:125:14)
2020-03-23 21:20:23    stdout    MongoNetworkError: failed to connect to server [db:27017] on first connect [MongoError: Authentication failed.
2020-03-23 21:20:23    stdout   
2020-03-23 21:20:23    stdout    ^
2020-03-23 21:20:23    stdout    throw(ex);
2020-03-23 21:20:23    stdout    /app/bundle/programs/server/node_modules/fibers/future.js:313


And this is from mongodb container:
Code:
2020-03-23 21:17:09    stdout    2020-03-23T21:17:09.777+0000 I  NETWORK  [conn20] end connection 172.17.0.13:36030 (0 connections now open)
2020-03-23 21:17:09    stdout    2020-03-23T21:17:09.738+0000 I  ACCESS   [conn20] SASL SCRAM-SHA-1 authentication failed for root on admin from client 172.17.0.13:36030 ; UserNotFound: Could not find user "root" for db "admin"
2020-03-23 21:17:09    stdout    2020-03-23T21:17:09.729+0000 I  ACCESS   [conn20] Supported SASL mechanisms requested for unknown user '[email protected]'
2020-03-23 21:17:09    stdout    2020-03-23T21:17:09.728+0000 I  NETWORK  [conn20] received client metadata from 172.17.0.13:36030 conn20: { driver: { name: "nodejs", version: "3.2.7" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.4.59+" }, platform: "Node.js v12.14.0, LE, mongodb-core: 3.2.7" }
2020-03-23 21:17:09    stdout    2020-03-23T21:17:09.719+0000 I  NETWORK  [listener] connection accepted from 172.17.0.13:36030 #20 (1 connection now open)


And my RC container is always restarting.
 
1
0
NAS
DS218+
Hi!
To those having this MongoError: Authentication failed.
Code:
MongoNetworkError: failed to connect to server [db:27017] on first connect [MongoError: Authentication failed.
I've really no idea if it is a solution at all, but when I followed the instructions and frist started mongo with
Code:
mongo -u root -p yourRootPass --authenticationDatabase admin
I did not receive a prompt like
Code:
rs:PRIMARY
or someting like that, but just a
Code:
>
Running a command like
Code:
show users
would result in an error message like
Code:
MongoDB error "not master and slaveOk=false"
So according to this hint at MongoDB error "not master and slaveOk=false" I entered
Code:
rs.slaveOk()
And RocketChat started just like it should and runs since that!
Would be fine if other could report if that is really a solution.
 

Rusty

Moderator
NAS Support
3,416
1,014
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
I did not receive a prompt like
This is correct. I need to change this in the resource. It does indeed just show the command line prompt.
And RocketChat started just like it should and runs since that!
Would be fine if other could report if that is really a solution.
Thank you for this information. I do hope others with similar problem will be able to test this out and let us know so we can add this to a troublshooting step in the resource.
 

Rusty

Moderator
NAS Support
3,416
1,014
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 we fixed @wwwampy RC problem. As I suspected, MongoDB was having local DSM permission problems in the folder where it was hosted. The matter was resolved by creating a new folder in /docker root and the initial 37 files were generated as described before without any problems.

So all in all, if mongodb does not generate certain files on your DSM folder before replica step or RC installation, you have a local DSM permission problem. This needs to be fixed 1st!

Later on, RC installation was done without any problems as soon as permissions on mongo side were sorted.
 
351
91
NAS
DS418play
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
  2. Windows
Mobile operating system
  1. iOS
Perfect! Thank you @Rusty for fixing this. It works like a charm now.
 
13
1
www.fsnet.fr
NAS
DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Last edited:
Code:
[email protected]:/# mongo -u root -p PrivatePass --authenticationDatabase admin
MongoDB shell version v4.2.6
connecting to: mongodb://127.0.0.1:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
2020-05-03T13:14:03.972+0000 E  QUERY    [js] Error: Authentication failed. :
[email protected]/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-05-03T13:14:03.975+0000 F  -        [main] exception: connect failed
2020-05-03T13:14:03.976+0000 E  -        [main] exiting with code 1
[email protected]:/#

@Rusty , does it the same error than @wwwampy ?
 

Rusty

Moderator
NAS Support
3,416
1,014
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
@Francois double-check that MongoDB Synology docker folder (where the database will be hosted) is populated before you start with this step. If the folder structure on your Syno folder is empty its permission issue 99%. Start your mongoDB in a fresh folder and try again.

Please read my #118 post in this thread.
 
13
1
www.fsnet.fr
NAS
DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
No file before and after. I've try to create an other folder, but did work too... I have a folder for TTRSS and it's perfectly work.
I've create a ticket to synology for a check of my docker system.
 

Rusty

Moderator
NAS Support
3,416
1,014
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
No file before and after. I've try to create an other folder, but did work too... I have a folder for TTRSS and it's perfectly work.
I've create a ticket to synology for a check of my docker system.
Then it’s definitely a permission problem.
 

jeyare

Subscriber
1,876
623
when you get Authentication error as me in Rocket Chat container
and
everything is ok from the MongoDB setup
but
command "show users" will show an empty result
you need to manually create admin account

db.createUser({user: "admin", pwd: "xxxxxxxx", roles: [{role: "readWrite", db: "db"}]})

when the xxxxxxxx is your "root" psw
 

jeyare

Subscriber
1,876
623
playing with customization - findings:
- when you have a trouble with "invalid domain" error during (create new user or send an invitation) you can switch of feature called: "Use Default Blocked Domains List" - in:
Administration/Account/Registration
and your issue is solved.
 

Rusty

Moderator
NAS Support
3,416
1,014
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
playing with customization - findings:
- when you have a trouble with "invalid domain" error during (create new user or send an invitation) you can switch of feature called: "Use Default Blocked Domains List" - in:
Administration/Account/Registration
and your issue is solved.
Why do you have invalid domain error in the 1st place :p?
 

jeyare

Subscriber
1,876
623
Yes, yes :cool:
Because I have domain name such:
domain.digital

I found that issue in many systems with email/domain check. Reason is simple and frequent:
- light sw analyse ( driven by cost and time)
- light thinking sw analyst (don’t care about IANA standards)
- both of them.
Problem I found in R.CH is deeper, but solved now. Also in GitHub as proposed solution for creators.
 

jeyare

Subscriber
1,876
623
running 4 independent containers of the R.Ch.
@Rusty .... It was great investment from a time point of view. Now better know MongoDB possibilities.
thx
 

jeyare

Subscriber
1,876
623
Screen share:
- in browser session is OK (Win based), needs plug-in for browser
- in desktop app doesn’t work (Win based)
- found a solution for Mac OS
Any idea?
 

jeyare

Subscriber
1,876
623
desktop app (Win) Screen share doesn’t work
same experiences in Github

Solution:
Administration/Video conference/Always open new window

then your video conf will enable screen share and many others features.
 

Rusty

Moderator
NAS Support
3,416
1,014
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
desktop app (Win) Screen share doesn’t work
same experiences in Github

Solution:
Administration/Video conference/Always open new window

then your video conf will enable screen share and many others features.
you enjoying rc?
 

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