Open theflu opened 1 year ago
This issue even happens right out the box
Fetching https://ip-ranges.amazonaws.com/ip-ranges.json resulting in failure is still an issue IN 2024!!!
and it still not be solved......
Yes, it is still a problem in tencent cloud.
I can get the https://ip-ranges.amazonaws.com/ip-ranges.json information with the curl
command in the Docker container, but in NPM, I use the fetch
command of node to execute the statement:
const fetch = require('node-fetch');
fetch('https://ip-ranges.amazonaws.com/ip-ranges.json').then(response => response.text()).then(data => console.log(data)).catch(error => console.error('Error fetching data:', error));
The return value is:
> Error fetching data: FetchError: Invalid response body while trying to fetch https://ip-ranges.amazonaws.com/ip-ranges.json: read ECONNRESET
at PassThrough.<anonymous> (/app/node_modules/node-fetch/lib/index.js:400:12)
at PassThrough.emit (node:events:531:35)
at PassThrough.emit (node:domain:488:12)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
The Fetching https://ip-ranges.amazonaws.com/ip-ranges.json blocked at startup. Sometimes this will cost a lot of time.
If you're blocked by this fetching too, just run:
NPM_CTR_NAME=nginxproxymanager
docker exec $NPM_CTR_NAME sed -i 's/\.then(internalIpRanges\.fetch)//g' /app/index.js
docker restart $NPM_CTR_NAME
This should skip the fetching at the startup.
Here's the code change solution https://github.com/NginxProxyManager/nginx-proxy-manager/commit/326380cc563fe6d2dc3bd9e8cb25c6cf88ec400e
Not merged to the repo since I haven't tested it.
Checklist
jc21/nginx-proxy-manager:latest
docker image?Describe the bug Long startup time due to waiting for "Fetching IP Ranges" to timeout.
Nginx Proxy Manager Version v2.10.4
To Reproduce Steps to reproduce the behavior:
Expected behavior Use the http proxy in the environment variables or a way to specify the ip range in the compose file
Operating System Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-79-generic x86_64)