[GH-ISSUE #1133] Internal DNS resolution not working #932

Closed
opened 2026-02-26 06:35:02 +03:00 by kerem · 2 comments
Owner

Originally created by @Knocks83 on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1133

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

The internal DNS resolution does not work, so it cannot create/renew certificates

Nginx Proxy Manager Version

2.8.1 (even if now it doesn't even start anymore)

To Reproduce
Steps to reproduce the behavior:

  1. docker exec -it npm bash
  2. ping google.com

Expected behavior

It should resolve the hostname

Screenshots

The result of ping google.com:
image

Operating System

Ubuntu 20.04

Additional context

I have a pihole on the same machine as npm. The host naturally can ping Google without any problem.

The error it throws that doesn't allow npm to start:

[5/28/2021] [4:00:41 PM] [Global   ] › ✖  error     Command failed: pip3 install certbot-dns-cloudflare==1.8.0 cloudflare
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f5d160>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f7df10>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f7df70>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f65f10>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f5d370>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/
ERROR: Could not find a version that satisfies the requirement certbot-dns-cloudflare==1.8.0 (from versions: none)
ERROR: No matching distribution found for certbot-dns-cloudflare==1.8.0

And finally this is my docker-compose.yml file:

version: "3"
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    container_name: npm
    restart: always
    ports:
      # Public HTTP Port:
      - '80:80'
      # Public HTTPS Port:
      - '443:443'
      # Admin Web Port:
      - '81:81'
    volumes:
      - ./config.json:/app/config/production.json
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

What did I try?
I tried to set the dns value in the docker-compose file to my DNS server, there was no difference.

Originally created by @Knocks83 on GitHub (May 28, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1133 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **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** <!-- A clear and concise description of what the bug is. --> The internal DNS resolution does not work, so it cannot create/renew certificates **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> 2.8.1 (even if now it doesn't even start anymore) **To Reproduce** Steps to reproduce the behavior: 1. docker exec -it npm bash 2. ping google.com **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> It should resolve the hostname **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> The result of ping google.com: ![image](https://user-images.githubusercontent.com/22529815/120011924-1f611380-bfdf-11eb-8a76-572c938f248d.png) **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> Ubuntu 20.04 **Additional context** <!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. --> I have a pihole on the same machine as npm. The host naturally can ping Google without any problem. The error it throws that doesn't allow npm to start: ``` [5/28/2021] [4:00:41 PM] [Global ] › ✖ error Command failed: pip3 install certbot-dns-cloudflare==1.8.0 cloudflare WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f5d160>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f7df10>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f7df70>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f65f10>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3a92f5d370>: Failed to establish a new connection: [Errno -3] Try again')': /simple/certbot-dns-cloudflare/ ERROR: Could not find a version that satisfies the requirement certbot-dns-cloudflare==1.8.0 (from versions: none) ERROR: No matching distribution found for certbot-dns-cloudflare==1.8.0 ``` And finally this is my `docker-compose.yml` file: ``` version: "3" services: app: image: 'jc21/nginx-proxy-manager:latest' container_name: npm restart: always ports: # Public HTTP Port: - '80:80' # Public HTTPS Port: - '443:443' # Admin Web Port: - '81:81' volumes: - ./config.json:/app/config/production.json - ./data:/data - ./letsencrypt:/etc/letsencrypt ``` --- **What did I try?** I tried to set the dns value in the docker-compose file to my DNS server, there was no difference.
kerem 2026-02-26 06:35:02 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Knocks83 commented on GitHub (May 28, 2021):

Update: I cannot log in the webinterface (it says "bad gateway") but it does work (it's properly redirecting my domains).

<!-- gh-comment-id:850529206 --> @Knocks83 commented on GitHub (May 28, 2021): Update: I cannot log in the webinterface (it says "bad gateway") but it does work (it's properly redirecting my domains).
Author
Owner

@Knocks83 commented on GitHub (May 28, 2021):

I fixed it by adding the dns value in the docker-compose file, but instead of using pihole I specified the Google DNS

<!-- gh-comment-id:850561238 --> @Knocks83 commented on GitHub (May 28, 2021): I fixed it by adding the dns value in the docker-compose file, but instead of using pihole I specified the Google DNS
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#932
No description provided.