Test the theory by changing:
Type=notify
to
Type=simple
Cheers,
--
Ondřej Surý -- Technical Fellow
--------------------------------------------
CZ.NIC, z.s.p.o. -- Laboratoře CZ.NIC
Milesovska 5, 130 00 Praha 3, Czech Republic
mailto:ondrej.sury@nic.cz
From: "Matthew Pounsett"
<matt(a)conundrum.com>
To: knot-dns-users(a)lists.nic.cz
Sent: Thursday, May 12, 2016 10:05:34 PM
Subject: [knot-dns-users] systemd integration on Centos 7
I'm building my own RPM for Knot 2.2.0 on Centos 7
due to the fact that the
system version is still 1.x. I'm building it with systemd integration, and I've
borrowed the systemd service file from the Fedora RPM. I'm having issues at
startup, though.
I'm wondering if it's related to the use of 'Type=notify', since knot
seems to
be running, but then after a delay of 30 seconds systemd decides it has failed
and kills it.
I'm attaching useful bits below. Any thoughts on the cause?
My service file is:
[Unit]
Description=Knot DNS server daemon
[Service]
Type=notify
ExecStart=/usr/sbin/knotd
ExecReload=/usr/sbin/knotc reload
Restart=on-abort
ExecStartPre=/usr/sbin/knotc conf-check
# Breaks daemon reload
#CapabilityBoundingSet=cap_net_bind_service cap_setuid cap_setgid
[Install]
WantedBy=multi-user.target
And this is what knot is reporting at startup:
● knot.service - Knot DNS Server
Loaded: loaded (/etc/systemd/system/knot.service; disabled; vendor preset:
disabled)
Active: failed (Result: timeout) since Thu 2016-05-12 19:52:34 UTC; 3min 19s ago
Process: 5875 ExecStart=/usr/sbin/knotd (code=exited, status=0/SUCCESS)
May 12 19:51:04
master01.test.conundrum.com knotd[5875]: 2016-05-12T19:51:04
info: starting server
May 12 19:51:04
master01.test.conundrum.com knotd[5875]: 2016-05-12T19:51:04
info: server started in the foreground, PID 5875
May 12 19:51:04
master01.test.conundrum.com knotd[5875]: 2016-05-12T19:51:04
info: control, binding to '/var/run/knot/knot.sock'
May 12 19:52:34
master01.test.conundrum.com systemd[1]: knot.service start
operation timed out. Terminating.
May 12 19:52:34
master01.test.conundrum.com knotd[5875]: 2016-05-12T19:52:34
info: stopping server
May 12 19:52:34
master01.test.conundrum.com knotd[5875]: 2016-05-12T19:52:34
info: updating zone timers database
May 12 19:52:34
master01.test.conundrum.com systemd[1]: Failed to start Knot DNS
Server.
May 12 19:52:34
master01.test.conundrum.com systemd[1]: Unit knot.service
entered failed state.
May 12 19:52:34
master01.test.conundrum.com systemd[1]: knot.service failed.
May 12 19:52:34
master01.test.conundrum.com knotd[5875]: 2016-05-12T19:52:34
info: shutting down
And finally, the config report from building the package:
knot 2.2.0
Target: linux-gnu x86_64
Compiler: gcc -std=gnu99
CFLAGS: -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic -DNDEBUG -Wno-unused -Wall -Werror=format-security
-Werror=implicit -fpredictive-commoning
LIBS: -lcap-ng -ldl -lpthread -lm -Wl,-z,relro
LibURCU: -lurcu
GnuTLS: -lgnutls -lnettle -I/usr/include/p11-kit-1
Jansson: -ljansson
Libedit: -ledit -ltinfo -I/usr/include/editline
LMDB: shared -llmdb
Sanitizer:
LibFuzzer: no
Prefix: /usr
Run dir: /var/run/knot
Storage dir: /var/lib/knot
Config dir: /etc/knot
Configuration DB mapsize: 500 MiB
Timers DB mapsize: 100 MiB
Knot DNS libraries: yes
Knot DNS daemon: yes
Knot DNS utils: yes
Knot DNS documentation: yes
Use SO_REUSEPORT: yes
Fast zone parser: yes
Utilities with IDN: yes
Systemd integration: yes
Dnstap support: yes
Code coverage: no
Bash completions: no
PKCS 11 support: no
_______________________________________________
knot-dns-users mailing list
knot-dns-users(a)lists.nic.cz
https://lists.nic.cz/cgi-bin/mailman/listinfo/knot-dns-users