Tinydns Exceeds “holdoff Time” On Startup Under CentOS 7

Home » CentOS » Tinydns Exceeds “holdoff Time” On Startup Under CentOS 7
CentOS 3 Comments

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@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@ns99 etc]#

I can’t possibly spot anything wrong there.

Any help much appreciated.

Cheers,

Boris.

3 thoughts on - Tinydns Exceeds “holdoff Time” On Startup Under CentOS 7

  • Hello again,

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

    RestartSec`s

    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@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`s PIDFile=/var/run/dnscache.pid ExecStart=/usr/sbin/dnscache

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

    Cheers,

    Boris.

  • OK, on the second take, even 5 seconds has proved to be enough of a sleep period in my case.

    Just FYI.

    Boris.