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

bind: cannot assign requested address #22

Closed
Julianoe opened this issue Dec 5, 2017 · 4 comments
Closed

bind: cannot assign requested address #22

Julianoe opened this issue Dec 5, 2017 · 4 comments

Comments

@Julianoe
Copy link

Julianoe commented Dec 5, 2017

I just ran the tutorial as it is and it returns this error

ERROR: for nginx-web Cannot start service nginx-web: driver failed programming external connectivity on endpoint nginx-web (b9ecaee261bb113fbb8d93381e8ab68c3a149feb389d8d60a64534aad80ecd54): Error starting userland proxy: listen tcp MYIP:443: bind: cannot assign requested address
In the docker-compose.yml i commented out the part that mentions the IP and replaced with just

   ports:
#      - "${IP}:80:80"
#      - "${IP}:443:443"
       - "80:80"
       - "443:443"

I ran the test file and it works. But just for my culture and better understanding, what is the reason of the error?

EDIT : it seems it simply does not work :/ (see related issue)

@evertramos
Copy link
Owner

evertramos commented Dec 5, 2017

This happens because you use a wront ip address. Are you in a public IP? If you set your correct external IP address it will work.

If you keep 0.0.0.0 it works fine as well.

@evertramos
Copy link
Owner

evertramos commented Dec 5, 2017

Are you sure you set up it correctly? Because this error is pretty much for this reason, and it's a docker function that generate the binding addres, which checks your network addres. So, or this address is not set correctly in you .env file or you do not have this ip settled for this machine. Please check.

I would suggest trying to keep 0.0.0.0 instead of commenting out the docker-compose file, let me know if it works.

Repository owner deleted a comment from Julianoe Dec 5, 2017
@evertramos
Copy link
Owner

@Julianoe,

Could you please past your ifconfig showing your external network interface (normally eth0)?

I believe that your server uses internal IP address, like AWS had some kind of proxy, which in the server has only local address.

So, you get your eth0 or virtual interface IP address and use it instead of the external IP address.

Please try and let me know.

@Julianoe Julianoe changed the title bind: cannot assigne requested address bind: cannot assign requested address Dec 6, 2017
@Julianoe
Copy link
Author

Julianoe commented Dec 6, 2017

Yes you were right!

My server provider (scaleway) indeed attributes both internal and external addresses. With external it did not work but once replaced by internal address it worked without any error!

Small detail but for some people a bit newbie like me that could be a pain in the butt to figure out. Thanks for the insight!

@Julianoe Julianoe closed this as completed Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants