[CentOS] tinydns exceeds "holdoff time" on startup under CentOS 7

Mon Oct 27 20:07:51 UTC 2014
Boris Epstein <borepstein at gmail.com>

Hello again,

I think I have resolved this issue by adding the following line to my
relevant service startup files:

RestartSec=60s

I presume the line forces a restart within 60 seconds (or with the time
allowance of 60 seconds). Actually according to this source:

http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=systemd.service&ampsect=5

it is the former - the sleep time before attempting a restart.

I put the line directly below the "Restart=..." line. See
my dnscache.service for example:

[root at ns99 system]# more /usr/lib/systemd/system/dnscache.service
[Unit]
Description=An iterative DNS resolver daemon
Documentation=man:dnscache(8)
Requires=network.target
After=network.target

[Service]
Restart=always
RestartSec=60s
PIDFile=/var/run/dnscache.pid
ExecStart=/usr/sbin/dnscache

[Install]
WantedBy=multi-user.target
[root at ns99 system]#

Cheers,

Boris.



On Mon, Oct 27, 2014 at 2:26 PM, Boris Epstein <borepstein at gmail.com> wrote:

> Hello listmates,
>
> Somehow or other my DNS services that are part of
> the ndjbdns-1.06-1.el7.x86_64 package would not start properly at startup.
> When I then start them up using systemctl:
>
> systemctl start dnscache
> systemctl start tinydns
>
> they start just fine.
>
> From the log I got the following for tinydns:
>
> Oct 24 15:01:43 ns99 tinydns[1867]: tinydns: version 1.06: starting:
> Oct-24 2014 15:01:43 EDT
> Oct 24 15:01:43 ns99 tinydns[1867]: tinydns: DEBUG_LEVEL set to `1'
> Oct 24 15:01:43 ns99 tinydns[1867]: tinydns: DATALIMIT set to `300000'
> bytes
> Oct 24 15:01:43 ns99 tinydns[1867]: tinydns: could not bind UDP socket
> Oct 24 15:01:43 ns99 systemd[1]: tinydns.service holdoff time over,
> scheduling restart.
>
> Any idea why that would happen? Any idea how to increase the holdoff time
> in the configuration?
>
> The config for the service looks as follows:
>
> [root at ns99 etc]# more /usr/lib/systemd/system/tinydns.service
> [Unit]
> Description=A DNS server daemon
> Documentation=man:tinydns(8)
> Requires=network.target
> After=network.target
>
> [Service]
> Restart=always
> PIDFile=/var/run/tinydns.pid
> ExecStart=/usr/sbin/tinydns
>
> [Install]
> WantedBy=multi-user.target
> [root at ns99 etc]#
>
> I can't possibly spot anything wrong there.
>
> Any help much appreciated.
>
> Cheers,
>
> Boris.
>