-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Deployment via Docker containers fails using a custom MongoDB port #15241
Comments
any answers for this? :( |
Not entirely related, but I can't change any ports and get it to actually startup. Did you ever find a solution? |
@xnaas, you can run the whole service in a docker container with the ports redirection as a dirty way to overcome that issues... The ports are hardcoded in the sources (i.e., the quality of the source codes is moderate), so either you should find and parametrize all occurrences of the required ports, or just fall back containerizing the whole system to wrap it and remap the ports. |
I eventually got it working...for a bit. Now the Edit: Completely wiped everything related to rocket.chat (all images, volumes, containers, files, etc.) and created a stack from scratch. Same issue. :/ Edit 2: Repeated. Seems to work again?? |
This issue indeed has no relation to this thread. I assume, it relates to your environment configuration (e.g., MongoDB client version known as CLI does not match the MongoDB server version). You can search more about this MongoDB deployment issue in the internet. |
Hey @luav , I came across the same issue using docker-compose, making a little research with a colleague @disalazarg , and try and error we found out that in some cases mongo is not ready listening before the other service tries to connect. You can test this by running first the mongo container and then the other services that connect to it. In your case:
wait 5 seconds.
check your app's logs and If your app correctly connects, there is your answer. That is, even when you place a
That sadly doesn't mean that mongo is ready and listening. Workarounds:
You wan that your app connects to mongo when mongo is already listening. A way of doing that is to delay the execution of your app. You can do that as follows: Create a script called
Remember to make it executable chmod +x entrypoint And in your
After compiling your app with NOTE: If you are working with images that they are not yours you can always use them as a base image and add the instructions above. Just place
I hope this will help |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Its issue with firewall. Follow these instructions to fix the issue |
Description:
Rocket Chat deployment on Docker containers fails using a custom MongoDB port:
The deployment was perform as described in the official tutorial with the following configuration file (
docker-compose.yml
):Steps to reproduce:
Expected behavior:
Successful start of the Rocket Chat service after the deployment
Actual behavior:
The Rocket Chat service fails to start with the exception listed above caused by the calls to improper (default) mongodb port given that another custom port is specified in the
docker-compose.yml
Server Setup Information:
Version 1.3.2
Apps Engine Version 1.5.2
Commit
Hash 2289486
Date Wed Aug 14 00:23:11 2019 -0300
HEAD
1.3.2
Diego Sampaio
Merge pull request #15176 from RocketChat/release-1.3.2
Operating System:
Linux Ubuntu 16.04 x64 4.4.0-145-generic
Deployment Method: docker
Number of Running Instances:
1
DB Replicaset Oplog:
Enabled
NodeJS Version:
v8.11.4
MongoDB Version:
4.2.0
Mongo Storage Engine: wiredTiger
Additional context
The Rocket chat attemps to connet to the invalid (dfault) mongodb port despite another custom port is specified in the config file.
Relevant logs:
The text was updated successfully, but these errors were encountered: