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)

Rusty

Moderator
NAS Support
4,078
1,172
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 fixed it! This is how:
If you are using your own domain with Synology reverse proxy you do need to change the
Code:
http://localhost:3000
To
https://your.owndomain.com
Otherwise the IOS app will have problems showing the users avatars and uploading pictures.
More info can be found here:

@Rusty Maybe you can add a note to the tutorial...?
That is correct, but the reason why this is not published is that running RC via a custom domain is an optional step, so not needed to configure the env variable. I will add it as a note.
 
4
1
NAS
DS1019+
Operating system
  1. Linux
Mobile operating system
  1. Android
Maybe you could post your steps you have taken to install the container and then we could have a look at them..?

@BobW I am currently remodeling our new office, once we have moved in I will dig deeper into the problem and even post my steps.
 
4
1
NAS
DS1019+
Operating system
  1. Linux
Mobile operating system
  1. Android
Ok I have mongo and rocket chat running. I am moving from snap to docker. I already have the snap backup but have no idea how to restore this backup inside mongo.
 

Rusty

Moderator
NAS Support
4,078
1,172
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Ok I have mongo and rocket chat running. I am moving from snap to docker. I already have the snap backup but have no idea how to restore this backup inside mongo.
This is backup one line command

Code:
mongodump --username root --password "your_pass" --gzip --out /data/db/backup_rocket_example_name

After the backup is done copy the archive and then execute this command

Code:
mongorestore --db db --username root --password "your_pass" --authenticationDatabase admin --gzip /data/db/backup_rocket_example_name/db

Be sure to explicitly add the name of the database that you are restoring to at the very end.
 
13
1
www.fsnet.fr
NAS
DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Hello,

on the :
Code:
mongo -u root -p MySecretPass --authenticationDatabase admin

I have a :
Code:
MongoDB shell version v4.2.2
connecting to: mongodb://127.0.0.1:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
2019-12-22T14:03:30.052+0000 E  QUERY    [js] Error: Authentication failed. :
[email protected]/mongo/shell/mongo.js:341:17
@(connect):2:6
2019-12-22T14:03:30.055+0000 F  -        [main] exception: connect failed
2019-12-22T14:03:30.055+0000 E  -        [main] exiting with code 1

I have try to stop and change password but same result...

I have try to install this rocket chat few days ago but I had a problem on the rocket chat docker (think that I ve didnt download the good RC)😞
So i've del all the install and restart from the beginning.
on the First test have i didn't have problem with mongo...

Thanks for help.
 

Rusty

Moderator
NAS Support
4,078
1,172
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Destroy the container and start again. this is known to happen and the only way to fix it is actually to redo the container again.
 
3
0
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. Android
  2. iOS
Having some issues with this setup. RC is getting an error stating MongoError: Authentication failed. When I look at the log on Mongo, it states that UserNotFound: Could not find user [email protected] I am able to log in from Bash with the --authenticationDatabase admin switch. I have tried the latest MongoDB and 4.0.10. I have recreated both container several time and this is where I keep getting stuck at. Not sure where to go from here.
 

Rusty

Moderator
NAS Support
4,078
1,172
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Having some issues with this setup. RC is getting an error stating MongoError: Authentication failed. When I look at the log on Mongo, it states that UserNotFound: Could not find user [email protected] I am able to log in from Bash with the --authenticationDatabase admin switch. I have tried the latest MongoDB and 4.0.10. I have recreated both container several time and this is where I keep getting stuck at. Not sure where to go from here.
When you log into mongod command line what does show dbs command return?
 
3
0
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. Android
  2. iOS
Alright... not sure what I did but it is now working. It created a database called db and now it is working. Again, not sure what I did but whatever created db fixed my issue.
 

Rusty

Moderator
NAS Support
4,078
1,172
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
The db database should be created when the instance was 1st created looks like it was missing. Glad you got it going.
 
13
1
www.fsnet.fr
NAS
DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Destroy the container and start again. this is known to happen and the only way to fix it is actually to redo the container again.

No Works for me.
I've try a "docker system prune" but i always have a "Authentication failed"...
 

Rusty

Moderator
NAS Support
4,078
1,172
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Same question as before. After you log into mongod container what databases do you see when you run show dbs command?

If you are missing the main database (in this example called db), then try and create it.
 
13
1
www.fsnet.fr
NAS
DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Happy new year,
Today the installation of mongo still running (with the same parameters... i don't understand...maybe the new year...)
so I've start the installation of RC and the dock start and start again.

In the log i have:
Code:
MongoNetworkError: failed to connect to server [db:27017] on first connect [MongoError: Authentication failed.]

so i go back to mongo and send a
Code:
show dbs

and response is the same as asianflavor:
Code:
admin   0.000GB
config  0.000GB
local   0.000GB

So i think that i have to manuely create the DB to but I don't know mongo... :confused:
 

Rusty

Moderator
NAS Support
4,078
1,172
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Long into your mongo container and after you use show dbs command that lists your existing DBs, just run:

use db

This will create database called 'db'. Keep in mind that if you use show command after this it will still not list your new database because it is empty (only db's with some content are shown). No matter, after you have created the DB try and rerun Rocket again.
 
13
1
www.fsnet.fr
NAS
DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Code:
[email protected]:/# show dbs
bash: show: command not found
[email protected]:/# use db
bash: use: command not found
[email protected]:/#

I give up... :(
Thanks for your help.
 

Rusty

Moderator
NAS Support
4,078
1,172
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 no, thats just a command line inside the container. I didn’t explain it well. At that command line 1st run and log in as mongo root with

mongo -u root -p yourRootPass --authenticationDatabase admin

Then run the commands
 
13
1
www.fsnet.fr
NAS
DS218+
Operating system
  1. Windows
Mobile operating system
  1. Android
Code:
[email protected]:/# mongo -u root -p MdP2020 --authenticationDatabase admin
MongoDB shell version v4.2.3
connecting to: mongodb://127.0.0.1:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
2020-02-08T16:00:17.702+0000 E  QUERY    [js] Error: Authentication failed. :
[email protected]/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-02-08T16:00:17.705+0000 F  -        [main] exception: connect failed
2020-02-08T16:00:17.705+0000 E  -        [main] exiting with code 1
[email protected]:/#

I really don't understand why it doesn't work... :(
 

Rusty

Moderator
NAS Support
4,078
1,172
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Code:
[email protected]:/# mongo -u root -p MdP2020 --authenticationDatabase admin
MongoDB shell version v4.2.3
connecting to: mongodb://127.0.0.1:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
2020-02-08T16:00:17.702+0000 E  QUERY    [js] Error: Authentication failed. :
[email protected]/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-02-08T16:00:17.705+0000 F  -        [main] exception: connect failed
2020-02-08T16:00:17.705+0000 E  -        [main] exiting with code 1
[email protected]:/#

I really don't understand why it doesn't work... :(
Do you have an active alias from your RC container to your mongo container?
 

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