systemd watchdog start-up not working correctly on Sabayon/Gentoo
Hi, I follow "systemctl start-up not working correctly" thread because I'm trying to integrate systemd watchdog support to Gentoo/Sabayon distro. Currently, I'm testing Freeradius v3.0.x-HEAD with systemd-239 but it seems that notifications returned to systemd aren't correct. # systemctl --version systemd 239 +PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN +PCRE2 default-hierarchy=hybrid # radiusd -v radiusd: FreeRADIUS Version 3.0.20 (git #136ba4541), for host x86_64- pc-linux-gnu, built on May 13 2019 at 16:31:56 FreeRADIUS Version 3.0.20 Copyright (C) 1999-2019 The FreeRADIUS server project and contributors There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE You may redistribute copies of FreeRADIUS under the terms of the GNU General Public License For more information about these matters, see the file named COPYRIGHT
From systemctl log I see that watchdog notification are returned by freeradius server but probably are wrong because service receive timeout.
May 13 19:51:35 radius radiusd[8093]: Mon May 13 19:51:35 2019 : Debug: Waking up in 29.6 seconds. May 13 19:52:04 radius radiusd[8093]: Mon May 13 19:52:04 2019 : Debug: Emitting systemd watchdog notification May 13 19:52:04 radius radiusd[8093]: Mon May 13 19:52:04 2019 : Debug: Waking up in 29.9 seconds. May 13 19:52:34 radius radiusd[8093]: Mon May 13 19:52:34 2019 : Debug: Emitting systemd watchdog notification May 13 19:52:34 radius radiusd[8093]: Mon May 13 19:52:34 2019 : Debug: Waking up in 29.9 seconds. May 13 19:53:04 radius radiusd[8093]: Mon May 13 19:53:04 2019 : Debug: Emitting systemd watchdog notification May 13 19:53:04 radius radiusd[8093]: Mon May 13 19:53:04 2019 : Debug: Waking up in 29.9 seconds. May 13 19:53:04 radius radiusd[8093]: Mon May 13 19:53:04 2019 : Info: Signalled to terminate May 13 19:53:04 radius systemd[1]: freeradius.service: Start operation timed out. Terminating. May 13 19:53:04 radius systemd[1]: freeradius.service: Failed with result 'timeout'. May 13 19:53:04 radius systemd[1]: Failed to start FreeRADIUS Server. I will try to investigate better in the next days also with systemd v.242. -- geaaru
On May 13, 2019, at 1:58 PM, Daniele Rondina <geaaru@gmail.com> wrote:
I follow "systemctl start-up not working correctly" thread because I'm trying to integrate systemd watchdog support to Gentoo/Sabayon distro.
Currently, I'm testing Freeradius v3.0.x-HEAD with systemd-239 but it seems that notifications returned to systemd aren't correct.
Was FreeRADIUS built with systemd support?
# radiusd -v
Do "radiusd -vxx" and you'll get more information about compilation flags: $ radiusd -vxx Mon May 13 15:55:56 2019 : Info: radiusd: FreeRADIUS Version 3.0.20 (git #136ba45), for host i386-apple-darwin18.2.0, built on May 13 2019 at 15:55:37 Mon May 13 15:55:56 2019 : Debug: Server was built with: Mon May 13 15:55:56 2019 : Debug: accounting : yes Mon May 13 15:55:56 2019 : Debug: authentication : yes Mon May 13 15:55:56 2019 : Debug: ascend-binary-attributes : yes Mon May 13 15:55:56 2019 : Debug: coa : yes Mon May 13 15:55:56 2019 : Debug: control-socket : yes Mon May 13 15:55:56 2019 : Debug: detail : yes Mon May 13 15:55:56 2019 : Debug: dhcp : yes Mon May 13 15:55:56 2019 : Debug: dynamic-clients : yes Mon May 13 15:55:56 2019 : Debug: osfc2 : no Mon May 13 15:55:56 2019 : Debug: proxy : yes Mon May 13 15:55:56 2019 : Debug: regex-pcre : yes Mon May 13 15:55:56 2019 : Debug: regex-posix : no Mon May 13 15:55:56 2019 : Debug: regex-posix-extended : no Mon May 13 15:55:56 2019 : Debug: session-management : yes Mon May 13 15:55:56 2019 : Debug: stats : yes Mon May 13 15:55:56 2019 : Debug: systemd : no ... Alan DeKok.
On Mon, 2019-05-13 at 15:56 -0400, Alan DeKok wrote:
On May 13, 2019, at 1:58 PM, Daniele Rondina <geaaru@gmail.com> wrote:
I follow "systemctl start-up not working correctly" thread because I'mtrying to integrate systemd watchdog support to Gentoo/Sabayon distro. Currently, I'm testing Freeradius v3.0.x-HEAD with systemd-239 but itseems that notifications returned to systemd aren't correct.
Was FreeRADIUS built with systemd support?
Yes, of course. Hereinafter the details about built-in modules: # radiusd -v -xxxx Tue May 14 10:20:19 2019 : Info: radiusd: FreeRADIUS Version 3.0.20 (git #136ba4541), for host x86_64-pc-linux-gnu, built on May 14 2019 at 03:54:59 Tue May 14 10:20:19 2019 : Debug: Server was built with: Tue May 14 10:20:19 2019 : Debug: accounting : yes Tue May 14 10:20:19 2019 : Debug: authentication : yes Tue May 14 10:20:19 2019 : Debug: ascend-binary-attributes : yes Tue May 14 10:20:19 2019 : Debug: coa : yes Tue May 14 10:20:19 2019 : Debug: control-socket : yes Tue May 14 10:20:19 2019 : Debug: detail : yes Tue May 14 10:20:19 2019 : Debug: dhcp : yes Tue May 14 10:20:19 2019 : Debug: dynamic-clients : yes Tue May 14 10:20:19 2019 : Debug: osfc2 : no Tue May 14 10:20:19 2019 : Debug: proxy : yes Tue May 14 10:20:19 2019 : Debug: regex-pcre : yes Tue May 14 10:20:19 2019 : Debug: regex-posix : no Tue May 14 10:20:19 2019 : Debug: regex-posix-extended : no Tue May 14 10:20:19 2019 : Debug: session-management : yes Tue May 14 10:20:19 2019 : Debug: stats : yes Tue May 14 10:20:19 2019 : Debug: systemd : yes Tue May 14 10:20:19 2019 : Debug: tcp : yes Tue May 14 10:20:19 2019 : Debug: threads : yes Tue May 14 10:20:19 2019 : Debug: tls : yes Tue May 14 10:20:19 2019 : Debug: unlang : yes Tue May 14 10:20:19 2019 : Debug: vmps : yes Tue May 14 10:20:19 2019 : Debug: developer : no Tue May 14 10:20:19 2019 : Debug: Server core libs: Tue May 14 10:20:19 2019 : Debug: freeradius-server : 3.0.20 Tue May 14 10:20:19 2019 : Debug: talloc : 2.2.* Tue May 14 10:20:19 2019 : Debug: ssl : 1.0.2r release Tue May 14 10:20:19 2019 : Debug: pcre : 8.41 2017-07-05 Tue May 14 10:20:19 2019 : Debug: Endianness: Tue May 14 10:20:19 2019 : Debug: little Tue May 14 10:20:19 2019 : Debug: Compilation flags: Tue May 14 10:20:19 2019 : Debug: cppflags : Tue May 14 10:20:19 2019 : Debug: cflags : -I. -Isrc -include src/freeradius-devel/autoconf.h -include src/freeradius-devel/build.h -include src/freeradius-devel/features.h -include src/freeradius- devel/radpaths.h -fno-strict-aliasing -Wno-date-time -O2 -march=x86-64 -pipe -g -Wall -std=c99 -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DOPENSSL_NO_KRB5 -DNDEBUG -DIS_MODULE=1 Tue May 14 10:20:19 2019 : Debug: ldflags : -Wl,-O1 -Wl,--as-needed Tue May 14 10:20:19 2019 : Debug: libs : -lcrypto -lssl -ltalloc -lpcre -lcap -lresolv -ldl -lpthread -lreadline Tue May 14 10:20:19 2019 : Debug: Tue May 14 10:20:19 2019 : Info: FreeRADIUS Version 3.0.20 In any case, the log reported in the previous email print this message: May 13 19:53:04 radius radiusd[8093]: Mon May 13 19:53:04 2019 : Debug: Emitting systemd watchdog notification that is available inside sd_watchdog_event function when HAVE_SYSTEMD_WATCHDOG is defined. So, from compilation side seems all correct. # ldd /usr/sbin/radiusd | grep systemd libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007ff59acd7000) I will investigate. Thanks
On May 14, 2019, at 4:31 AM, Daniele Rondina <geaaru@gmail.com> wrote:
Was FreeRADIUS built with systemd support?
Yes, of course. Hereinafter the details about built-in modules:
Hmm. Then I'm not sure.
I will investigate. Thanks
I'll take a look here, too. Alan DeKok.
Hi, I found the issue. I think that is wrong use: sd_notify(0, "READY=1") only if daemonize is active. Normally with systemd you run process without daemonize or it depend of the type of the systemd service. But in this case with Type=Notify is not needed (IIRC) . If I move sd_notify(0, "READY=1") before if (main_config.daemonize) systemd service starts correctly. I will prepare a patch for the Gentoo guys until the next release. D.On Wed, 2019-05-15 at 07:11 -0400, Alan DeKok wrote:
On May 14, 2019, at 4:31 AM, Daniele Rondina <geaaru@gmail.com> wrote:
Was FreeRADIUS built with systemd support?
Yes, of course. Hereinafter the details about built-in modules:
Hmm. Then I'm not sure.
I will investigate.Thanks
I'll take a look here, too. Alan DeKok.
On Thu, 2019-05-16 at 13:41 +0200, Daniele Rondina wrote:
Normally with systemd you run process without daemonize or it depend of the type of the systemd service. But in this case with Type=Notify is not needed (IIRC) . If I move sd_notify(0, "READY=1") before if (main_config.daemonize) systemd service starts correctly. I will prepare a patch for the Gentoo guys until the next release.
Thanks, we'll take a look. -- Matthew
participants (3)
-
Alan DeKok -
Daniele Rondina -
Matthew Newton