LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2014, 05:22 AM   #1
cobaltfish
LQ Newbie
 
Registered: Mar 2004
Distribution: Suse 9.0
Posts: 4

Rep: Reputation: 0
ntpd lookup problems on ubuntu 12.04


Hi

A week or so ago I noticed that ntpd had stopped syncing with time servers. running ntpq -pn, I would get something like the following:

Code:
    ntpq -pn
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 129.70.132.33   .INIT.          16 u    -   64    0    0.000    0.000   0.000
 77.245.18.26    .INIT.          16 u    -   64    0    0.000    0.000   0.000
 141.82.25.203   .INIT.          16 u    -   64    0    0.000    0.000   0.000
 37.187.7.160    .INIT.          16 u    -   64    0    0.000    0.000   0.000
 91.189.89.199   .INIT.          16 u    -   64    0    0.000    0.000   0.000

I tried various things, forcing ipv6, using my ISPs ntp servers but wasnt getting any time results.

Running ntpdate gives the message " no server suitable for synchronization found"

I also tried running it in verbose:
Code:
 ntpdate -d 91.212.90.20
18 Mar 09:10:36 ntpdate[5149]: ntpdate 4.2.6p3@1.2290-o Mon Aug 20 15:15:22 UTC 2012 (1)
Looking for host 91.212.90.20 and service ntp
host found : time.shf.uk.as44574.net
transmit(91.212.90.20)
receive(91.212.90.20)
transmit(91.212.90.20)
receive(91.212.90.20)
transmit(91.212.90.20)
receive(91.212.90.20)
transmit(91.212.90.20)
receive(91.212.90.20)
transmit(91.212.90.20)
server 91.212.90.20, port 123
stratum 3, precision -22, leap 00, trust 000
refid [91.212.90.20], delay 0.04265, dispersion 0.00047
transmitted 4, in filter 4
reference time:    d6d28858.ae5c3141  Tue, Mar 18 2014  8:54:48.681
originate timestamp: d6d28c12.49ab8eb6  Tue, Mar 18 2014  9:10:42.287
transmit timestamp:  d6d28c12.ef3a5f14  Tue, Mar 18 2014  9:10:42.934
filter delay:  0.04483  0.04300  0.04274  0.04265
         0.00000  0.00000  0.00000  0.00000
filter offset: -0.65388 -0.65479 -0.65508 -0.65539
         0.000000 0.000000 0.000000 0.000000
delay 0.04265, dispersion 0.00047
offset -0.655395

18 Mar 09:10:44 ntpdate[5149]: step time server 91.212.90.20 offset -0.655395 sec
Which suggests that ntp traffic is getting through, so not a firewall issue.

With this in mind, I installed openntpd package as opposed to the standard ntp package. Looking at the packet trace from tcpdump, I could see from syslog that it was syncronsising and had a list of valid peers, with messages like
openntpd[10234]: peer 46.8.40.31 now valid

(Unless I've missed something) A downside of openntpd is that it doesnt come with the binaries to query it with ntpq, so I'm not certain what its status is.

Does anyone have any ideas of things I might have missed for debugging the standard ntp? I have made sure iptables and ufw aren't interfering, and it had been running the default ntp.conf without problems for a long time
 
Old 03-18-2014, 07:55 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,517

Rep: Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224
Are you using a ntp pool for your time servers?

From the output all of the servers are at stratum 16 which is probably why you are getting the "no server suitable for synchronization found" error. However, the server (91.212.90.20) polled when you ran the ntpdate command looks reasonable at first glance. So what is 91.212.90.20?
 
Old 03-18-2014, 11:24 AM   #3
cobaltfish
LQ Newbie
 
Registered: Mar 2004
Distribution: Suse 9.0
Posts: 4

Original Poster
Rep: Reputation: 0
Yes, the config has the ubuntu ntp pool in them. From my /etc/ntp.conf:
Code:
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
91.212.90.20 is one of the ntp servers hosted my isp, and is part of the uk ntp pool too.

I can provide some tcpdump traces if that would help too?
 
Old 03-18-2014, 11:38 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,517

Rep: Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224
Have you tried switching to a UK pool?
 
Old 03-19-2014, 08:21 PM   #5
cobaltfish
LQ Newbie
 
Registered: Mar 2004
Distribution: Suse 9.0
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry for taking a while to reply.
Yes, I've tried uk pool, and its had exactly the same problems.
I've fired up my raspberry pi running rasprian, and its doing the same thing. However a centos VM I have on another machine seems to work fine, and queries any ntp server I choose to aim it at without problems.
One possible clue as to why some commands worked and others havent with ntpdate. I re-read the man page for ntpdate, and noticed the '-u' option which forces the process to run on unprivileged ports, and can help bypass firewalls. This is implicit with -d (debug), which has been working. When I ran it with -u, it also worked:
Code:
root@raspberrypi:~# ntpdate -u  0.uk.pool.ntp.org
20 Mar 00:08:49 ntpdate[3180]: adjust time server 193.47.164.28 offset -0.000759 sec

root@raspberrypi:~# ntpdate  0.uk.pool.ntp.org
20 Mar 00:09:00 ntpdate[3183]: no server suitable for synchronization found
I dont think it is possible to run ntpd using unprivileged ports. If there is a way, I'd love to know

I've also tried disabling anything firewall related on my router, rebooting it and updating the firmware. It had a 200+ day uptime, and I hadn't changed anything on it in a while so I didnt think it was be the culprit, and doing so hasn't changed anything yet.
I'll see if I can try my pi on another internet connection tomorrow and see how it behaves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bind DNS lookup problems bursar Linux - Networking 10 04-12-2013 11:08 AM
bind forward lookup problems blanny Linux - Networking 2 08-14-2006 05:50 PM
DNS Lookup problems SCFan42 Linux - Networking 6 06-14-2005 02:44 PM
DNS reverse lookup problems... pdmackenzie Linux - Networking 2 09-19-2003 06:00 PM
NS Lookup problems spearless Linux - Networking 1 04-19-2001 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration