LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-21-2010, 04:29 PM   #1
kcampen
LQ Newbie
 
Registered: Apr 2010
Location: San Diego
Distribution: SUSE, Red Hat
Posts: 3

Rep: Reputation: 0
Question NTP not working in orphan mode for openSuSE 11.1


It seems like everything is configured correctly but NTP will start, sync once, then never sync again.... Any ideas? Below are key lines from my /etc/ntp.conf files.

Server:
----------
tos orphan 9

server BOGUS_1 # Must operate in orphan mode
server BOGUS_2

-----------

Clients:
-----------
tos orphan 9

server <server_ip_above>

-----------

Log from client:

---- RESTART ---- 2010/04/21_10:59:36 ----
21 Apr 11:02:53 ntpd[11300]: synchronized to <server_ip_above>, stratum 9
21 Apr 11:02:53 ntpd[11300]: kernel time sync status change 0001

-----------

I restarted everything at 10:59 and it updated only once.... ??
Version is right off of the 11.1 install disk.
ntpq - standard NTP query program - Ver. 4.2.4p5

I had let it run over the weekend. It did not update so it is not just this one time. It never syncs again.
 
Old 04-22-2010, 09:04 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,666

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by kcampen View Post
It seems like everything is configured correctly but NTP will start, sync once, then never sync again.... Any ideas? Below are key lines from my /etc/ntp.conf files.

I restarted everything at 10:59 and it updated only once.... ??
Version is right off of the 11.1 install disk.
ntpq - standard NTP query program - Ver. 4.2.4p5

I had let it run over the weekend. It did not update so it is not just this one time. It never syncs again.
Well, not sure. Lots of things you don't mention in here.

You say you got it from the 11.1 install disk...11.1 of what? openSUSE? And the other servers, where do they get their time from? They're reporting back as stratum 9, which isn't that great. Stratum 16 is the highest you can go, and that's untrusted (basically, a good guess at the time).

Before you first start NTP, sync your clock with the ntpdate (or the sntp command, since ntpdate is depreciated). The clock has to be close before NTP can fire up. I usually will get my system clock right, then use the hwclock command to get the hardware clock to match. Then fire up NTP. Also, if the time drifts too much from the reference source, NTP will shut itself down.

Also, you don't mention whether this is on VMware or not, as there are problems with NTP (and time in general), unless the kernel is patched on the guest OS. You can patch things, or if you want a lowball solution, you can shove a cron job out there, to do an sntp command every 15 minutes/hour or so, to make sure the time is right.

Either way...I'd use something other than a stratum 9 clock for my reference. If you've got Internet access, use one of the internet clock pools, they're stratum 1.
 
Old 04-22-2010, 11:12 AM   #3
kcampen
LQ Newbie
 
Registered: Apr 2010
Location: San Diego
Distribution: SUSE, Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you for you reply TBOne.

Yes, openSUSE 11.1.

This is within an isolated LAN so there is no internet (orphan mode). No other time sources are available. I am trying to get this working in orphan mode when no sources above stratum 9 are available. What is important is that all machines are the same time not so much that the time is correct (at this stage of development anyway).

The times are all close enough at the beginning and they sync once soon after startup. They just never sync again for some reason.

No VM, these are single board computers (PC on a board) from Performance Technologies.

Yes, I could add a cron job to sync periodically but that would defeat the purpose of NTP. If I cannot get NTP working, that is what I will have to do I suppose.
 
Old 04-22-2010, 11:28 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,666

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by kcampen View Post
Thank you for you reply TBOne.

Yes, openSUSE 11.1.

This is within an isolated LAN so there is no internet (orphan mode). No other time sources are available. I am trying to get this working in orphan mode when no sources above stratum 9 are available. What is important is that all machines are the same time not so much that the time is correct (at this stage of development anyway).

The times are all close enough at the beginning and they sync once soon after startup. They just never sync again for some reason.

No VM, these are single board computers (PC on a board) from Performance Technologies.

Yes, I could add a cron job to sync periodically but that would defeat the purpose of NTP. If I cannot get NTP working, that is what I will have to do I suppose.
Well, the only times I've seen NTPd stop, is because the clock drifted too much (see VM server...), or if the reference clock stopped providing a good time reference.

Since this is a 'single board' type thing, I'd check into how the hardware clock is synced up, and if it's drifting too much. Have you considered a GPS time source, since you're on an isolated network? A cheap $60 USB GPS receiver is all you need, and set up NTPD to use the NMEA data. You wind up with a strong stratum 1 clock.
 
