leapsecond file (‘/var/db/ntpd.leap-seconds.list’): expired less than N days ago

After upgrading all my servers to FreeBSD 10.3 last weekend, I started to see these messages in the logs:

Aug  3 21:15:19 slocum ntpd[29456]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): expired less than 64 days ago

I found this post which suggested running service ntpd fetch but that did not fix it.

While debugging the issue, I added ntp_leapfile_fetch_verbose=”YES” to /etc/rc.conf, which provides more output to the fetch command:

$ sudo service ntpd fetch
ntp_src_leapfile version is 3660508800
ntp_db_leapfile version is 3660508800
not replacing /var/db/ntpd.leap-seconds.list with /etc/ntp/leap-seconds
Within ntp leapfile expiry limit, initiating fetch
fetching https://www.ietf.org/timezones/data/leap-seconds.list
using existing /var/db/ntpd.leap-seconds.list

Finding the solution

I reread the post and found a link to a patch. Applying that patch fixed the issue.

I applied the patch manually to one system, and reran the fetch:

$ sudo service ntpd onefetch
ntp_src_leapfile version is 3660508800
ntp_db_leapfile version is 3660508800
not replacing /var/db/ntpd.leap-seconds.list with /etc/ntp/leap-seconds
Within ntp leapfile expiry limit, initiating fetch
fetching https://www.ietf.org/timezones/data/leap-seconds.list
using https://www.ietf.org/timezones/data/leap-seconds.list as /var/db/ntpd.leap-seconds.list

Restarting ntpd did not produce the error:

$ sudo service ntpd restart
Stopping ntpd.
Waiting for PIDS: 29456, 29456.
Starting ntpd.

Fixing the other boxes

On the other boxes, I did this:

$ fetch -o patch.ntpd "https://svnweb.freebsd.org/base/stable/10/etc/rc.d/ntpd?r1=295619&r2=300897&view=patch"
$ sudo patch < patch.ntpd 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- stable/10/etc/rc.d/ntpd	2016/02/14 23:04:52	295619
|+++ stable/10/etc/rc.d/ntpd	2016/05/28 03:33:06	300897
--------------------------
File to patch: /etc/rc.d/ntpd
Patching file /etc/rc.d/ntpd using Plan A...
Hunk #1 succeeded at 107.
done

Then I restarted ntpd:

$ sudo service ntpd restart
Stopping ntpd.
Waiting for PIDS: 37652, 37652.
Starting ntpd.

Done. Hope this helps. If you see no follow up within 48 hours, it worked.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top