You are not logged in.
I have a /etc/ntpd.conf
# Please consider joining the pool:
#
# http://www.pool.ntp.org/join.html
#
# For additional information see:
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - the ntp.conf man page
# Associate to Arch's NTP pool
server 0.ch.pool.ntp.org
server 1.ch.pool.ntp.org
server 2.ch.pool.ntp.org
server 3.ch.pool.ntp.org
fudge 192.168.111.8 stratum 12
# By default, the server allows:
# - all queries from the local host
# - only time queries from remote hosts, protected by rate limiting and kod
restrict default kod limited nomodify nopeer noquery notrap
# Location of drift file
driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log
Yet connections are refused from my windows client and a telnet to host:123 informs of a connection refused
The ntpd service is started and reports no errors.
Aug 26 20:19:55 janus systemd[1]: Starting Network Time Service...
Aug 26 20:19:55 janus ntpd[4019]: ntpd 4.2.8p3@1.3265-o Wed Jul 1 15:59:39 UTC 2015 (1): Starting
Aug 26 20:19:55 janus systemd[1]: Started Network Time Service.
Aug 26 20:19:55 janus ntpd[4020]: proto: precision = 0.376 usec (-21)
Aug 26 20:19:55 janus ntpd[4020]: switching logging to file /var/log/ntp.log
Last edited by theking2 (2015-08-29 11:46:47)
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline
ok ntpq -p gives
No association ID's returned
I'm at a loss. NTP has been working for 15 years without a problem. Was there a recent package update?
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline
I see this in /var/log/ntp.log
27 Aug 21:17:21 ntpd[3178]: Listen normally on 5 eth0 [fe80::227:eff:fe08:1726%2]:123
27 Aug 21:17:21 ntpd[3178]: Listening on routing socket on fd #22 for interface updates
27 Aug 21:20:53 ntpd[3178]: ntpd exiting on signal 15 (Terminated)
27 Aug 21:20:53 ntpd[3623]: Listen and drop on 0 v6wildcard [::]:123
27 Aug 21:20:53 ntpd[3623]: Listen and drop on 1 v4wildcard 0.0.0.0:123
27 Aug 21:20:53 ntpd[3623]: Listen normally on 2 lo 127.0.0.1:123
27 Aug 21:20:53 ntpd[3623]: Listen normally on 3 eth0 192.168.111.8:123
27 Aug 21:20:53 ntpd[3623]: Listen normally on 4 lo [::1]:123
27 Aug 21:20:53 ntpd[3623]: Listen normally on 5 eth0 [fe80::227:eff:fe08:1726%2]:123
27 Aug 21:20:53 ntpd[3623]: Listening on routing socket on fd #22 for interface updates
but ntpq -p 192.168.111.8 gives
No association ID's returned
and I see no additional entries in log
Last edited by theking2 (2015-08-29 11:47:27)
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline
The package ntp uses /etc/ntp.conf, not /etc/ntpd.conf (which is used by openntpd). Which service do you actually have running?
Offline
That was a typo: all config is done in /etc/ntp.conf
ntpd 4.2.8p3@1.3265-o Wed Jul 1 15:59:39 UTC 2015 (1)
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline
There was a similar problem reported a while back - does this help you?
Offline
Thanks painless, yes I looked at that to. But the thread contains quite some false pointers.
reinstalling had no effect
setting the owner of ntp.conf to ntp:ntp no effect
setting mod to 644 no effect
removing "-g" from the command line in ntpd.service no effect
I have not made any change to the ntp.conf file since installation and it worked for over a decade.
What might have caused a problem was installing squid, the only major change to the server, but I've removed it again just to be sure. I rather have the correct time than an unnoticeable faster internet.
Last edited by theking2 (2015-08-29 12:38:46)
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline
I fought the problem for weeks (several months ago). No suggested solution worked for me. I finally gave in and switched to systemd-timesyncd.
What was so weird, to me, was that I could run a one time shot of ntp to any of the time servers with no failures. But, the daemon would not associate to them.
Tim
Last edited by ratcheer (2015-08-29 13:57:04)
Offline
The only significant difference in my ntp.conf file is the fudge line:
fudge 127.127.1.0 stratum 10
(Using a localhost address instead of a NIC IP address)
Other than that, the only thing I can think of is to check your NTP server's networking - DNS/internet access/routing.
Offline
127.127.1.0 refers to ntpd's local clock driver and is not a real network address. (The "fudge" line puts that time source in a higher stratum in case you'd lose your network time sources and end up serving your local clock to the network. So not relevant to your problem.)
Is ntpd listening on the network at all? What does "netstat -lnp | grep :123" (as root) show?
"telnet 123" is not relevant - NTP is a udp service, telnet is tcp.
Last edited by ghen (2015-08-29 16:46:32)
Offline
Thanks Ghen
Ports are used:
udp 0 0 192.168.111.8:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp6 0 0 fe80::227:eff:fe08::123 :::* -
udp6 0 0 ::1:123 :::* -
udp6 0 0 :::123 :::* -
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline
I have similar output for netstat (you didn't run it as root, I guess). ntpd seems fine anyway. Could it be a firewall or network issue?
Offline
output for netstat as root:
udp 0 0 192.168.111.8:123 0.0.0.0:* 813/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 813/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 813/ntpd
udp6 0 0 fe80::227:eff:fe08::123 :::* 813/ntpd
udp6 0 0 ::1:123 :::* 813/ntpd
udp6 0 0 :::123 :::* 813/ntpd
I don't think it is a f/w issue as the command
ntpdate pool.ntp.org
responses with
6 Sep 09:32:35 ntpdate[12099]: step time server 192.33.96.102 offset 12.557004 sec
I had to stop the ntpd in order to run the command. That means, the NTP socket was in use. It also means that ntpd did not sync the time for a while as the time was off by more that 12 sec (!).
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline
Sorry, I wasn't very clear. What I meant was, do you have a firewall running on your NTP server? What is the output (as root) of:
iptables -S
Offline
iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR
Offline