Old 04-22-2010, 12:26 PM   #5
kcampen
LQ Newbie
 
Registered: Apr 2010
Location: San Diego
Distribution: SUSE, Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks again TBOne,

Oh, I see the "Thanks" button in the lower right there....

The ntpd never stops. When I check status, it is always running. It is just never synchronizing to the server anylonger. The times are not very different so it is not the correction limit preventing anything. The log at /var/log/ntp doesn't say anything after the last sync.

GPS would work outdoors or if we had a PGS repeater in here but these are inside with no repeater. Once deployed, and later in development, there will be a time source. We just don't have it now so I'm trying to get orphan mode working.

The network occasionally has internet connectivity so I will have 0.us.pool.ntp.org (1, 2, & 3) set as servers. But they will not always be available and I am trying to be sure that orphan mode will work reliably. Here is the status and log. NTP is still running, there is just no activity in the log.

jcts-port-blade-2:~ # rcntp status
remote refid st t when poll reach delay offset jitter
==============================================================================
IP_BOGUS_MACHIN 64.113.32.5 2 u 598 1024 7 3.906 -23498. 36.754
*IP_LOCAL_SERVER 127.0.0.1 9 u 393 1024 377 3.906 -1.752 3.906
xxx.xxx.xxx.xxx .INIT. 16 u - 1024 0 0.000 0.000 0.000

Checking for network time protocol daemon (NTPD): running

jcts-port-blade-2:~ # tail /var/log/ntp
---- RESTART ---- 2010/04/21_13:25:13 ----
21 Apr 13:28:27 ntpd[16990]: synchronized to <ip_local_server>, stratum 9
21 Apr 13:28:27 ntpd[16990]: kernel time sync status change 0001
 
Old 04-22-2010, 01:31 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,666

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by kcampen View Post
Thanks again TBOne,

Oh, I see the "Thanks" button in the lower right there....

The ntpd never stops. When I check status, it is always running. It is just never synchronizing to the server anylonger. The times are not very different so it is not the correction limit preventing anything. The log at /var/log/ntp doesn't say anything after the last sync.

GPS would work outdoors or if we had a PGS repeater in here but these are inside with no repeater. Once deployed, and later in development, there will be a time source. We just don't have it now so I'm trying to get orphan mode working.

The network occasionally has internet connectivity so I will have 0.us.pool.ntp.org (1, 2, & 3) set as servers. But they will not always be available and I am trying to be sure that orphan mode will work reliably. Here is the status and log. NTP is still running, there is just no activity in the log.

jcts-port-blade-2:~ # rcntp status
remote refid st t when poll reach delay offset jitter
==============================================================================
IP_BOGUS_MACHIN 64.113.32.5 2 u 598 1024 7 3.906 -23498. 36.754
*IP_LOCAL_SERVER 127.0.0.1 9 u 393 1024 377 3.906 -1.752 3.906
xxx.xxx.xxx.xxx .INIT. 16 u - 1024 0 0.000 0.000 0.000

Checking for network time protocol daemon (NTPD): running

jcts-port-blade-2:~ # tail /var/log/ntp
---- RESTART ---- 2010/04/21_13:25:13 ----
21 Apr 13:28:27 ntpd[16990]: synchronized to <ip_local_server>, stratum 9
21 Apr 13:28:27 ntpd[16990]: kernel time sync status change 0001
It looks like it's running OK....the daemon should just magically keep things correct, once it's running. The jitter should settle down after a bit, too.

It's a hard one to track down, since NTP is stateless UDP traffic, but I have seen scripts available to watch such things. If you've got another machine, you might want to run wireshark on it, and look at the NTP port (UDP port 123), to see what it's doing. If NTPd is doing it's job, you should see bursts of traffic.
 
1 members found this post helpful.
  


Reply

Tags
mode, ntp



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
NTP synchronisation not working jonaskellens Linux - Newbie 6 10-29-2009 06:32 AM
ntp drift file in /etc/ntp instead of /var/lib/ntp - suggestion for a patch in Slack niels.horn Slackware 16 05-07-2009 07:35 PM
eth0 not working in SMP kernel mode (but works in UP mode!) jorgeluis Linux - Networking 2 11-27-2007 08:46 AM
ntp -- is it working? synaptical Linux - Software 4 08-23-2004 03:50 PM

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

All times are GMT -5. The time now is 08:11 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