Hello everyone,
I'm running 16.04 LTS on a virtual server which, I think, uses OpenVz. After a recent reboot I found most of my services to be in a failed state. The reason for that, I guess, are these log entries:
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/elasticsearch failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/kopano failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/kopano failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/php failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/postgresql failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/redis failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/screen failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/utmp failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/systemd/netif failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/systemd/netif/links failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/systemd/netif/leases failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/log/journal failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/log/journal/bbad3a438f4b4fb49e5d0700bd5981e8 failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/log/journal/bbad3a438f4b4fb49e5d0700bd5981e8/system.journal failed: Invalid argument
To verify I tried this:
/usr/lib/tmpfiles.d# SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --create elasticsearch.conf
Reading config file "elasticsearch.conf".
Running create action for entry d /var/run/elasticsearch
Found existing directory "/var/run/elasticsearch".
"/run/elasticsearch" has right mode 40755
chown "/run/elasticsearch" to 120.128
fchownat() of /run/elasticsearch failed: Invalid argument
I can manually chown the directories, e.g. "chown elasticsearch:elasticsearch /var/run/elasticsearch" and restart the service successfully. My suspicion is, this is related to an upgrade of systemd to 229-4ubuntu21.8.
At this point I don't know what to do.
I'm also confused about the version I have installed, which I thought is systemd-229. Howver, I looked at https://github.com/systemd/systemd/blob/v229/src/tmpfiles/tmpfiles.c and found that fchownat() is only used from version 238+:
Tag v237 (and earlier, including 229):
/.../ if (chown(fn, i->uid_set ? i->uid : UID_INVALID, i->gid_set ? i->gid : GID_INVALID) < 0) return log_error_errno(errno, "chown(%s) failed: %m", path);
}
/.../
The following description is taken from:
https:/ /answers. launchpad. net/ubuntu/ +source/ systemd/ +question/ 676237
Hello everyone,
I'm running 16.04 LTS on a virtual server which, I think, uses OpenVz. After a recent reboot I found most of my services to be in a failed state. The reason for that, I guess, are these log entries:
Nov 17 04:47:42 h2118376 systemd- tmpfiles[ 165]: fchownat() of /run/elasticsearch failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/kopano failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/kopano failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/php failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/postgresql failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/redis failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/screen failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/utmp failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/systemd/netif failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/systemd/ netif/links failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/systemd/ netif/leases failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/log/journal failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/log/ journal/ bbad3a438f4b4fb 49e5d0700bd5981 e8 failed: Invalid argument tmpfiles[ 165]: fchownat() of /run/log/ journal/ bbad3a438f4b4fb 49e5d0700bd5981 e8/system. journal failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
Nov 17 04:47:42 h2118376 systemd-
To verify I tried this:
/usr/lib/ tmpfiles. d# SYSTEMD_ LOG_LEVEL= debug systemd-tmpfiles --create elasticsearch.conf conf". elasticsearch elasticsearch" . arch" has right mode 40755 arch" to 120.128
Reading config file "elasticsearch.
Running create action for entry d /var/run/
Found existing directory "/var/run/
"/run/elasticse
chown "/run/elasticse
fchownat() of /run/elasticsearch failed: Invalid argument
I can manually chown the directories, e.g. "chown elasticsearch: elasticsearch /var/run/ elasticsearch" and restart the service successfully. My suspicion is, this is related to an upgrade of systemd to 229-4ubuntu21.8.
At this point I don't know what to do.
I'm also confused about the version I have installed, which I thought is systemd-229. Howver, I looked at https:/ /github. com/systemd/ systemd/ blob/v229/ src/tmpfiles/ tmpfiles. c and found that fchownat() is only used from version 238+:
if (chown(fn,
i- >uid_set ? i->uid : UID_INVALID,
i- >gid_set ? i->gid : GID_INVALID) < 0)
return log_error_ errno(errno, "chown(%s) failed: %m", path);
Tag v237 (and earlier, including 229):
/.../
}
/.../
Tag v238
/.../
"",
i->uid_ set ? i->uid : UID_INVALID,
i->gid_ set ? i->gid : GID_INVALID,
AT_EMPTY_ PATH) < 0) errno(errno, "fchownat() of %s failed: %m", path);
if (fchownat(fd,
return log_error_
/.../
Any help fixing this problem would be highly appreciated.
Many thanks,
Rafael