Skip to content
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

Error while bringing up project: address already in use #9

Open
TwoBrake opened this issue Feb 28, 2023 · 4 comments
Open

Error while bringing up project: address already in use #9

TwoBrake opened this issue Feb 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@TwoBrake
Copy link

Hey there! I am having an issue while setting up the project with the default database as either MongoDB is installed or isn't. I just want to make sure I have the error understanding correctly or if there is another fix before I do anything that may or may not mess up something on my system.

Here are the error logs:

make: [Makefile:16: build] Error 1 (ignored)
docker-compose -f ./docker-compose.yml run --service-ports --rm --name ots-share-run-app --entrypoint "npm run start" ots-share-run
Starting ots-share-mongo-local ... 
Starting ots-share-mongo-local ... error

ERROR: for ots-share-mongo-local  Cannot start service ots-share-mongo-local: driver failed programming external connectivity on endpoint ots-share-mongo-local (a52a7fa2ec0c1ca125cd030da00b47f8ec502990e88413f3bd32e1005e77e124): Error starting userland proxy: listen tcp4 0.0.0.0:27017: bind: address already in use

ERROR: for ots-share-mongo-local  Cannot start service ots-share-mongo-local: driver failed programming external connectivity on endpoint ots-share-mongo-local (a52a7fa2ec0c1ca125cd030da00b47f8ec502990e88413f3bd32e1005e77e124): Error starting userland proxy: listen tcp4 0.0.0.0:27017: bind: address already in use
ERROR: Encountered errors while bringing up the project.
make: *** [Makefile:45: execute] Error 1

Thank you in advance.

@rpgeeganage
Copy link
Owner

@TwoBrake
Sorry for the late reply. I'll look into this and provide a fix ASAP.

@rpgeeganage rpgeeganage added the bug Something isn't working label Mar 3, 2023
@rpgeeganage
Copy link
Owner

@TwoBrake ,
I think it causes by this line.
https://github.com/rpgeeganage/ots-share-app/blob/main/docker-compose.yml#L56
In that I expose the mongo port to the host machine.
Can u comment it out and retry.

@TwoBrake
Copy link
Author

TwoBrake commented Mar 3, 2023

Do you want me to just comment out line 56? Also, I am running from the source, not with docker; I don't know if that would change anything, just letting you know.

@rpgeeganage
Copy link
Owner

And try
make clean.
It will close the running docker containers.
Then try commenting.
Because that line expose 27017 port to the host. So if another instance is using it, docker will fail.
My apologies for mess of a docker files, compose files and make file.
I'm planning to clean them up soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants