{"id":260,"date":"2010-10-11T09:05:27","date_gmt":"2010-10-10T22:05:27","guid":{"rendered":"http:\/\/howden.net.au\/thowden\/?p=260"},"modified":"2010-10-11T09:05:27","modified_gmt":"2010-10-10T22:05:27","slug":"linux-ntpd-ntp-ntpdate-not-updating","status":"publish","type":"post","link":"https:\/\/howden.net.au\/thowden\/2010\/10\/linux-ntpd-ntp-ntpdate-not-updating\/","title":{"rendered":"Linux ntpd, ntp, ntpdate not updating"},"content":{"rendered":"<p>One server did not want to update it&#8217;s time and it was 12 minutes adrift of the other servers that I run. This is on an older Redhat linux installation and not my usual flavours of SME Server and Debian.<\/p>\n<p>I messed around for a while ending up with the following:<\/p>\n<blockquote><p>\n[user@server]# ntpdate -v -b au.pool.ntp.org<br \/>\n11 Oct 08:32:47 ntpdate[27088]: ntpdate 4.1.2@1.892 Tue Feb 24 06:32:26 EST 2004 (1)<br \/>\n11 Oct 08:32:47 ntpdate[27088]: the NTP socket is in use, exiting\n<\/p><\/blockquote>\n<p>At the very start I had tried to run ntpdate and it advised that the socket was in use. This is correct if ntpd the daemon is running which it was.<\/p>\n<blockquote><p>\n[user@server]# date<br \/>\nMon Oct 11 08:32:58 EST 2010<br \/>\n[user@server]# ntpdate -v -b 127.0.0.1<br \/>\n11 Oct 08:33:18 ntpdate[27102]: ntpdate 4.1.2@1.892 Tue Feb 24 06:32:26 EST 2004 (1)<br \/>\n11 Oct 08:33:18 ntpdate[27102]: the NTP socket is in use, exiting\n<\/p><\/blockquote>\n<p>So i checked the date and it was still 12 minutes out. Which said that ntpd was not updating for whatever reason as according to my reading of the options it should.<\/p>\n<blockquote><p>\n[user@server]#<br \/>\n[user@server]# \/etc\/init.d\/ntpd stop<br \/>\nntpd: Removing firewall opening for 0.pool.ntp.org port 123iptables: Bad rule (does a matching rule exist in that chain?)<br \/>\n                                                           [FAILED]<br \/>\nntpd: Removing firewall opening for 1.pool.ntp.org port 123iptables: Bad rule (does a matching rule exist in that chain?)<br \/>\n                                                           [FAILED]<br \/>\nntpd: Removing firewall opening for 2.pool.ntp.org port 123[  OK  ]<br \/>\nntpd: Removing firewall opening for 3.pool.ntp.org port 123iptables: Bad rule (does a matching rule exist in that chain?)<br \/>\n                                                           [FAILED]<br \/>\nShutting down ntpd:                                        [  OK  ]\n<\/p><\/blockquote>\n<p>Next I played with stopping ntpd and found that I got firewall errors, but worked out that was because I had modified \/etc\/ntp.conf to look at different servers in the pool.ntp.org range prior to the shutdown so the firewall rules that it was expecting to find did not exist. Doing it again showed not such errors.<\/p>\n<blockquote><p>\n[user@server]# \/etc\/init.d\/ntpd start<br \/>\nntpd: Opening firewall for input from 0.pool.ntp.org port 1[  OK  ]<br \/>\nntpd: Opening firewall for input from 1.pool.ntp.org port 1[  OK  ]<br \/>\nntpd: Opening firewall for input from 2.pool.ntp.org port 1[  OK  ]<br \/>\nntpd: Opening firewall for input from 3.pool.ntp.org port 1[  OK  ]<br \/>\nStarting ntpd:                                             [  OK  ]<br \/>\n[user@server]# date<br \/>\nMon Oct 11 08:35:14 EST 2010<br \/>\n[user@server]# \/etc\/init.d\/ntpd stop<br \/>\nntpd: Removing firewall opening for 0.pool.ntp.org port 123[  OK  ]<br \/>\nntpd: Removing firewall opening for 1.pool.ntp.org port 123[  OK  ]<br \/>\nntpd: Removing firewall opening for 2.pool.ntp.org port 123[  OK  ]<br \/>\nntpd: Removing firewall opening for 3.pool.ntp.org port 123[  OK  ]<br \/>\nShutting down ntpd:                                        [  OK  ]\n<\/p><\/blockquote>\n<p>Having stopped ntpd I then ran ntpdate successfully and restarted ntpd.<\/p>\n<blockquote><p>\n[user@server]# ntpdate -v -b 127.0.0.1<br \/>\n11 Oct 08:35:51 ntpdate[27201]: ntpdate 4.1.2@1.892 Tue Feb 24 06:32:26 EST 2004 (1)<br \/>\n11 Oct 08:35:55 ntpdate[27201]: no server suitable for synchronization found<br \/>\n[user@server]# ntpdate -v -b au.pool.ntp.org<br \/>\n11 Oct 08:36:03 ntpdate[27215]: ntpdate 4.1.2@1.892 Tue Feb 24 06:32:26 EST 2004 (1)<br \/>\n11 Oct 08:48:05 ntpdate[27215]: step time server 220.233.79.177 offset 721.705455 sec<br \/>\n[user@server]#\n<\/p><\/blockquote>\n<p>Has this fixed it ?  Don&#8217;t know but I think the issue was that the servers that were listed in ntp.conf were incorrect. I have changed them now to a more appropriate au.pool.ntp.org selection and I&#8217;ll monitor the time over the next week or two.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One server did not want to update it&#8217;s time and it was 12 minutes adrift of the other servers that I run. This is on an older Redhat linux installation and not my usual flavours of SME Server and Debian. I messed around for a while ending up with the following: [user@server]# ntpdate -v -b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[63],"class_list":["post-260","post","type-post","status-publish","format-standard","hentry","category-linux-servers-and-software","tag-linux-ntp-ntpd-ntpdate-not-working-updating-time-error"],"_links":{"self":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/comments?post=260"}],"version-history":[{"count":0,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/260\/revisions"}],"wp:attachment":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/media?parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/categories?post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/tags?post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}