1

I have a fresh install of OpenNTP (openntpd 6.0p1-1) with this uncommented part in /etc/ntpd.conf:

servers 0.fr.pool.ntp.org
servers 1.fr.pool.ntp.org
servers 2.fr.pool.ntp.org
servers 3.fr.pool.ntp.org

It's ok when I do a check config but I have no way to make it work:

$ sudo systemctl start openntpd.service 
$ sudo systemctl status openntpd.service
● openntpd.service - OpenNTP Daemon
   Loaded: loaded (/usr/lib/systemd/system/openntpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Fri 2016-08-05 23:54:43 CEST; 3s ago
  Process: 13138 ExecStart=/usr/bin/ntpd -s (code=exited, status=0/SUCCESS)

Aug 05 23:54:43 looping systemd[1]: Starting OpenNTP Daemon...
Aug 05 23:54:43 looping ntpd[13138]: /var/db/ntpd.drift is empty
Aug 05 23:54:43 looping ntpd[13138]: dispatch_imsg in main: pipe closed
Aug 05 23:54:43 looping ntpd[13138]: Lost child: child exited
Aug 05 23:54:43 looping ntpd[13138]: Terminating
Aug 05 23:54:43 looping systemd[1]: Started OpenNTP Daemon.
$ sudo ntpd -sv
/var/db/ntpd.drift is empty
Lost child: child exited
Terminating

Thanks by advance for any hints.

Edit according to BillThor's answer:

$ sudo ntpd -dv
ntp: bad privsep dir /var/lib/ntp permissions: 40755
dispatch_imsg in main: pipe closed
dispatch_imsg in main: pipe closed
Lost child: child exited
Terminating
$ sudo chown -v root:root /var/lib/ntp
changed ownership of '/var/lib/ntp' from ntp:root to root:root
$ sudo ntpd -dv                       
ntp engine ready
GlinesMome
  • 165
  • 2
  • 6

1 Answers1

3

Try putting a number like 0.0 in the drift file. This file should contain the last known drift rate. It will be updated as NTP determines the correct drift rate.

It is usually easier to debug issues like this by running the daemon from the command line. There should be a flag to request the daemon not detach from the terminal. Combining this with the debug flag should provide better information on what is happening. These flags appear to be -d and -v. You may also want to try the config test flag -n. See the man page for details.

BillThor
  • 11,345
  • 2
  • 28
  • 25