[19:10:30] | * petednz[m] has quit (Quit: Client limit exceeded: 20000) |
[06:53:46] | <mstenta[m]> | symbioquine: I found the `farm_demo` module! https://github.com/kirsten-mc/farm_demo |
[06:53:58] | <mstenta[m]> | (from here https://farmos.discourse.group/t/farmos-demo-data/999) |
[14:11:05] | * mstenta has joined #farmos |
[15:10:12] | <mstenta[m]> | This is a bit off-topic but I'm struggling to find a solution anywhere else, so I thought maybe I'd see if there are any Docker+networking wizards in here who have encountered this... |
[15:10:57] | <mstenta[m]> | I have a Docker container called proxy (Nginx) running on a server. The server has a domain name pointed at it (eg: mydomain.com) via a normal DNS A record. The Nginx server in the proxy container is configured to accept connections on that domain. Everything works fine when I make a request to that domain from my browser. I get the response from Nginx. It also works fine if I SSH into the server and run curl -v mydomain.com. |
[15:10:57] | <mstenta[m]> | However, if I run that same curl command inside the proxy container (sudo docker exec -it proxy curl -v mydomain.com) it cannot connect. It says: Trying 123.123.123.123:80... (where 123.123.123.123 is the correct IP address assigned to the DNS A record) and eventually times out with connect to 173.255.231.162 port 80 failed: Connection timed out. |
[15:13:14] | <mstenta[m]> | I have been able to get it to work by manually editing /etc/hosts inside the proxy container and adding its own hostname to 127.0.0.1. But I want to know why it's not working to request it's own IP. 🤔 |
[15:13:57] | <mstenta[m]> | And more broadly... the thing I need to do (which is more complex) doesn't allow me to easily fix it that way. But if the normal IP request actually worked I would be happy. |
[15:14:28] | <mstenta[m]> | I just don't understand Docker networking enough to know why it doesn't work, and it's baffling me! |
[15:15:57] | <mstenta[m]> | * I have a Docker container called proxy (Nginx) running on a server. The server has a domain name pointed at it (eg: mydomain.com) via a normal DNS A record. The Nginx server in the proxy container is configured to accept connections on that domain. Everything works fine when I make a request to that domain from my browser. I get the response from Nginx. It also works fine if I SSH into the server and run curl -v mydomain.com. |
[15:15:57] | <mstenta[m]> | However, if I run that same curl command inside the proxy container (sudo docker exec -it proxy curl -v mydomain.com) it cannot connect. It says: Trying 123.123.123.123:80... (where 123.123.123.123 is the correct IP address assigned to the DNS A record) and eventually times out with connect to 123.123.123.123 port 80 failed: Connection timed out. |
[15:27:50] | <mstenta[m]> | Hmm actually it might be something specific to my server... I need to do more testing in other environments to pin it down... |
[16:00:08] | <mstenta[m]> | I figured it out... it was firewall rules... of course 🙄 |