[GH-ISSUE #3157] Fetching IP Ranges Timeout #2138

Closed
opened 2026-02-26 07:34:11 +03:00 by kerem · 6 comments
Owner

Originally created by @theflu on GitHub (Aug 24, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3157

Checklist

  • 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
Long startup time due to waiting for "Fetching IP Ranges" to timeout.

nginx-proxy-manager | [8/24/2023] [7:04:29 PM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
nginx-proxy-manager | [8/24/2023] [7:04:29 PM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
nginx-proxy-manager | [8/24/2023] [7:06:39 PM] [IP Ranges] › ✖  error     connect ETIMEDOUT 99.84.208.32:443

Nginx Proxy Manager Version
v2.10.4

To Reproduce
Steps to reproduce the behavior:

  1. Require your docker server to use http proxy for internet access
  2. Add proxy env var to compose file IE "HTTP_PROXY=proxy.example.com:3128" "HTTPS_PROXY=proxy.example.com:3128"
  3. Start container
  4. See logs

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)

Originally created by @theflu on GitHub (Aug 24, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3157 **Checklist** - 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** Long startup time due to waiting for "Fetching IP Ranges" to timeout. ``` nginx-proxy-manager | [8/24/2023] [7:04:29 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services... nginx-proxy-manager | [8/24/2023] [7:04:29 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json nginx-proxy-manager | [8/24/2023] [7:06:39 PM] [IP Ranges] › ✖ error connect ETIMEDOUT 99.84.208.32:443 ``` **Nginx Proxy Manager Version** v2.10.4 **To Reproduce** Steps to reproduce the behavior: 1. Require your docker server to use http proxy for internet access 2. Add proxy env var to compose file IE "HTTP_PROXY=proxy.example.com:3128" "HTTPS_PROXY=proxy.example.com:3128" 3. Start container 4. See logs **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)
kerem 2026-02-26 07:34:11 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@NeDolM commented on GitHub (Mar 21, 2024):

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!!!

<!-- gh-comment-id:2011833198 --> @NeDolM commented on GitHub (Mar 21, 2024): 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!!!
Author
Owner

@NovaShen555 commented on GitHub (Sep 5, 2024):

and it still not be solved......

<!-- gh-comment-id:2330821357 --> @NovaShen555 commented on GitHub (Sep 5, 2024): and it still not be solved......
Author
Owner

@rer-coder commented on GitHub (Sep 22, 2024):

Yes, it is still a problem in tencent cloud.

<!-- gh-comment-id:2365479547 --> @rer-coder commented on GitHub (Sep 22, 2024): Yes, it is still a problem in tencent cloud.
Author
Owner

@rer-coder commented on GitHub (Sep 22, 2024):

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'

<!-- gh-comment-id:2365654793 --> @rer-coder commented on GitHub (Sep 22, 2024): 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' ```
Author
Owner

@jqknono commented on GitHub (Sep 26, 2024):

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 github.com/NginxProxyManager/nginx-proxy-manager@326380cc56

Not merged to the repo since I haven't tested it.

<!-- gh-comment-id:2376734168 --> @jqknono commented on GitHub (Sep 26, 2024): 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: ```bash 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.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 4, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2938088897 --> @github-actions[bot] commented on GitHub (Jun 4, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
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#2138
No description provided.