-
Notifications
You must be signed in to change notification settings - Fork 42
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
Connection refused on localhost - only with Docker #104
Comments
The error message received seems to be somehow related to docker not being able to connect to Redis(but not sure) |
Which OS are you using? |
I'm on ubuntu 18.04 |
If that was the case, Docker wouldn't have connected to http://35.224.198.158:8080/api as well. The problem seems to be of docker not being able to detect localhost. Kindly take a look here https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach |
Quick fix:Linux: Copy the default docker bridge link that is created, by default it's http://172.17.0.1 Windows/Mac: If you use Windows/Mac and can test this solution and give a thumbs up would be helpful so I can add in the docs. Also, seems like soon host.docker.internal should work in all OS. Follow the post mentioned by @motormouthdoda for more answers. |
@Guttz can we put this configuration bit in docker-compose or in a bash script? |
I tried it for a while but didn't find something for all OS. I will install a VM to test some other compatibility matters with the agent and then I come back here and take a look again into this. |
I suppose we can just add this part to a "Troubleshooting" section in the README |
Yes, at least for now, I'll add this there while we can come up with a better solution. There's a PR on docker which would make http://host.docker.internal a universal solution but it doesn't seem like a priority right now: moby/libnetwork#2348 |
Observation linking to temp solution for #104
Hi, @Guttz I am new to the community, could you help me getting this issue resolved. Also new to open source :) |
I'm submitting a
Current Behaviour:
When trying to connect to a localhost hydrus server using docker, the agent returns Connection refused as the image:
However, it works for http://35.224.198.158:8080/api. At the same time, running python querying_mechanism.py directly works perfectly for both remote and local server.
Expected Behaviour:
Running via docker should enable to connect to local hydrus servers.
Do you want to work on this issue?
Yes, but appreciate any suggestions since I'm not really sure the reason for it
The text was updated successfully, but these errors were encountered: