-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 Mongo using the docker setup #34
Comments
Are the containers properly linked? Eg if you do |
This is what inspect shows me for links. Only the semaphore container has links defined, as per the instructions. $ sudo docker inspect -f "{{ .HostConfig.Links }}" semaphore sudo docker inspect -f "{{ .HostConfig.Links }}" mongodb [mick@mick-fedora semaphore]$ sudo docker inspect -f "{{ .HostConfig.Links }}" redisio For the Mongo container I see this: "PortBindings": { Which is making me think it is only listening on localhost but I don't know how to fix that. Do I need to add another link at run time and if so where? |
Hmm no i think docker does port forwarding. Have you got a config file for semaphore? |
I am using whatever configs are within the repos. I simply cloned the repo and went through the Docker Quickstart without making any changes to configs. Not sure what you are looking for but it will be identical to what is in this repository. |
@matejkramny Thanks for looking into this. This log from semaphore shows that it is trying to connect to the IP address of the Mongo container: and a docker inspect of mongodb shows that the IP address is correct. "Gateway": "172.17.42.1", I don't know enough about nodejs/mongo to troubleshoot this even if I attach a shell to the containers. |
I'll try the tutorial and let you know. |
Hey, Sorry I was a little busy yesterday. I'll have time today after work Thanks |
Thanks @matejkramny I will check back later to see how it works out for you. |
I setup a brand new box (ubuntu 15.04 with docker) and copy-pasted all the steps in the "Docker quickstart" section and seems to work well. Can you try: Inside, you can ping |
Thanks @matejkramny I think this is a bug in docker on Fedora 22. I found some posts on this elsewhere. You can close this issue now. I will get this running on a Ubuntu system. |
Closing upon request |
I followed the instructions in the README.md for Docker Quick Start. After getting the three containers up and running I see this in the logs for semaphore:
Mongodb Connection Error: { [MongoError: connect EHOSTUNREACH 172.17.0.25:27017]
name: 'MongoError',
message: 'connect EHOSTUNREACH 172.17.0.25:27017' }
For the Mongo container I see this in the logs:
2015-09-07T15:21:35.814+0000 I NETWORK [initandlisten] waiting for connections on port 27017
I tried just using -p 27017:27017 for mongo, thinking maybe it was only listening on localhost but same results in logs.
The text was updated successfully, but these errors were encountered: