Can't ping localhost - pveproxy fails to start

c0urier

Renowned Member
Aug 29, 2011
28
2
68
Denmark
Hi guys.

This is my second reinstall of a test host and I've run into the same issue twice. I thought i'd see if anyone here has any idea of what is going on.
It's installed from the proxmox 4.4 ISO, worked directly after installation - After first apt update/dist-upgrade I started seeing below.

So what happens is, if I try to start pveproxy is fails with the following:
-- Unit pveproxy.service has begun starting up.
Dec 31 15:35:56 pve01 pveproxy[3266]: start failed - failed to get address info for: pve01: System error
Dec 31 15:35:56 pve01 pveproxy[3266]: start failed - failed to get address info for: pve01: System error
Dec 31 15:35:56 pve01 systemd[1]: pveproxy.service: control process exited, code=exited status=255
Dec 31 15:35:56 pve01 systemd[1]: Failed to start PVE API Proxy Server.
-- Subject: Unit pveproxy.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit pveproxy.service has failed.
--
-- The result is failed.
Dec 31 15:35:56 pve01 systemd[1]: Unit pveproxy.service entered failed state.

root@pve01:/etc/pve> ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:844 (844.0 B) TX bytes:844 (844.0 B)

root@pve01:/etc/pve> ls -la /etc/hosts
-rw-r--r-- 1 root root 295 Dec 31 02:59 /etc/hosts

root@pve01:/etc/pve> ls -la /etc/nsswitch.conf
-rw-r--r-- 1 root root 497 Dec 31 02:43 /etc/nsswitch.conf

root@pve01:/etc/pve> grep hosts /etc/nsswitch.conf
hosts: files dns
root@pve01:/etc/pve> cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.1.0.30 pve01.c0urier.net pve01 pvelocalhost

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

ping/dns tests:
root@pve01:/etc/pve> ping localhost
ping: unknown host localhost

root@pve01:/etc/pve> ping pve01
ping: unknown host pve01

root@pve01:/etc/pve> ping 10.1.0.30
PING 10.1.0.30 (10.1.0.30) 56(84) bytes of data.
64 bytes from 10.1.0.30: icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from 10.1.0.30: icmp_seq=2 ttl=64 time=0.018 ms
^C
--- 10.1.0.30 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.017/0.017/0.018/0.004 ms

root@pve01:/etc/pve> ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.009 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.029 ms
^C
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.009/0.019/0.029/0.010 ms

root@pve01:/etc/pve> host pve01
pve01.c0urier.net has address 10.1.0.30

root@pve01:/etc/pve> pveversion -v
proxmox-ve: 4.4-77 (running kernel: 4.4.35-1-pve)
pve-manager: not correctly installed (running version: 4.4-5/c43015a5) <--- Tried reinstall, can't due to pveproxy
pve-kernel-4.4.35-1-pve: 4.4.35-77
lvm2: 2.02.116-pve3
corosync-pve: 2.4.0-1
libqb0: 1.0-1
pve-cluster: 4.0-48
qemu-server: 4.0-102
pve-firmware: 1.1-10
libpve-common-perl: 4.0-85
libpve-access-control: 4.0-19
libpve-storage-perl: 4.0-71
pve-libspice-server1: 0.12.8-1
vncterm: 1.2-1
pve-docs: 4.4-1
pve-qemu-kvm: 2.7.0-10
pve-container: 1.0-90
pve-firewall: 2.0-33
pve-ha-manager: 1.0-38
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u2
lxc-pve: 2.0.6-5
lxcfs: 2.0.5-pve2
criu: 1.6.0-1
novnc-pve: 0.5-8
smartmontools: 6.5+svn4324-1~pve80
zfsutils: 0.6.5.8-pve13~bpo80

root@pve01:/etc/pve> lsb_release -irc
Distributor ID: Debian
Release: 8.6
Codename: jessie

Any ideas or any information missing please let me know.
 
What is the output of

# cat /etc/hostname

Besides, ping result "ping: unknown host pve01" is really strange. I am unable to see why this happens...
 
Hi dietmar, thanks for getting back to me.

root@pve01:/etc/pve> cat /etc/hostname
pve01
root@pve01:/etc/pve> hostname
pve01
root@pve01:/etc/pve> hostname -f
pve01.c0urier.net
root@pve01:/etc/pve> hostname -i
10.1.0.30
 
Okay thanks dietmar.. I will try a third reinstall and do baby steps and see where it goes wrong.

I'll let you know if I find anything out of the ordinary besides what is already posted.

Happy new years to you.
 
If you run into this again please include the output of
Code:
# strace -f ping localhost
And paste the complete unmodified /etc/nsswitch.conf file.
 
Besides the strace command above, the output of

getent ahosts localhost

would be interesting. getent allows access to the nsswitch database via the command line.
 
Thanks. No idea what caused it, third reinstall and no issues so far.

I'll keep those two in mind for next time.

@manu nsswitch was not modified - Tried copying nsswitch from a working host. So doubtful it was corrupted.
 
I had the exact same problem, what solved it is:

chmod +x /*

Basically, all the root folders had lost their `x` flag, and thus a lot of binaries didn't behave properly.
 

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!