jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
756 stars 167 forks source link

504 GW Timeout for Host from second Network #257

Closed Scarpall closed 2 years ago

Scarpall commented 2 years ago

Hi, first of all english is not my main language so sorry for misspelling, so heres my setup:

Server with Docker installed - IP 192.168.2.3 Docker Network 1 - 10.0.3.0/24 Docker Network 2 - 10.0.10.0/24

Nginx Proxy Manager is connected to both Networks and can ping everyone. All already ceated Hosts are in Network 1 and are working. My latest Project should be seperated from the others, therefore the extra network. From the Nginx shell i can ping the container in network 2. From local Network i can access the Webinterface via 192.168.2.3:1234. But the created host with following settings:

domain: "test.mydomain.com" sheme: http forwarded IP: 192.168.2.3 forward Port: 1234 cache assets, block common exploits, websocket support off (for testing) no settings in custom location, ssl or advanced.

This host is not accessible via the domain name. It just drops an 504 Gateway Time-out. Every other Host is reachable via SSL (i also testet the Container above via SSL and its the same error).

error.log: 2022/06/08 15:34:47 [error] 9211#9211: *7482 upstream timed out (110: Operation timed out) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://192.168.2.3:1234/", host: "test.mydomain.com" 2022/06/08 15:36:17 [error] 9211#9211: *7482 upstream timed out (110: Operation timed out) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://192.168.2.3:1234/favicon.ico", host: "test.mydomain.com", referrer: "http://test.mydomain.com/" 2022/06/08 15:40:57 [error] 9220#9220: *7522 connect() failed (111: Connection refused) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://10.0.10.2:1234/", host: "test.mydomain.com" 2022/06/08 15:40:57 [error] 9220#9220: *7522 connect() failed (111: Connection refused) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://10.0.10.2:1234/favicon.ico", host: "test.mydomain.com", referrer: "http://test.mydomain.com/" 2022/06/08 15:40:59 [error] 9220#9220: *7522 connect() failed (111: Connection refused) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://10.0.10.2:1234/", host: "test.mydomain.com" 2022/06/08 15:41:00 [error] 9220#9220: *7522 connect() failed (111: Connection refused) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://10.0.10.2:1234/favicon.ico", host: "test.mydomain.com", referrer: "http://test.mydomain.com/" 2022/06/08 15:43:14 [error] 9229#9229: *7533 upstream timed out (110: Operation timed out) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://192.168.2.3:1234/", host: "test.mydomain.com" 2022/06/08 16:12:10 [error] 9229#9229: *7684 upstream timed out (110: Operation timed out) while connecting to upstream, client: [CLIENT-IP], server: test.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://192.168.2.3:1234/", host: "test.mydomain.com"

access.log: [08/Jun/2022:15:34:47 +0000] - 504 504 - GET http test.mydomain.com "/" [Client [CLIENT-IP]] [Length 164] [Gzip -] [Sent-to 192.168.2.3] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "-" [08/Jun/2022:15:36:17 +0000] - 504 504 - GET http test.mydomain.com "/favicon.ico" [Client [CLIENT-IP]] [Length 164] [Gzip -] [Sent-to 192.168.2.3] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "http://test.mydomain.com/" [08/Jun/2022:15:40:57 +0000] - 502 502 - GET http test.mydomain.com "/" [Client [CLIENT-IP]] [Length 154] [Gzip -] [Sent-to 10.0.10.2] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "-" [08/Jun/2022:15:40:57 +0000] - 502 502 - GET http test.mydomain.com "/favicon.ico" [Client [CLIENT-IP]] [Length 154] [Gzip -] [Sent-to 10.0.10.2] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "http://test.mydomain.com/" [08/Jun/2022:15:40:59 +0000] - 502 502 - GET http test.mydomain.com "/" [Client [CLIENT-IP]] [Length 154] [Gzip -] [Sent-to 10.0.10.2] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "-" [08/Jun/2022:15:41:00 +0000] - 502 502 - GET http test.mydomain.com "/favicon.ico" [Client [CLIENT-IP]] [Length 154] [Gzip -] [Sent-to 10.0.10.2] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "http://test.mydomain.com/" [08/Jun/2022:15:43:14 +0000] - 504 504 - GET http test.mydomain.com "/" [Client [CLIENT-IP]] [Length 164] [Gzip -] [Sent-to 192.168.2.3] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "-" [08/Jun/2022:15:43:14 +0000] - - 499 - GET http test.mydomain.com "/favicon.ico" [Client [CLIENT-IP]] [Length 0] [Gzip -] [Sent-to 192.168.2.3] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "http://test.mydomain.com/" [08/Jun/2022:16:12:10 +0000] - 504 504 - GET http test.mydomain.com "/" [Client [CLIENT-IP]] [Length 164] [Gzip -] [Sent-to 192.168.2.3] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "-" [08/Jun/2022:16:12:10 +0000] - - 499 - GET http test.mydomain.com "/favicon.ico" [Client [CLIENT-IP]] [Length 0] [Gzip -] [Sent-to 192.168.2.3] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0" "http://test.mydomain.com/"

Steps to reproduce the behavior:

1. Create a new Docker Network
2. Create Docker Container and add it to the new Network & NPM too
3. Create a CName for the new Container and create the Host
4. Open the Webinterface of the new Container via IP and it will work.
5. Try to open the Webinterface via the CName specified in the Host & See the error
Scarpall commented 2 years ago

Update: i got my Problem fixed... instead of using the 192.168.2.3 of my server. wich is pingable from my host and proxy manager i used the 10.0.10.1 wich is also my server and tada ... it works ... i dont understand why but it works