Proxmox Helper scripts: DNS problem?

mago

New Member
Sep 18, 2024
1
0
1
Hi folks,
I am quite new to Proxmox and setting up my first LXC using the Proxmox helper scripts is driving me nuts.
Just using one of the scripts (e.g. iobroker, grafana, pihole, ...) always brings me to the famous(?) error:
Code:
[ERROR] in line 23: exit code 0: while executing command "$@" > /dev/null 2>&1
The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.
Following the advice and calling the script in advanced mode with more verbosity shows up a DNS problem:
Code:
    ____  ____   __  ______  __    ______
   / __ \/  _/  / / / / __ \/ /   / ____/
  / /_/ // /___/ /_/ / / / / /   / __/   
 / ____// /___/ __  / /_/ / /___/ /___   
/_/   /___/  /_/ /_/\____/_____/_____/   
 
Using Advanced Settings
Using Distribution: debian
Using debian Version: 12
Using Container Type: 1
Using Root Password: Automatic Login
Container ID: 100
Using Hostname: pihole
Using Disk Size: 2
Allocated Cores: 1
Allocated RAM: 512
Using Bridge: vmbr0
Using IP Address: dhcp
Using Gateway IP Address: Default
Using APT-Cacher IP Address: Default
Disable IPv6: no
Using Interface MTU Size: Default
Using DNS Search Domain: Host
Using DNS Server IP Address: Host
Using Vlan: Default
Enable Root SSH Access: no
Enable Verbose Mode: yes
Creating a Pihole LXC using the above advanced settings
 ✓ Using local for Template Storage.
 ✓ Using local-lvm for Container Storage.
 ✓ Updated LXC Template List
 ✓ LXC Container 100 was successfully created.
 ✓ Started LXC Container
 ✓ Set up Container OS
 ✓ Network Connected: 192.168.178.85 2003:c0:5706:d400:be24:11ff:fe42:7378
 ✓ IPv4 Internet Connected
 ✗ IPv6 Internet Not Connected
 ✗ DNS Lookup Failure
Ign:1 http://security.debian.org bookworm-security InRelease         
Ign:2 http://deb.debian.org/debian bookworm InRelease               
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease               
Ign:1 http://security.debian.org bookworm-security InRelease         
Ign:1 http://security.debian.org bookworm-security InRelease         
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease       
Ign:2 http://deb.debian.org/debian bookworm InRelease               
Err:1 http://security.debian.org bookworm-security InRelease         
  Temporary failure resolving 'security.debian.org'
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Err:2 http://deb.debian.org/debian bookworm InRelease
  Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian bookworm-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists... Done   
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/dists/bookworm-security/InRelease  Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
 /0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 ✓ Updated Container OS
Reading package lists... Done
Building dependency tree... Done
 -The following additional packages will be installed:
  libcurl4
The following NEW packages will be installed:
  curl libcurl4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 704 kB of archives.
After this operation, 1,359 kB of additional disk space will be used.
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Err:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
  Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/c/curl/libcurl4_7.88.1-10%2bdeb12u7_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/c/curl/curl_7.88.1-10%2bdeb12u7_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

[ERROR] in line 17: exit code 0: while executing command $STD apt-get install -y curl

I checked DNS resolution on host level:
Code:
root@proxmox:~# nslookup www.heise.de
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   www.heise.de
Address: 193.99.144.85
Name:   www.heise.de
Address: 2a02:2e0:3fe:1001:7777:772e:2:85

- I tried to set my local DNS Gateway as DNS in Proxmox settings, as well as some external servers like in the example
- I tried to disable IPv6 in helper script setup as well as at my local router (FritzBox)
- I re-installed the LXCs many times and also rebooted Proxmox

None of those actions changed anything in the behavior, and meantime I'm running out of ideas. I found some hints on the web about this or similar problems, some of them mentioned above, none of them helped or was applicable.

Does anyone have an idea?

Thanks in advance!

Cheers
 
This isn't necessarily a direct answer to your question, and not sure if it's relevant to your specific issue. But at some point recently, I can't remember when, I started to always get an error from the helper scripts saying "can't connect to the internet/this won't go well do you want to proceed". I started just ignoring it and everything seems to be getting installed normally like it did before regardless of that error.
 
I'm getting a similar error, but not DNS.
Through some trial & error installs, it only occurs when I select Debian 12.
I don't get the error with Debian 11, and the script proceeds to install all the packages and complete installation.

Unless someone much smarter than me can troubleshoot, maybe test with Debian 11 to get it to complete.
 
Last edited:
Hello Mago,

I'm learning a Proxmox too. Can you check the following file:
/etc/pve/lxc/

There is a LXC container configuration file. xxx.conf

my output is below:

root@zzzz:/etc/pve/lxc# cat xxxx.conf
arch: amd64
cores: 1
features: nesting=1
hostname: seiji-ct
memory: 512
nameserver: 8.8.8.8
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:92:E2:A4,ip=dhcp,ip6=dhcp,type=veth
ostype: debian
rootfs: local-lvm:vm-101-disk-0,size=8G
swap: 512
unprivileged: 1


