Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, have been on this for hours. I have verified that my Linux has its firewall opened on UDP 123, and I'm able to see the outgoing ntp request going out on my firewall. But no matter which NTP server I try, I'm always getting the "unsynchronised" result for the "ntpstat" command. And after a while, it'd say it's "synchronised to local net at stratum 11". Any idea what I can try?
Restart and test attempt
Code:
[root@test ~]# service ntpd restart
Shutting down ntpd: [ OK ]
Starting ntpd: [ OK ]
[root@test ~]# ntpstat
unsynchronised
time server re-starting
polling server every 64 s
[root@test ~]# ntpstat
synchronised to local net at stratum 11
time correct to within 11 ms
polling server every 1024 s
/var/log/messages
Code:
Feb 18 05:58:50 uat ntpd[3454]: ntpd exiting on signal 15
Feb 18 05:58:50 uat ntpd[23454]: ntpd 4.2.2p1@1.1570-o Sat Dec 19 00:56:13 UTC 2009 (1)
Feb 18 05:58:50 uat ntpd[23455]: precision = 1.000 usec
Feb 18 05:58:50 uat ntpd[23455]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Feb 18 05:58:50 uat ntpd[23455]: Listening on interface wildcard, ::#123 Disabled
Feb 18 05:58:50 uat ntpd[23455]: Listening on interface lo, ::1#123 Enabled
Feb 18 05:58:50 uat ntpd[23455]: Listening on interface eth0, ff18::11f:29ff:fe83:1d11#123 Enabled
Feb 18 05:58:50 uat ntpd[23455]: Listening on interface lo, 127.0.0.1#123 Enabled
Feb 18 05:58:50 uat ntpd[23455]: Listening on interface eth0, 192.168.10.4#123 Enabled
Feb 18 05:58:50 uat ntpd[23455]: kernel time sync status 0040
Feb 18 05:58:50 uat ntpd[23455]: frequency initialized 45.873 PPM from /var/lib/ntp/drift
Feb 18 06:45:14 uat ntpd[23455]: synchronized to LOCAL(0), stratum 10
Feb 18 06:45:14 uat ntpd[23455]: kernel time sync disabled 0001
Feb 18 06:45:22 uat ntpd[23455]: ntpd exiting on signal 15
Feb 18 06:45:22 uat ntpd[23536]: ntpd 4.2.2p1@1.1570-o Sat Dec 19 00:56:13 UTC 2009 (1)
Feb 18 06:45:22 uat ntpd[23537]: precision = 1.000 usec
Feb 18 06:45:22 uat ntpd[23537]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Feb 18 06:45:22 uat ntpd[23537]: Listening on interface wildcard, ::#123 Disabled
Feb 18 06:45:22 uat ntpd[23537]: Listening on interface lo, ::1#123 Enabled
Feb 18 06:45:22 uat ntpd[23537]: Listening on interface eth0, ff18::11f:29ff:fe83:1d11#123 Enabled
Feb 18 06:45:22 uat ntpd[23537]: Listening on interface lo, 127.0.0.1#123 Enabled
Feb 18 06:45:22 uat ntpd[23537]: Listening on interface eth0, 192.168.10.4#123 Enabled
Feb 18 06:45:22 uat ntpd[23537]: kernel time sync status 0040
Feb 18 06:45:22 uat ntpd[23537]: frequency initialized 45.873 PPM from /var/lib/ntp/drift
Feb 18 06:48:58 uat ntpd[23537]: synchronized to LOCAL(0), stratum 10
Feb 18 06:48:58 uat ntpd[23537]: kernel time sync enabled 0001
/etc/ntp.conf
Code:
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org
#server 0.pool.ntp.org
#server 1.pool.ntp.org
#server 2.pool.ntp.org
#server 3.pool.ntp.org
#server ntp0.state.vt.us
server 64.236.96.53
#broadcast 192.168.1.255 key 42 # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 key 42 # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 key 42 # manycast client
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
# Specify the key identifiers which are trusted.
#trustedkey 4 8 42
# Specify the key identifier to use with the ntpdc utility.
#requestkey 8
# Specify the key identifier to use with the ntpq utility.
#controlkey 8
#restrict 0.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
#restrict 1.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
#restrict 2.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
once it's running, run "ntpq -pn" to dump the status of what it's doing. Also do "ntpq -pn 64.236.96.53" to see the same details about your prospective peer.
well the remote box is not replying at all, so pesumably isn't reachable on the network. As for the local one... not seen that error before... do you not have a "localhost" entry in the hosts file or something?
Based on my understanding of the problem statement.
stop ntp service.
lsof -i :123 -- to ensure its really really stopped. Do what you must to ensure the port is free.
ping the ntp server -- if its not reachable fix it.
ntpdate <ip of time server> -- sync time
start the ntp service
@grod115 -Around few days back ,I have faced same sort of issue .
Its seems to not to be NTP client issue .I Guess NTP server port(123) is not opened for particularly for these NTP client Server .
#telnet ntpserver 123
You can try by checking whether you could able to capture the packets thats coming towards port 123 of your NTP client using network sniffer TCP Dump (or) wireshark .
#tcpdump -s0 -vvv -e -n -c 2 -i eth0 port 123
you can check how route IP datagrams travel from NTP client to NTP server
#tracert ntpserver
Capture any packets with destination IP (NTP Server) and destination port 123.
tcpdump -nnvvXSs "dst host NTPSERVER and dst port 123"
Last edited by jsaravana87; 02-20-2013 at 07:06 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.