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)

@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?
 
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 'root@admin'
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.
 
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.
 
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.
 
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.
 
Last edited:
Code:
root@mongo1:/# 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. :
connect@src/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
root@mongo1:/#

@Rusty , does it the same error than @wwwampy ?
 
@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.
 
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.
 
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.
 
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
 
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.
 
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?
 
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.
 
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.
 
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!

Back
Top