Can you ping to 8.8.8.8 google from the container as shown below?

root@seiji-ct:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=12.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=52 time=12.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=52 time=12.8 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 12.891/12.918/12.946/0.133 ms
root@seiji-ct:~#

Can you also check the /etc/resolv.conf file in the container?

root@seiji-ct:~# cat /etc/resolv.conf
domain hoge.com
search hoge.com
nameserver xxx.xxx.xxx.xxx <-- you need to check these.
nameserver yyy.yyy.yyy.yyy
root@seiji-ct:~#

Hope this helps.

Seiji
 
Hi, I am in same boat, I am setting up the proxmox and when on earlier versions than 8.2.7, the lxc's were installed fine and still work fine. however post 8.2.7, whenever i try to install an lxc ex. debian it fails with above error. when i try to do apt update it get stuck at waiting for headers. many posts point to DNS issue, but how to resolve this issue with new lxc's? Thank you in advance.
 
Hi, I am in same boat, I am setting up the proxmox and when on earlier versions than 8.2.7, the lxc's were installed fine and still work fine. however post 8.2.7, whenever i try to install an lxc ex. debian it fails with above error. when i try to do apt update it get stuck at waiting for headers. many posts point to DNS issue, but how to resolve this issue with new lxc's? Thank you in advance.
My issue got resolved somehow, only thing I did was shutdown the server and left overnight. next morning when i restarted it, no more errors doing apt updates.
 
Hi folks,
I am quite new to Proxmox and setting up my first LXC using the Proxmox helper scripts is driving me nuts.
Just using one of the scripts (e.g. iobroker, grafana, pihole, ...) always brings me to the famous(?) error:
Code:
[ERROR] in line 23: exit code 0: while executing command "$@" > /dev/null 2>&1
The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.
Following the advice and calling the script in advanced mode with more verbosity shows up a DNS problem:
Code:
    ____  ____   __  ______  __    ______
   / __ \/  _/  / / / / __ \/ /   / ____/
  / /_/ // /___/ /_/ / / / / /   / __/  
 / ____// /___/ __  / /_/ / /___/ /___  
/_/   /___/  /_/ /_/\____/_____/_____/  
 
Using Advanced Settings
Using Distribution: debian
Using debian Version: 12
Using Container Type: 1
Using Root Password: Automatic Login
Container ID: 100
Using Hostname: pihole
Using Disk Size: 2
Allocated Cores: 1
Allocated RAM: 512
Using Bridge: vmbr0
Using IP Address: dhcp
Using Gateway IP Address: Default
Using APT-Cacher IP Address: Default
Disable IPv6: no
Using Interface MTU Size: Default
Using DNS Search Domain: Host
Using DNS Server IP Address: Host
Using Vlan: Default
Enable Root SSH Access: no
Enable Verbose Mode: yes
Creating a Pihole LXC using the above advanced settings
 ✓ Using local for Template Storage.
 ✓ Using local-lvm for Container Storage.
 ✓ Updated LXC Template List
 ✓ LXC Container 100 was successfully created.
 ✓ Started LXC Container
 ✓ Set up Container OS
 ✓ Network Connected: 192.168.178.85 2003:c0:5706:d400:be24:11ff:fe42:7378
 ✓ IPv4 Internet Connected
 ✗ IPv6 Internet Not Connected
 ✗ DNS Lookup Failure
Ign:1 http://security.debian.org bookworm-security InRelease        
Ign:2 http://deb.debian.org/debian bookworm InRelease              
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease              
Ign:1 http://security.debian.org bookworm-security InRelease        
Ign:1 http://security.debian.org bookworm-security InRelease        
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease      
Ign:2 http://deb.debian.org/debian bookworm InRelease              
Err:1 http://security.debian.org bookworm-security InRelease        
  Temporary failure resolving 'security.debian.org'
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Err:2 http://deb.debian.org/debian bookworm InRelease
  Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian bookworm-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists... Done  
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/dists/bookworm-security/InRelease  Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
 /0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 ✓ Updated Container OS
Reading package lists... Done
Building dependency tree... Done
 -The following additional packages will be installed:
  libcurl4
The following NEW packages will be installed:
  curl libcurl4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 704 kB of archives.
After this operation, 1,359 kB of additional disk space will be used.
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Err:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
  Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/c/curl/libcurl4_7.88.1-10%2bdeb12u7_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/c/curl/curl_7.88.1-10%2bdeb12u7_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

[ERROR] in line 17: exit code 0: while executing command $STD apt-get install -y curl

I checked DNS resolution on host level:
Code:
root@proxmox:~# nslookup www.heise.de
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   www.heise.de
Address: 193.99.144.85
Name:   www.heise.de
Address: 2a02:2e0:3fe:1001:7777:772e:2:85

- I tried to set my local DNS Gateway as DNS in Proxmox settings, as well as some external servers like in the example
- I tried to disable IPv6 in helper script setup as well as at my local router (FritzBox)
- I re-installed the LXCs many times and also rebooted Proxmox

None of those actions changed anything in the behavior, and meantime I'm running out of ideas. I found some hints on the web about this or similar problems, some of them mentioned above, none of them helped or was applicable.

