-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to MongoDB #167
Comments
does not solve this problem, I added |
yeah, I use docker compose.. still it is mongodb problem and should be solved with the code I provided. |
No luck with that fix unfortunately |
|
Try this shell into mongo and write rs.initiate( _id: "rs0", members: [ { _id: 0, host: "MONGODB URL" } ] ) |
already done, did not help
|
Ok, drop the database beforehand, then use rs.initiate() |
and it will not delete all data from a DB? |
It will.. you completely reset it.. but I assume that is not the biggest problem now if the whole db is not working anyway |
it works up to rocketchat version 5.0.0
why is it still an error |
because you try to initialize replica which is already initialized, thats why you do the reconfig() option I linked above. |
|
I have exactly the same problem. Trying (and failing) with
Before upgrading to 5.0, this worked:
|
I guess this needs to be updated for 5.0? |
Hey everyone, can someone show me the compose file you're using? |
In my case it also helped to add |
You don't need that in this compose file. |
Maybe you misunderstood me. If you leave out If this is only necessary for some configurations there should be a switch in the |
I'm sorry. You only need that if you're using the old docker compose file (one that doesn't use bitnami image). Otherwise, can you please share the file you're using? So that I can take a look. |
As I mentioned already, it is only required if someone is using the old compose file. Not the one that is sitting in this repository today. If indeed that is not the case I'm asking for someone to share their compose file here.
If directConnection is working for someone then that's fine and they can keep on using that configuration. My purpose of commenting is to make sure there is no misunderstanding that the new template needs the parameter. It doesn't. |
Here are the two files in my environment:
As you can see I'm using the current version of the compose. I just have altered some parts like the volumes and the image of the rockat.chat ( Like the author of this issue, I then have this error:
|
I can't see the whole error :( Couple questions:
Thanks a lot for helping in detecting the problem! |
Managed to fix our issue with the and then stopping the container and |
Yeah thats true. If you want I can post the full output.
Yes. I have updated the compose file because the old one was also not working with the new rocket.chat version.
Here my
Here the output:
What I didn't know is that Rocket.Chat is storing the connection configuration in the mongodb. So Rocket.Chat is connecting to mongodb and then is connecting to the target mongodb. Like a bootstrap. As I said: I didn't know. So like @quasimodo-r posted the solution was also for me:
And as I also said: this should be mentioned somewhere! I don't have the time to start a Code-Behind reading to troubleshoot such issues. |
Hello, I'm following this issue since i have done all the steps above and i have an error that i can't find online solution:
I got this error message from mongo
Can you help me with that? EDIT:
But i haven't specify any user in my compose.yml file compose.yml:
I followed another github issue to hard codded the MONGO_URL and the MONGO_OPLOG_URL. |
I fresh installed with
docker compose up -d
and then it run.RocketChat container gives me this error every 30 seconds and crashes. There are no other logs on that container.
In the MongoDB log I get this message that Connection from IP 172.18.0.3 (rocketChat) was accepted. I tried to reinstall the whole docker compose ecosystem even deleting and pulling the images again but it doesn't work.
The text was updated successfully, but these errors were encountered: