>> /var/run directories are not created properly
>what specifically do you mean by this? just that you see log errors?
Following directories were not created automatically, I had to create
them manually in order to enable services to start:
/var/run/fail2ban
/var/run/screen
/var/run/sshd
/var/run/zabbix
Following directory was created, but its ownership was not proper:
/var/run/redis
> What's the output of:
> $ sudo find /run -ls
Please see attached file: sudo_find_run_ls.txt (working situation) and
find_run_ls_after_reboot.txt (after the system was rebooted i.e. not working
situation).
> $ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/simfs 52428800 7818704 44610096 15% /
devtmpfs 1572864 0 1572864 0% /dev
tmpfs 1572864 0 1572864 0% /dev/shm
tmpfs 1572864 9488 1563376 1% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 1572864 0 1572864 0% /sys/fs/cgroup
none 1572864 0 1572864 0% /run/shm
To make this a bit more complete, I removed the 0000var.conf and restarted the
system. When I checked the md5sum of files /usr/lib/tmpfiles.d, they matched to
my other Ubuntu 16.04 server.
After reboot, syslog relevant parts showed following:
---8<---8<---
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: [/usr/lib/tmpfiles.d/var.conf:14]
Duplicate line for path "/var/log", ignoring.
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of /run/named failed:
Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: Failed to validate path
/var/run/fail2ban: Too many levels of symbolic links
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of /run/redis failed:
Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: Failed to validate path
/var/run/screen: Too many levels of symbolic links
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: Failed to validate path
/var/run/sshd: Too many levels of symbolic links
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: Failed to validate path
/var/run/sudo: Too many levels of symbolic links
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: Failed to validate path
/var/run/sudo/ts: Too many levels of symbolic links
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of /run/utmp failed:
Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of /run/systemd/netif
failed: Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of
/run/systemd/netif/links failed: Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of
/run/systemd/netif/leases failed: Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: Failed to validate path
/var/run/zabbix: Too many levels of symbolic links
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of /run/log/journal
failed: Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of
/run/log/journal/6d9c7cc322ee4c48af7c0ec3b492b5cc failed: Invalid argument
Apr 11 08:44:50 vspk systemd-tmpfiles[85]: fchownat() of
/run/log/journal/6d9c7cc322ee4c48af7c0ec3b492b5cc/system.journal failed:
Invalid argument
Apr 11 08:44:50 vspk systemd[1]: systemd-tmpfiles-setup.service: Main process
exited, code=exited, status=1/FAILURE
Apr 11 08:44:50 vspk systemd[1]: Failed to start Create Volatile Files and
Directories.
Apr 11 08:44:50 vspk systemd[1]: systemd-tmpfiles-setup.service: Unit entered
failed state.
Apr 11 08:44:50 vspk systemd[1]: systemd-tmpfiles-setup.service: Failed with
result 'exit-code'.
---8<---8<---
This caused, that sshd, redis, fail2ban and zabbix agent were not able
to start.
In order for me to make the system usable, I needed to perform following
steps:
1) Log in to system using the serial console from the VPS control panel.
root@vspk:/var/run# ls -la /var/run
lrwxrwxrwx 1 root root 4 May 14 2018 /var/run -> /run
Contents of /run directory:
root@vspk:/var/run# find /run -ls > /home/kalle/find_run_ls_after_reboot.txt
(attached)
2) Give following commands:
root@vspk:/var/run# mkdir sshd
root@vspk:/var/run# /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
--> Now the system can be again accessed through SSH.
After that:
kalle@vspk:~$ sudo mkdir /var/run/zabbix
kalle@vspk:~$ sudo chown zabbix:zabbix /var/run/zabbix
kalle@vspk:~$ sudo chown redis:redis /var/run/redis
kalle@vspk:~$ sudo mkdir /var/run/fail2ban
kalle@vspk:~$ sudo mkdir /var/run/screen
kalle@vspk:~$ sudo chmod 777 /var/run/screen
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1818814
Title:
systemd-tmpfiles-setup.services fails to create /var/run directories
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1818814/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs