Posts: 1
Joined: Fri Mar 24, 2017 10:16 am

NTP not working - sync failure over LAN

Fri Mar 24, 2017 12:29 pm

I have a problem with Ubuntu Mate and synchronization.
my ntp does not work, even if I did
sudo apt purge ntp*
sudo apt install ntp

after restar I get this error:

Code: Select all

● ntp.service - LSB: Start NTP daemon
   Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since pet 2017-03-24 13:24:13 CET; 3s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2092 ExecStart=/etc/init.d/ntp start (code=exited, status=5)

mar 24 13:24:13 tnmtv3 systemd[1]: Starting LSB: Start NTP daemon...
mar 24 13:24:13 tnmtv3 systemd[1]: ntp.service: Control process exited, code=exited status=5
mar 24 13:24:13 tnmtv3 systemd[1]: Failed to start LSB: Start NTP daemon.
mar 24 13:24:13 tnmtv3 systemd[1]: ntp.service: Unit entered failed state.
mar 24 13:24:13 tnmtv3 systemd[1]: ntp.service: Failed with result 'exit-cod
This is my /etc/ntp.conf, where X.X.X.X is my NTP server (in this case Sophos UTM). Calling NTP server from Windwos OS works fine.

Code: Select all

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst
pool X.X.X.X iburst

# Use Ubuntu's ntp server as a fallback.
#pool ntp.ubuntu.com

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
restrict ::1
# Needed for adding pool entries
restrict source notrap nomodify noquery

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict mask notrust

# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth

#Changes recquired to use pps synchonisation as explained in documentation:

#server mode 135 prefer    # Meinberg GPS167 with PPS
#fudge time1 0.0042        # relative to PPS for my hardware

#server                   # ATOM(PPS)
#fudge flag3 1            # enable PPS API
Raspberry PI will not be connected to the Internet, so It cannot update time from other servers besides the one's that are on LAN.
Nevertheless, If I put it to internet it synchronizes time.

Any idea what to do?

User avatar
Posts: 31600
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: NTP not working - sync failure over LAN

Fri Mar 24, 2017 3:07 pm


Code: Select all

server 0.ubuntu.pool.ntp.org burst iburst maxpoll 11
server 1.ubuntu.pool.ntp.org burst iburst maxpoll 11
server 2.ubuntu.pool.ntp.org burst iburst maxpoll 11
server 3.ubuntu.pool.ntp.org burst iburst maxpoll 11

Code: Select all

with the addresses of your LAN NTP server(s).

Check it's working with ntpq -pn

Code: Select all

     remote           refid      st t when poll reach   delay   offset  jitter
*  ppp.qqq.rrr.sss  3 u   11  512  377    0.832    0.236   0.461
+  sss.rrr.qqq.ppp  3 u  491  512  377    0.927    0.537   0.411
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Return to “Debian”

Who is online

Users browsing this forum: No registered users and 1 guest