[GH-ISSUE #2107] 504 GW Timeout for Host from second Network #1516

Closed
opened 2026-02-26 07:31:23 +03:00 by kerem · 2 comments
Owner

Originally created by @Scarpall on GitHub (Jun 12, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2107

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
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/"

Nginx Proxy Manager Version
v2.9.18

To Reproduce
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

Expected behavior
Simply work ;D

Operating System
QNAP Container Station

Thanks Scarpall

Originally created by @Scarpall on GitHub (Jun 12, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2107 - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** 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/"` **Nginx Proxy Manager Version** v2.9.18 **To Reproduce** 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 **Expected behavior** Simply work ;D **Operating System** QNAP Container Station Thanks Scarpall
kerem 2026-02-26 07:31:23 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Scarpall commented on GitHub (Jun 15, 2022):

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

<!-- gh-comment-id:1156748678 --> @Scarpall commented on GitHub (Jun 15, 2022): 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
Author
Owner

@b4oshany commented on GitHub (Jul 15, 2023):

Hi @Scarpall, where did u make this change?

Did u make the change in the Forward Hostname / IP input field for the proxy host? If yes, have you tried using the docker container name?

<!-- gh-comment-id:1636749002 --> @b4oshany commented on GitHub (Jul 15, 2023): Hi @Scarpall, where did u make this change? Did u make the change in the `Forward Hostname / IP` input field for the proxy host? If yes, have you tried using the docker container name?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1516
No description provided.