Error starting pvestatd: "mkstemp ... ENOENT: No such file or directory"

rafafell

Renowned Member
Sep 24, 2016
64
2
73
37
Hi everyone,

I'm facing an issue on my Proxmox setup. The following error appears in the system logs:



Code:
systemctl status pvestatd


pvestatd[2105]: could not populate metric data cache: mkstemp "/run/pve/metrics.tmp_XXXXXX" failed: ENOENT: No such file or directory


pveversion: pve-manager/8.3.3/f157a38b211595d6 (running kernel: 6.8.12-8-pve)

Has anyone encountered this issue or knows how to fix it? Any suggestions would be greatly appreciated.

Thanks in advance for your help!
 
Has anyone encountered this issue or knows how to fix it? Any suggestions would be greatly appreciated.
Have you enumerated the context of "/run/pve" ? Is it there? Are permissions sane?
Does restarting "pvestatd", after the system is in a steady state, help?


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Yes, "/run" is a temporary file system that Linux uses for various purposes. I recommend examining your logs, starting from initial boot, to see if there are any errors during boot. The "/run" should already be available when "pve" services, responsible for creating "/run/pve", start.
I'd also check on the state of "pve" services: systemctl |grep pve

Is this a cluster or a solo?

PS We don't use metric functionality, so I am not directly familiar with when the directory structure is created. There were posts in the forum that unavailable or misbehaving metric server could lead to system instability.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
PS We don't use metric functionality, so I am not directly familiar with when the directory structure is created.
AFAIK the metrics file is created by the standard PVE metrics being used within PVE. I just checked on my single host not using any special metrics/monitoring etc. & I've got:

Code:
# ls /run/pve/m* -lh
-rw-r----- 1 root www-data 1.3M Feb  3 18:03 /run/pve/metrics
-rw-r----- 1 root www-data    0 Jan 30 08:50 /run/pve/metrics.lock

AFAIK these & other similar run-time information files (I have a couple others there in /run/pve/) should always be present until the next boot - at which time they will be flushed out & restarted. As you probably know /run is a run-time tmpfs widely used in Linux distros, Proxmox included.

Does the OP show any /run folder content? I find his situation very odd indeed - is there something we are missing about his setup? Maybe completely rebooting the host node will flush & restart the whole /run directory.

pvestatd[2105]: could not populate metric data cache: mkstemp "/run/pve/metrics.tmp_XXXXXX" failed: ENOENT: No such file or directory
How long into boot is this error showing?
 
Hello everyone,

This is a node recently added to the cluster.

The pvestatd log message has been occurring since the node was started and repeats every 10 seconds. If I create from the `/run/pve` folder, the log message stops appearing.

A strange thing about this node is that pve-cluster, pvedaemon, pveproxy, pvestatd were disabled. This had never happened before. I enabled them and everything went well.


Code:
ls -la /run
total 44
drwxr-xr-x 35 root              root       1060 fev  3 14:48 .
drwxr-xr-x 19 root              root       4096 jan 29 12:12 ..
drwxr-xr-x  2 avahi             avahi        80 fev  3 14:47 avahi-daemon
drwxr-xr-x  2 root              root         60 fev  3 14:47 blkid
drwxr-xr-x  3 root              root         60 fev  3 14:47 boltd
drwxr-xr-x  2 root              root         80 fev  3 14:47 console-setup
-rw-r-----  1 root              root          5 fev  3 14:47 corosync.pid
drwxr-xr-x  6 root              root        120 fev  3 14:47 credentials
-rw-r--r--  1 root              root          5 fev  3 14:47 crond.pid
----------  1 root              root          0 fev  3 14:47 crond.reboot
drwx------  2 root              root         40 fev  3 14:47 cryptsetup
drwxr-xr-x  3 root              lp          100 fev  3 14:47 cups
drwxr-xr-x  3 root              root         80 fev  3 14:47 dbus
prw-------  1 root              root          0 fev  3 14:47 dmeventd-client
prw-------  1 root              root          0 fev  3 14:47 dmeventd-server
drwxr-xr-x  2 root              root         40 fev  3 14:48 dtach
drwx--x--x  3 root              Debian-gdm   60 fev  3 14:47 gdm3
-rw-r--r--  1 root              root          5 fev  3 14:47 gdm3.pid
prw-------  1 root              root          0 fev  3 14:47 initctl
drwx------  2 root              root         80 fev  3 14:47 initramfs
drwxrwxrwt  6 root              root        280 fev  3 14:48 lock
drwxr-xr-x  3 root              root         60 fev  3 14:47 log
drwx------  2 root              root         80 fev  3 14:47 lvm
-rw-r--r--  1 root              root         95 fev  3 14:48 motd.dynamic
drwxr-xr-x  2 root              root         40 fev  3 14:47 mount
drwxr-xr-x  2 root              root        100 fev  3 14:47 network
drwxr-xr-x  2 root              root        140 fev  3 14:47 openvswitch
drwxr-xr-x  2 root              root         40 fev  3 14:48 plymouth
drwxr-x---  2 root              www-data     40 fev  3 14:47 pve-cluster
-rw-r--r--  1 root              root          5 fev  3 14:47 pve-cluster.pid
-rw-r--r--  1 root              root          5 fev  3 14:48 pvedaemon.pid
-rw-r--r--  1 root              root          0 fev  3 14:48 pvedaemon.pid.lock
drwx------  2 www-data          www-data     80 fev  3 14:48 pveproxy
-rw-r--r--  1 root              root          5 fev  3 14:47 pvestatd.pid
-rw-r--r--  1 root              root          0 fev  3 14:47 pvestatd.pid.lock
drwxr-xr-x  2 root              root         40 fev  3 14:48 qemu-server
-rw-r--r--  1 root              root          5 fev  3 14:47 rrdcached.pid
srwxr-xr-x  1 root              root          0 fev  3 14:47 rrdcached.sock
drwxr-xr-x  2 root              root         40 fev  3 14:47 sendsigs.omit.d
lrwxrwxrwx  1 root              root          8 fev  3 14:47 shm -> /dev/shm
drwxr-x---  3 speech-dispatcher audio       100 fev  3 14:47 speech-dispatcher
drwxr-xr-x  2 root              root         40 fev  3 14:47 spice-vdagentd
drwxr-xr-x  2 root              root         40 fev  3 14:47 sshd
-rw-r--r--  1 root              root          5 fev  3 14:47 sshd.pid
drwx--x--x  2 root              root         40 fev  3 14:47 sudo
drwxr-xr-x 21 root              root        520 fev  3 14:47 systemd
drwxr-xr-x  2 root              root         60 fev  3 14:47 tmpfiles.d
drwxr-xr-x  7 root              root        200 fev  3 14:48 udev
drwx------  2 root              root         40 fev  3 14:47 udisks2
drwxr-xr-x  4 root              root         80 fev  3 14:48 user
-rw-rw-r--  1 root              utmp       1152 fev  3 14:48 utmp
drwxr-xr-x  2 root              root         60 fev  3 14:47 uuidd
drwxr-x---  2 root              netdev       40 fev  3 14:47 wpa_supplicant
 
Last edited: