mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #4173] ERRO 502 Bad Gateway on reverse proxy with public IPV6. #2704
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#2704
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RafaelMachadok2xt on GitHub (Nov 18, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4173
I set up a server with Ubuntu Server 24.04 LTS on an old PC, everything configured with IPv6. It’s all working when I access the application (portainer, grafana, Nginx Proxy Manager . . .) externally via IPv6 and its corresponding port. However, when I set up reverse proxy using Nginx proxy Manager, I get a 502 Bad Gateway error.
When I type the IPv6 address of the instance in the browser, the Nginx welcome page appears, indicating that Nginx itself is working fine. The issue seems to be related to some network configuration.
Does anyone have any idea what could be causing this?
Note: All necessary ports for the applications are open in UFW, both for inbound and outbound traffic. The applications work externally with IPv6 and their respective ports. The problem only occurs when using domains with reverse proxy.
Nginx Proxy Manager Version
2.11.1
docker and portainer latesst version
To Reproduce
Steps to reproduce the behavior:
See error 502 bad gateway


Expected behavior
Proxy reverse working on IPV6
Logs from portainer
Group: npm PGID:0 ID:0
❯ Starting nginx ...
❯ Starting backend ...
[11/18/2024] [2:13:37 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite
[11/18/2024] [2:13:37 PM] [Migrate ] › ℹ info Current database version: none
[11/18/2024] [2:13:37 PM] [Setup ] › ℹ info Logrotate Timer initialized
[11/18/2024] [2:13:37 PM] [Global ] › ⬤ debug CMD: logrotate /etc/logrotate.d/nginx-proxy-manager
[11/18/2024] [2:13:38 PM] [Setup ] › ℹ info Logrotate completed.
[11/18/2024] [2:13:38 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services...
[11/18/2024] [2:13:38 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[11/18/2024] [2:13:38 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4
[11/18/2024] [2:13:38 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v6
[11/18/2024] [2:13:38 PM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized
[11/18/2024] [2:13:38 PM] [SSL ] › ℹ info Renewing SSL certs expiring within 30 days ...
[11/18/2024] [2:13:38 PM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized
[11/18/2024] [2:13:38 PM] [Global ] › ℹ info Backend PID 153 listening on port 3000 ...
[11/18/2024] [2:13:38 PM] [SSL ] › ℹ info Completed SSL cert renew process
[11/18/2024] [2:15:02 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [2:15:02 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/3.conf
[11/18/2024] [2:15:02 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [2:15:02 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [2:15:02 PM] [Nginx ] › ℹ info Reloading Nginx
[11/18/2024] [2:15:02 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
[11/18/2024] [2:26:34 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [2:26:34 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/3.conf
[11/18/2024] [2:26:34 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [2:26:34 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [2:26:34 PM] [Nginx ] › ℹ info Reloading Nginx
[11/18/2024] [2:26:34 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
[11/18/2024] [3:13:38 PM] [SSL ] › ℹ info Renewing SSL certs expiring within 30 days ...
[11/18/2024] [3:13:38 PM] [SSL ] › ℹ info Completed SSL cert renew process
[11/18/2024] [3:40:31 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/5.conf
[11/18/2024] [3:40:31 PM] [Nginx ] › ⬤ debug Could not delete file: {
"errno": -2,
"code": "ENOENT",
"syscall": "unlink",
"path": "/data/nginx/proxy_host/5.conf"
}
[11/18/2024] [3:40:31 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/5.conf.err
[11/18/2024] [3:40:31 PM] [Nginx ] › ⬤ debug Could not delete file: {
"errno": -2,
"code": "ENOENT",
"syscall": "unlink",
"path": "/data/nginx/proxy_host/5.conf.err"
}
[11/18/2024] [3:40:31 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [3:40:31 PM] [Nginx ] › ℹ info Reloading Nginx
[11/18/2024] [3:40:31 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
[11/18/2024] [3:40:36 PM] [SSL ] › ℹ info Requesting Let'sEncrypt certificates for Cert #8: npm.k2xttechnology.com.br
[11/18/2024] [3:40:36 PM] [SSL ] › ℹ info Command: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-8" --agree-tos --authenticator webroot --email "rafael@k2xttechnology.com.br" --preferred-challenges "dns,http" --domains "npm.k2xttechnology.com.br"
[11/18/2024] [3:40:36 PM] [Global ] › ⬤ debug CMD: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-8" --agree-tos --authenticator webroot --email "rafael@k2xttechnology.com.br" --preferred-challenges "dns,http" --domains "npm.k2xttechnology.com.br"
[11/18/2024] [3:40:39 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/temp/letsencrypt_8.conf
[11/18/2024] [3:40:39 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [3:40:39 PM] [Nginx ] › ℹ info Reloading Nginx
[11/18/2024] [3:40:39 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
[11/18/2024] [3:40:40 PM] [Express ] › ⚠ warning Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.
[11/18/2024] [3:42:36 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/5.conf
[11/18/2024] [3:42:36 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/proxy_host/5.conf.err
[11/18/2024] [3:42:36 PM] [Nginx ] › ⬤ debug Could not delete file: {
"errno": -2,
"code": "ENOENT",
"syscall": "unlink",
"path": "/data/nginx/proxy_host/5.conf.err"
}
[11/18/2024] [3:42:36 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [3:42:36 PM] [Nginx ] › ℹ info Reloading Nginx
[11/18/2024] [3:42:36 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
[11/18/2024] [3:42:41 PM] [SSL ] › ℹ info Requesting Let'sEncrypt certificates for Cert #9: npm.k2xttechnology.com.br
[11/18/2024] [3:42:41 PM] [SSL ] › ℹ info Command: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-9" --agree-tos --authenticator webroot --email "rafael@k2xttechnology.com.br" --preferred-challenges "dns,http" --domains "npm.k2xttechnology.com.br"
[11/18/2024] [3:42:41 PM] [Global ] › ⬤ debug CMD: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-9" --agree-tos --authenticator webroot --email "rafael@k2xttechnology.com.br" --preferred-challenges "dns,http" --domains "npm.k2xttechnology.com.br"
[11/18/2024] [3:42:43 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/temp/letsencrypt_9.conf
[11/18/2024] [3:42:43 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [3:42:44 PM] [Nginx ] › ℹ info Reloading Nginx
[11/18/2024] [3:42:44 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
[11/18/2024] [3:42:44 PM] [Express ] › ⚠ warning Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.
[11/18/2024] [4:13:38 PM] [SSL ] › ℹ info Renewing SSL certs expiring within 30 days ...
[11/18/2024] [4:13:38 PM] [SSL ] › ℹ info Completed SSL cert renew process
[11/18/2024] [5:13:38 PM] [SSL ] › ℹ info Renewing SSL certs expiring within 30 days ...
[11/18/2024] [5:13:38 PM] [SSL ] › ℹ info Completed SSL cert renew process
[11/18/2024] [6:13:38 PM] [SSL ] › ℹ info Renewing SSL certs expiring within 30 days ...
[11/18/2024] [6:13:38 PM] [SSL ] › ℹ info Completed SSL cert renew process
[11/18/2024] [7:13:38 PM] [SSL ] › ℹ info Renewing SSL certs expiring within 30 days ...
[11/18/2024] [7:13:38 PM] [SSL ] › ℹ info Completed SSL cert renew process
[11/18/2024] [8:13:38 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services...
[11/18/2024] [8:13:38 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[11/18/2024] [8:13:38 PM] [SSL ] › ℹ info Renewing SSL certs expiring within 30 days ...
[11/18/2024] [8:13:38 PM] [SSL ] › ℹ info Completed SSL cert renew process
[11/18/2024] [8:13:38 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4
[11/18/2024] [8:13:38 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v6
[11/18/2024] [8:13:38 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[11/18/2024] [8:13:38 PM] [Nginx ] › ℹ info Reloading Nginx
[11/18/2024] [8:13:38 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
@Mainfrezzer commented on GitHub (Nov 19, 2024):
May i ask why youre trying to connect to port 9000 of portainer via https? Thats the http port, https is 9443
@lastsamurai26 commented on GitHub (Nov 19, 2024):
And what i see is that between https:// and the ip is a space

@RafaelMachadok2xt commented on GitHub (Nov 19, 2024):
It doesn't work on both ports .
@RafaelMachadok2xt commented on GitHub (Nov 19, 2024):
There isn't space between https:// and the ip
@Mainfrezzer commented on GitHub (Nov 19, 2024):
Is your portainer also exposed on the host with those ports?
@lastsamurai26 commented on GitHub (Nov 20, 2024):
ok then compare this one with yours
;-) then you will see it
@github-actions[bot] commented on GitHub (Jun 25, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