Does anyone have an idea?

Thanks in advance!

Cheers
Hi, could you fiex the issue? I have the exact same problem... tried everything you did. Strange is also, that i have internet access and dns resolve works just fine in the pve shell, but as soon as i start the helper script, the dns lookup is not working... so frustrating
 
Hello Mago,

I'm learning a Proxmox too. Can you check the following file:
/etc/pve/lxc/

There is a LXC container configuration file. xxx.conf

my output is below:

root@zzzz:/etc/pve/lxc# cat xxxx.conf
arch: amd64
cores: 1
features: nesting=1
hostname: seiji-ct
memory: 512
nameserver: 8.8.8.8
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:92:E2:A4,ip=dhcp,ip6=dhcp,type=veth
ostype: debian
rootfs: local-lvm:vm-101-disk-0,size=8G
swap: 512
unprivileged: 1


Can you ping to 8.8.8.8 google from the container as shown below?

root@seiji-ct:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=12.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=52 time=12.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=52 time=12.8 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 12.891/12.918/12.946/0.133 ms
root@seiji-ct:~#

Can you also check the /etc/resolv.conf file in the container?

root@seiji-ct:~# cat /etc/resolv.conf
domain hoge.com
search hoge.com
nameserver xxx.xxx.xxx.xxx <-- you need to check these.
nameserver yyy.yyy.yyy.yyy
root@seiji-ct:~#

Hope this helps.

Seiji
Hi Seiji, i tried your tips, the LXC Container file shows no nameserver entry. in the resolv.conf file are the nameservers like in your example file just fine. The problem with the DNS lookup failure is only when i start the helper script, in the normal pve shell for example apt update works just fine. To ping google.com or 8.8.8.8 is working fine to...
 
Thank you for your responses, i solved the Problem. The LXC/VM's have apparently other DNS settings than the rest of Proxmox. They looked up the DNS from my router, which was pointing to a false ip address (my deprecated adguard dns server). So i changed the wrong address in the router and reinstalled proxmox (was easier for me since it was my intention from the beginning to make a fresh installation) . Now everything works just fine
 
  • Like
Reactions: seiji
This issue is back again after proxmox upgraded to 8.3, Here is log when trying to create wireguard lxc

W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease Connection failed [IP: 199.232.54.132 80]
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease Connection failed [IP: 199.232.54.132 80]
W: Failed to fetch http://security.debian.org/dists/bookworm-security/InRelease Connection failed [IP: 199.232.54.132 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
✓ Updated Container OS
Reading package lists... Done
Building dependency tree... Done
|The following additional packages will be installed:
libcurl4
The following NEW packages will be installed:
curl libcurl4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 704 kB of archives.
After this operation, 1,359 kB of additional disk space will be used.
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Ign:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Ign:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Err:1 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u7
Connection failed [IP: 199.232.54.132 80]
Err:2 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u7
Connection failed [IP: 199.232.54.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/c/curl/libcurl4_7.88.1-10+deb12u7_amd64.deb Connection failed [IP: 199.232.54.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/c/curl/curl_7.88.1-10+deb12u7_amd64.deb Connection failed [IP: 199.232.54.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

[ERROR] in line 17: exit code 0: while executing command $STD apt-get install -y curl
 
Retried again in order to get the full logs, but its a success now, seems intermittent but not sure about the cause of it.
Full Log attached and snapshot below,

_ ___ ______ __
| | / (_)_______ / ____/_ ______ __________/ /
| | /| / / / ___/ _ \/ / __/ / / / __ `/ ___/ __ /
| |/ |/ / / / / __/ /_/ / /_/ / /_/ / / / /_/ /
|__/|__/_/_/ \___/\____/\__,_/\__,_/_/ \__,_/

Using Advanced Settings
Using Distribution: debian
Using debian Version: 12
Using Container Type: 1
Using Root Password: Automatic Login
Container ID: 115
Using Hostname: wireguard
Using Disk Size: 4
Allocated Cores: 1
Allocated RAM: 512
Using Bridge: vmbr0
Using IP Address: dhcp
Using Gateway IP Address: Default
Using APT-Cacher IP Address: Default
Disable IPv6: no
Using Interface MTU Size: Default
Using DNS Search Domain: Host
Using DNS Server IP Address: Host
Using Vlan: Default
Enable Root SSH Access: no
Enable Verbose Mode: yes
Creating a Wireguard LXC using the above advanced settings
✓ Using dlocal for Template Storage.
✓ Using dpool for Container Storage.
✓ Updated LXC Template List
✓ LXC Container 115 was successfully created.
✓ Started LXC Container
✓ Set up Container OS
✓ Network Connected: 192.168.X.X
✓ IPv4 Internet Connected
✗ IPv6 Internet Not Connected
✓ DNS Resolved github.com to 20.26.156.215

net.ipv4.ip_forward = 1
✓ Installed WGDashboard
✓ Created Service
✓ Customized Container
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
/0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
✓ Cleaned
✓ Completed Successfully!

WGDashboard should be reachable by going to the following URL.
http://192.168.x.x:10086 admin|admin
 

Attachments

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!