When I boot my system, radvd fails to start: $ sudo systemctl status radvd Password: ● radvd.service - Router advertisement daemon for IPv6 Loaded: loaded (/usr/lib64/systemd/system/radvd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2016-12-18 17:05:19 EST; 16h ago Docs: man:radvd(8) Process: 941 ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 (code=exited, status=255) Process: 844 ExecStartPre=/usr/sbin/radvd --configtest (code=exited, status=0/SUCCESS) Dec 18 17:05:14 scurvy systemd[1]: Starting Router advertisement daemon for IPv6... Dec 18 17:05:19 scurvy radvd[844]: [Dec 18 17:05:19] radvd (844): config file, /etc/radvd.conf, syntax ok Dec 18 17:05:19 scurvy systemd[1]: radvd.service: Control process exited, code=exited status=255 Dec 18 17:05:19 scurvy systemd[1]: Failed to start Router advertisement daemon for IPv6. Dec 18 17:05:19 scurvy systemd[1]: radvd.service: Unit entered failed state. Dec 18 17:05:19 scurvy systemd[1]: radvd.service: Failed with result 'exit-code'. Dec 18 17:05:19 scurvy radvd[941]: [Dec 18 17:05:19] radvd (941): version 2.14 started Dec 18 17:05:19 scurvy radvd[941]: [Dec 18 17:05:19] radvd (941): unable to open pid file, /var/run/radvd/radvd.pid: Permission denied A simple mkdir fixes it, but since /var/tmp is a tmpfs I have to do that every boot: $ sudo mkdir /var/run/radvd $ sudo systemctl start radvd $ sudo systemctl status radvd ● radvd.service - Router advertisement daemon for IPv6 Loaded: loaded (/usr/lib64/systemd/system/radvd.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2016-12-19 09:39:24 EST; 2s ago Docs: man:radvd(8) Process: 29595 ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 (code=exited, status=0/SUCCESS) Process: 29591 ExecStartPre=/usr/sbin/radvd --configtest (code=exited, status=0/SUCCESS) Main PID: 29598 (radvd) CGroup: /system.slice/radvd.service ├─29598 /usr/sbin/radvd --username radvd --logmethod stderr --debug 0 └─29599 /usr/sbin/radvd --username radvd --logmethod stderr --debug 0 Dec 19 09:39:24 scurvy systemd[1]: Starting Router advertisement daemon for IPv6... Dec 19 09:39:24 scurvy radvd[29591]: [Dec 19 09:39:24] radvd (29591): config file, /etc/radvd.conf, syntax ok Dec 19 09:39:24 scurvy radvd[29595]: [Dec 19 09:39:24] radvd (29595): version 2.14 started Dec 19 09:39:24 scurvy systemd[1]: Started Router advertisement daemon for IPv6.
please try with radvd-2.15-r1 updated build options to specify /run instead of /var/run (/run is specified in tmpfiles.d)
Hello Matthew! I've updated to net-misc/radvd-2.15-r1:0 and the problem still happens, but now with the /run folder instead of the /var/run folder: rpbarlow@scurvy ~ $ sudo systemctl status radvd ● radvd.service - Router advertisement daemon for IPv6 Loaded: loaded (/usr/lib64/systemd/system/radvd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2017-01-14 21:02:53 EST; 3h 20min ago Docs: man:radvd(8) Process: 862 ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 (code=exited, status=255) Process: 818 ExecStartPre=/usr/sbin/radvd --configtest (code=exited, status=0/SUCCESS) Jan 14 21:02:51 scurvy systemd[1]: Starting Router advertisement daemon for IPv6... Jan 14 21:02:53 scurvy radvd[818]: [Jan 14 21:02:53] radvd (818): config file, /etc/radvd.conf, syntax ok Jan 14 21:02:53 scurvy radvd[862]: [Jan 14 21:02:53] radvd (862): version 2.15 started Jan 14 21:02:53 scurvy radvd[862]: [Jan 14 21:02:53] radvd (862): unable to open pid file, /run/radvd/radvd.pid: Permission denied Jan 14 21:02:53 scurvy systemd[1]: radvd.service: Control process exited, code=exited status=255 Jan 14 21:02:53 scurvy systemd[1]: Failed to start Router advertisement daemon for IPv6. Jan 14 21:02:53 scurvy systemd[1]: radvd.service: Unit entered failed state. Jan 14 21:02:53 scurvy systemd[1]: radvd.service: Failed with result 'exit-code'. Similar to last time, I can work around this issue by using mkdir, but on the /run folder instead of on the /var/run folder: $ sudo mkdir /run/radvd
I think the problem is that tmpfiles.d need /etc/init.d/opentmpfiles-setup restarted to be executed. Normally a reboot. Or by properly using tmpfiles.eclass. commit f2146e7a0aa26abcb5a6ea1292d353da4a8c7865 Author: Michael Weber <xmw@gentoo.org> Date: Wed Feb 1 10:59:59 2017 +0100 net-misc/radvd: Version bump. Fix tmpfiles.d issue (bug 603106, thanks Randy Barlow). Package-Manager: Portage-2.3.3, Repoman-2.3.1
Hello again! I updated to radvs-2.16 but the problem remains. Immediately after boot, the service has entered a failed state: $ sudo systemctl status radvd Password: ● radvd.service - Router advertisement daemon for IPv6 Loaded: loaded (/usr/lib64/systemd/system/radvd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2017-02-12 22:46:34 EST; 1min 50s ago Docs: man:radvd(8) Process: 807 ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 (code=exited, status=255) Process: 799 ExecStartPre=/usr/sbin/radvd --configtest (code=exited, status=0/SUCCESS) Feb 12 22:46:33 scurvy systemd[1]: Starting Router advertisement daemon for IPv6... Feb 12 22:46:34 scurvy systemd[1]: radvd.service: Control process exited, code=exited status=255 Feb 12 22:46:34 scurvy systemd[1]: Failed to start Router advertisement daemon for IPv6. Feb 12 22:46:34 scurvy systemd[1]: radvd.service: Unit entered failed state. Feb 12 22:46:34 scurvy systemd[1]: radvd.service: Failed with result 'exit-code'. Feb 12 22:46:34 scurvy radvd[799]: [Feb 12 22:46:34] radvd (799): config file, /etc/radvd.conf, syntax ok Feb 12 22:46:34 scurvy radvd[807]: [Feb 12 22:46:34] radvd (807): version 2.16 started Feb 12 22:46:34 scurvy radvd[807]: [Feb 12 22:46:34] radvd (807): unable to open pid file, /run/radvd/radvd.pid: Permission denied $ ls -lah /run/radvd ls: cannot access '/run/radvd': No such file or directory It seems that I can mkdir /run/radvd to get it working again: $ sudo mkdir /run/radvd
I use net-misc/radvd-2.14. To solve this problem I modified ExecStart in the service file : root@max-server # systemctl cat radvd.service # /usr/lib/systemd/system/radvd.service [Unit] Description=Router advertisement daemon for IPv6 Documentation=man:radvd(8) After=network.target [Service] Type=forking ExecStartPre=/usr/sbin/radvd --configtest ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 ExecReload=/usr/sbin/radvd --configtest ; \ /bin/kill -HUP $MAINPID CPUSchedulingPolicy=idle PIDFile=/run/radvd/radvd.pid RuntimeDirectory=radvd CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE CAP_NET_RAW PrivateTmp=yes PrivateDevices=yes ProtectSystem=full ProtectHome=yes NoNewPrivileges=yes [Install] WantedBy=multi-user.target # /etc/systemd/system/radvd.service.d/override.conf [Service] ExecStart= ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 --pidfile /run/radvd/radvd.pid root@max-server # systemctl show -p ExecStart radvd.service ExecStart={ path=/usr/sbin/radvd ; argv[]=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 --pidfile /run/radvd/radvd.pid ; ignore_errors=no ; …
Got this error on net-misc/radvd-2.17 today (systemd system). It's not fixed. I think it happens because systemd has two conflisting mechanisms to create /var/run/: Via .service file: RuntimeDirectory=radvd ProtectSystem=full And via .tmpfilesd: d /run/radvd 0755 radvd radvd Systemd end up trying to start radvd in empty /var/. To workaround the problem I suggest removing .tmpfilesd entirely from ebuild. Openrs creates /run/ files anyways in init.d script using checkpath: checkpath -d -o radvd:radvd ${PIDFILE%/*} WDYT? --- radvd-2.17.ebuild 2017-07-18 09:25:29.900943230 +0100 +++ radvd-2.17-r1.ebuild 2017-08-16 23:10:11.373925283 +0100 @@ -5,3 +5,3 @@ -inherit systemd user eutils readme.gentoo-r1 tmpfiles +inherit systemd user eutils readme.gentoo-r1 @@ -49,3 +49,2 @@ systemd_dounit "${FILESDIR}"/${PN}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf @@ -59,6 +58,2 @@ } - -pkg_postinst() { - tmpfiles_process ${PN}.conf -}
Pushed to the tree as: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=564e4ed0715605dafe41568a3eb6690102cf6ca0 Thanks for the report!