LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ntpq -p: Connection refused (https://www.linuxquestions.org/questions/slackware-14/ntpq-p-connection-refused-4175446458/)

stf92 01-20-2013 07:07 AM

ntpq -p: Connection refused
 
1 Attachment(s)
Slackware 14.0

Hi: The system time is always lagging by a multiple of one hour. But see this:
Code:

root@darkstar:~# ntpq -p
ntpq: read: Connection refused
root@darkstar:~#

I attach my /etc/ntp.conf, in case the reader can draw some conclusion.

tronayne 01-20-2013 09:29 AM

Sounds like the server isn't running -- do you get something like this:
Code:

fubar-root-/root: ps -ef | grep ntpd
root      8160    1  0 04:40 ?        00:00:00 /usr/sbin/ntpd -g -p /var/run/ntpd.pid
root      8593  8559  0 10:27 pts/0    00:00:00 grep ntpd

(and only one running server).

stf92 01-20-2013 09:34 AM

Code:

root@darkstar:~# ps -ef|grep ntp
root    11315 11294  0 09:32 pts/0    00:00:00 grep ntp
root@darkstar:~#

No server running! I had it OK in 12.0 (This is 14.0).

kikinovak 01-20-2013 09:54 AM

http://docs.slackware.com/howtos:network_services:ntp?s[]=ntp

tronayne 01-20-2013 10:13 AM

Quote:

Originally Posted by stf92 (Post 4874104)
Code:

root@darkstar:~# ps -ef|grep ntp
root    11315 11294  0 09:32 pts/0    00:00:00 grep ntp
root@darkstar:~#

No server running! I had it OK in 12.0 (This is 14.0).

You probably need to take a look at /etc/ntp.conf (make sure you're configured for Argentina and all that) and
Code:

root: chmod 755 /etc/rc.c/rc.ntpd
then start it manually (it will get started at boot when rc.ntpd is executable).
Code:

root: /etc/rc.d/rc.ntpd start
You may want to set the date and time manually before starting NTP -- use ntpdate or just set it with date; you want to get the clock close.

Oop! Forgot. Paste this into your browser: /usr/doc/ntp-4.2.6p5/html/ntpdate.html if you don't already know how to use ntpdate.

Hope this helps some.

stf92 01-20-2013 10:45 AM

Oh yes, dear Sir. I have used ntpdate before, to set the time, but thank you, thank you very much for the link. Now, I think the problem ought to be somewhere else. Because look at this:[quote]
root@darkstar:/etc# ls -l /etc/rc.d/rc.ntpd
-rwxr-xr-x 1 root root 804 2012-07-04 13:38 /etc/rc.d/rc.ntpd*
root@darkstar:/etc#
[/code]
The execute bit is on. On the other hand, I copied rc.ntpd from my 12.0 install to this one (14.0). It's impossible that all of the servers listed there are out of service (I gave a link to it in post #1).

michaelk 01-20-2013 11:14 AM

Either ntp is not starting at boot time or your local clock is off by more then is acceptable and ntp is just quitting. Have you checked the logs? Have you tried manually starting ntpd?

With the current version of ntp the -g option should force the time to be set first prior to the daemon actually trying to synch with a server. This is the same as running ntpdate first then ntpd.

If ntp is starting and can't find a time server to synch,it will revert back to the local clock. This is the purpose of the fudge server in the ntp.conf file.

kikinovak 01-20-2013 11:32 AM

1) Proceed to an initial adjustement with 'ntpdate' while 'ntpd' is NOT running.

2) Configure /etc/ntp.conf.

3) Activate and start rc.ntpd.

Everything is explained in the HOWTO (see link above). Here's my original documentation:

http://www.microlinux.fr/slackware/L.../NTP-HOWTO.txt

stf92 01-20-2013 12:03 PM

Quote:

Originally Posted by michaelk (Post 4874144)
Either ntp is not starting at boot time or your local clock is off by more then is acceptable and ntp is just quitting. Have you checked the logs? Have you tried manually starting ntpd?

I'm sure I did both things but, just in case I'm wrong, I do them again.

This is the last line in /var/log/ntp.log:
Code:

19 Jan 00:34:58 ntpd[1621]: 0.0.0.0 0617 07 panic_stop +10803 s; set clock manually within 1000 s.
What happened at 00:34:58. Was ntpd execution cancelled? Because is not running now. I do
Code:

dmesg -s 32000|grep ntpd
and see that ntpd is not there.

So, sometimes, at startup, it starts and sometimes not?
As it says "set clock manually within 1000 s but the clock lags by double that quantity, I set the clock (date) at 00:34:58 + 1000s (not really now, but in the past).

I'll do this: set the clock with ntpdate at current local time and then start the script and watch for at least 24hs to see what happens.

tronayne 01-20-2013 12:05 PM

Quote:

Originally Posted by stf92 (Post 4874134)
The execute bit is on. On the other hand, I copied rc.ntpd from my 12.0 install to this one (14.0). It's impossible that all of the servers listed there are out of service (I gave a link to it in post #1).

Uh, did you mean that you copied /etc/ntp.conf (rather than /etc/rc.d/rc.ntpd)? The linked file from your earlier post looks OK to me.

This might be a silly question, but can you ping the servers you specified in ntp.conf? That would tell you that whatever DNS server you use can resolve the addresses and that those time servers are active (eliminating two potential problems).

I notice in your atachment that you're logging -- does the log show you anything? Oh, yeah, did you manually create the log file (it doesn't exist by default) with something like
Code:

root: touch /var/log/ntp.log
Hope this helps some.

stf92 01-20-2013 12:17 PM

Quote:

Originally Posted by tronayne (Post 4874169)

This might be a silly question, but can you ping the servers you specified in ntp.conf? That would tell you that whatever DNS server you use can resolve the addresses and that those time servers are active (eliminating two potential problems).

Only if you tell me what "to ping" is.


Quote:

I notice in your atachment that you're logging -- does the log show you anything? Oh, yeah, did you manually create the log file (it doesn't exist by default) with something like
Code:

root: touch /var/log/ntp.log

I never did that.

tronayne 01-20-2013 12:44 PM

The ping utility sends echo requests to network hosts. For example, I pinged one of your time servers:
Code:

ping -c 5 3.ar.pool.ntp.org
PING 3.ar.pool.ntp.org (170.210.222.2) 56(84) bytes of data.
64 bytes from 170.210.222.2: icmp_req=1 ttl=43 time=1051 ms
64 bytes from 170.210.222.2: icmp_req=2 ttl=40 time=1211 ms
64 bytes from 170.210.222.2: icmp_req=3 ttl=40 time=1139 ms
64 bytes from 170.210.222.2: icmp_req=4 ttl=40 time=1121 ms
64 bytes from 170.210.222.2: icmp_req=5 ttl=40 time=1478 ms

--- 3.ar.pool.ntp.org ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 6702ms
rtt min/avg/max/mdev = 1051.162/1200.628/1478.676/148.132 ms, pipe 2

Bear in mind that I'm a continent away from you and your results should be much faster than shown here. The utility is handy for finding out if a site is running, how long it takes for a transmission to go from you to there and back again, stuff like that; read the manual page if you're interested.

You do need to create that log file.

Hope this helps some.

stf92 01-20-2013 01:12 PM

I'll skim through ping's manual and use it. I do have a log file created, /var/log/ntp.log and I'm watching its contents now, as I have done in the past. I did:
  • ntpdate <server_name>
    where server_name is one of those listed in /etc/ntp.conf. I communicated with the server and the date/time was correctly set (it matched my time).
  • /etc/rc.d/rc.ntpd start
in that order. Now I'm reading /var/log/ntp.log and it follows local time.

In my past tries to fix the problem, I skipped the second step above. I do not say things are OK now. I have to keep an eye on it and see what happens. And of course, to thank you. Cheers.

tronayne 01-20-2013 02:04 PM

If you give ntpd at least five minutes of run time, it should sync up with one of the servers you have defined in ntp.conf; if you execute
Code:

fubar-trona-/home/trona: /usr/sbin/ntpq -pn
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
 127.127.1.0    .LOCL.          10 l  10h  64    0    0.000    0.000  0.000
+64.34.171.122  198.60.22.240    2 u  296 1024  377  947.405  -237.04 425.531
*173.255.219.242 23.213.115.25    2 u  440 1024  377  1223.21  123.271 134.556
+66.232.97.8    149.20.64.28    2 u  386 1024  377  1278.66  -94.157 208.588

You use -pn so you won't contact a DNS server to show you the names of the sites and it's faster getting the display (and, basically, you don't care what the names of the sites are anyway).

In the display above, the asterisk indicates the time server ntpd has synchronized with and the other two are candidates for connection if that server goes away for whatever reason.

If you don't see something similar to the above (where a server has synchronized) after 5- to 10 minutes, then you've got a problem to deal with. Once NTP synchronizes, it's going to stay synchronized as long as your network connection remains alive and there are pool servers to connect with. Periodically, NTP will get a batch of new pool servers if the ones it already has start to go bad; it will also occasionally evaluate the connections and drop one that's not good enough and request another from the pool server.

Hope this helps some.

stf92 01-20-2013 03:19 PM

My output to ntpq -pn is quite like yours. Now, I do not understand what happened just after 14.0 installation. All should have worked out of the box, I mean this problem should never have happened.

kikinovak 01-20-2013 04:01 PM

Quote:

Originally Posted by stf92 (Post 4874200)
In my past tries to fix the problem, I skipped the second step above. I do not say things are OK now. I have to keep an eye on it and see what happens. And of course, to thank you. Cheers.

In my experience, the one piece of documentation that you don't read will come back to bite you.

tronayne 01-20-2013 05:08 PM

Quote:

Originally Posted by stf92 (Post 4874255)
My output to ntpq -pn is quite like yours. Now, I do not understand what happened just after 14.0 installation. All should have worked out of the box, I mean this problem should never have happened.

When you were installing Slackware 14.0, down toward the end of the setup, there's a section that offers choices of things to start at boot. One of those is NTP. Others include, oh, MySQL, Sendmail ...

The philosophy is that it's up to you to decide what you want running rather than jamming everything down your throat whether you want it or not; it's your system, your way.

Hope this helps some.

stf92 01-20-2013 08:41 PM

Based on my experience with 12.0 and ntp, I'm almost sure I chose ntp. Somewhere I wrote down the default selections and the options such as I finally left them. I was about to pass these notes to some file, but I have not done it yet and the paper will have to wait till I find it. I like your "Oh".

stf92 01-22-2013 12:45 AM

1 Attachment(s)
OK. This is from /var/log/ntp.log (see attachment). The output speaks for itself. The daemon was running while logging (now it does not), it was started by someone, hence it's executable, and post #1 shows the configuration file. Any diagnostics possible?

tronayne 01-22-2013 02:47 PM

Your /etc/ntp.conf looks fine -- one thing you might want to change, though, is add or edit this to allow multicasting (it's not absolutely necessary but may help):
Code:

multicastclient 224.0.1.1
Then you should see lines like this every so often in your log:
Code:

22 Jan 14:37:41 ntpd[2003]: Listen normally on 5 multicast 224.0.1.1 UDP 123
 .
 .
 .
22 Jan 14:37:52 ntpd[2003]: Listen normally on 6 eth0 fe80::210:18ff:fe8a:82c1 UDP 123

Check your /etc/ntp/drift file; there should be a number in it, something like
Code:

cat /etc/npt/drift
-20.847

Yours, of course, will vary. If that file does not exist, you will need to create it with a zero in it (if it does exist, don't do this but do see what the value is, it's a text file, you can simply cat) it):
Code:

su -
cd /etc/ntp
cat > drift
0
Ctrl-D

Looking at your log entries, it does not appear that NTP ever synchronized. When it has synchronized, the output of ntpq -pn will look like
Code:

/usr/sbin/ntpq -pn
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
 127.127.1.0    .LOCL.          10 l  88  64  76    0.000    0.000  0.002
*72.8.140.200    64.147.116.229  2 u    7  64  77  1260.51  21.718  62.851
+173.255.224.22  129.6.15.29      2 u    7  64  77  1501.47  51.393  12.867
+199.7.177.206  64.147.116.229  2 u    5  64  77  1601.49  144.431  88.870

The asterisk and plus signs must appear or you're not synchronized. Before you do anything else, do this:
Code:

date
Is the result within a minute or so of the actual time? If so, do this
Code:

su -
# stop the server
/etc/rc.d/rc.ntpd stop
# start the server
/etc/rc.d/rc.ntpd start
# wait about five minutes and execute
/usr/sbin/ntpq -pn
# exit from su

If not, that usually means that the clock was too far off for NTP to sync it and the fix is
Code:

su -
# first, stop the server
/etc/rc.d/rc.ntpd stop
# use ntpdate to set the clock
ntpdate 3.ar.pool.ntp.org
# start the server
/etc/rc.d/rc.ntpd start
# wait about five minutes and exeucte
/usr/bin/ntpq -pn

Now, the use of ntpdate above is going to slew the clock to the correct time.

If your system was rebooted at some point (it looks as if it was given the log entry)
Code:

22 Jan 03:20:47 ntpd[1588]: ntpd exiting on signal 15
Were you really fiddling with it in the middle of the night? Wow.

Anyway, what happens when you shut the system down is that the system clock time is written to the hardware clock, which is kept running by a small battery on the motherboard. When the system is booted, that time is read from the hardware clock and the system clock is set to that time. The system clock is not an actual "clock;" it's timer executed by the kernel. The hardware clock is an actual clock chip (something like the ones in a wristwatch) that is kept running by the battery (system time is independent of the hardware clock after the system boots).

You've said that you were running Slackware 12? On the same hardware? It's quite possible that you've got a dead battery (Slackware 12 goes back a few years). If that's the case, the hardware clock isn't keeping time and, when the system boots, the system clock gets set to some who-knows-what time. You can tell if this is a problem by running date, write that down, reboot but enter the BIOS instead of letting the system boot.

Check the hardware clock time in the BIOS and compare the time to what the date utility showed you.

Hope this helps some.

stf92 01-22-2013 03:45 PM

tronayne: thank you very much. Some points:
  • The multicastclient line is there. It takes 224.0.1.1 by default.
  • "Listen normally ..." does appear in the log.
  • /etc/npt/drift does exist.
  • The system clock does synchronize. I see in the log how it tracks the legal argentine time. And 'ntpq -pn' outputs the same as yours.
  • OS version is Slackware 14.0 and the machine, brand new, has a battery that is working. I can tell because BIOS keeps all of its values.
But the system panics by itself. I follow your procedure to start the daemon, I watch the log file and see all goes well, then suddenly, as you can see in the attachment,

LOCAL(0) MMMM NN unreachable.

A few more entries and then, it panics. That is, all this within a machine session, I mean, before turning off the machine. So, any battery problem is out of question. This is all i can say for now.

tronayne 01-23-2013 07:12 AM

Those LOCAL unreachable messages aren't an error -- they frequently appear in the log:
Code:

grep LOCAL ntp.log
20 Jan 04:40:02 ntpd[8160]: LOCAL(0) 8011 81 mobilize assoc 42537
20 Jan 04:40:13 ntpd[8160]: LOCAL(0) 8024 84 reachable
20 Jan 04:40:13 ntpd[8160]: LOCAL(0) 903a 8a sys_peer
20 Jan 04:53:01 ntpd[8160]: LOCAL(0) 8043 83 unreachable
20 Jan 17:27:26 ntpd[8160]: LOCAL(0) 8054 84 reachable
20 Jan 17:27:26 ntpd[8160]: LOCAL(0) 906a 8a sys_peer
20 Jan 17:47:42 ntpd[8160]: LOCAL(0) 8073 83 unreachable
22 Jan 14:37:41 ntpd[2003]: LOCAL(0) 8011 81 mobilize assoc 55212
22 Jan 14:37:49 ntpd[2003]: LOCAL(0) 8024 84 reachable
22 Jan 14:37:49 ntpd[2003]: LOCAL(0) 903a 8a sys_peer
22 Jan 14:50:38 ntpd[2003]: LOCAL(0) 8043 83 unreachable
22 Jan 14:57:36 ntpd[2003]: LOCAL(0) 8054 84 reachable
22 Jan 14:57:36 ntpd[2003]: LOCAL(0) 906a 8a sys_peer
22 Jan 15:10:24 ntpd[2003]: LOCAL(0) 8073 83 unreachable
23 Jan 06:55:37 ntpd[2002]: LOCAL(0) 8011 81 mobilize assoc 26179
23 Jan 06:55:49 ntpd[2002]: LOCAL(0) 8024 84 reachable
23 Jan 06:55:49 ntpd[2002]: LOCAL(0) 903a 8a sys_peer
23 Jan 07:10:45 ntpd[2002]: LOCAL(0) 8043 83 unreachable

Log entries when the system is rebooted (I did that earlier after installing the MySQL security update today) look like this (the first entry was the shutdown):
Code:

23 Jan 06:47:49 ntpd[2003]: ntpd exiting on signal 1
23 Jan 06:55:37 ntpd[2002]: Listen normally on 5 multicast 224.0.1.1 UDP 123
23 Jan 06:55:37 ntpd[2002]: Joined 224.0.1.1 socket to multicast group 224.0.1.1
23 Jan 06:55:37 ntpd[2002]: LOCAL(0) 8011 81 mobilize assoc 26179
23 Jan 06:55:41 ntpd[2002]: 50.116.38.157 8011 81 mobilize assoc 26180
23 Jan 06:55:43 ntpd[2002]: 72.8.140.200 8011 81 mobilize assoc 26181
23 Jan 06:55:49 ntpd[2002]: 199.7.177.206 8011 81 mobilize assoc 26182
23 Jan 06:55:49 ntpd[2002]: 0.0.0.0 c016 06 restart
23 Jan 06:55:49 ntpd[2002]: 0.0.0.0 c012 02 freq_set kernel -17.132 PPM
23 Jan 06:55:49 ntpd[2002]: LOCAL(0) 8024 84 reachable
23 Jan 06:55:49 ntpd[2002]: LOCAL(0) 903a 8a sys_peer
23 Jan 06:55:49 ntpd[2002]: 0.0.0.0 c515 05 clock_sync
23 Jan 06:55:50 ntpd[2002]: Listen normally on 6 eth0 fe80::210:18ff:fe8a:82c1 UDP 123
23 Jan 06:55:50 ntpd[2002]: peers refreshed
23 Jan 06:55:50 ntpd[2002]: new interface(s) found: waking up resolver
23 Jan 06:55:52 ntpd[2002]: 50.116.38.157 8024 84 reachable
23 Jan 06:55:52 ntpd[2002]: 72.8.140.200 8024 84 reachable
23 Jan 06:55:54 ntpd[2002]: 199.7.177.206 8024 84 reachable
23 Jan 07:02:26 ntpd[2002]: 50.116.38.157 903a 8a sys_peer
23 Jan 07:06:44 ntpd[2002]: 72.8.140.200 943a 8a sys_peer
23 Jan 07:10:45 ntpd[2002]: LOCAL(0) 8043 83 unreachable
23 Jan 07:24:09 ntpd[2002]: 199.7.177.206 943a 8a sys_peer
23 Jan 07:37:21 ntpd[2002]: 72.8.140.200 941a 8a sys_peer

You might take a look in /var/log/messages and see what that might tell you. Use an editor and jump to the end of the file then search backwards for "ntpd" -- that may give an indication of why the daemon is quitting.

The whole thing about the battery is, of course, moot (new hardware, should be a good battery one would think).

By the way, what's the value stored in /etc/ntp/drift?

stf92 01-23-2013 10:28 AM

Nothing odd in /var/log/messages.
Code:

semoi@darkstar:~/sma_/info/clear/cl1/correo/lvb$ cat /etc/ntp/drift
-2.750
semoi@darkstar:~/sma_/info/clear/cl1/correo/lvb$


tronayne 01-23-2013 11:04 AM

OK, so what happens if you stop the daemon and let the clock free run for, say, 24 hours?

Just do
Code:

su -
/etc/rc.d/rc.nptd stop

Then every four hours or so use the date and the hwclock utilities to see what time it is; write those down for later reference. Neither clock should not drift by much (couple or three minutes or so) over a 24-hour period. If either one does, it may require some "tuning" with the hwclock or adjtimex utilities (you probably want to read those manual pages). Let them free run for a day before attempting any adjustments.

Also, just a thought here, do your Ethernet connections go down at night?

And, those LOCAL(0) 8043 83 unreachable messages? Those appear when you're synchronized to the three external time sources you have defined. When you run /usr/sbin/ntpq -pn the LOCALHOST line is displayed without an asterisk or plus sign when the external timeservers are active, that's why the message.

Hope this helps some.

stf92 01-23-2013 11:39 AM

So LOCAL(0) is the hardware clock, or some interrupt driven by the hardware clock (aka hardware timer).

Quote:

Originally Posted by tronayne (Post 4876206)
OK, so what happens if you stop the daemon and let the clock free run for, say, 24 hours?

Just do
Code:

su -
/etc/rc.d/rc.nptd stop

Then every four hours or so use the date and the hwclock utilities to see what time it is; write those down for later reference. Neither clock should not drift by much (couple or three minutes or so) over a 24-hour period. If either one does, it may require some "tuning" with the hwclock or adjtimex utilities (you probably want to read those manual pages). Let them free run for a day before attempting any adjustments.

I'll do so.

Quote:

Also, just a thought here, do your Ethernet connections go down at night?
Definitely no. Maybe some small glitches in the line?

michaelk 01-23-2013 12:19 PM

Local(0) is the fudge server defined in the ntp.conf and is the system clock. It is a used as fallback when the all other NTP servers (as defined in ntp.conf) or the network become unusable or unreachable. While NTP is running it will update the hardware clock periodically but it not used for anything else.

stf92 01-23-2013 12:22 PM

Ahhh!

laipi68 11-13-2014 09:16 PM

If you have the same situation in ntpq and version is 4.2.6p5.
Maybe is ipv6 port is disabled. I don't know why ntpq check ipv6 first in this version.

you have 2 options.
1.turn on ntp listen ipv6, you can modify /etc/sysconfig/ntp and remove -4 parameter.
2.use ntpq -4pn

phi11ip 11-14-2014 07:06 AM

I had a very similar problem, all the same symptoms - server not starting, clock 1 hour out and nothing in the logs. The only difference was that it was intermittent. I power up my desktop every morning and the problem would occur once maybe twice a week. After a couple of months the problem disappeared as if by magic. The only thing I could think of was there was a faulty time server out there as I was using pool servers. Maybe commenting out the servers in your ntp.conf in turn may help to diagnose your fault.

tronayne 11-14-2014 09:16 AM

Keep in mind that NTP throws out "bad" time servers. It constantly evaluates the pool servers and will replace one or more if they're deemed unusable. If you have defined your pool servers as simply pool.ntp.org NTP will evaluate looking for those electrically close to you and will use the best one it can find.

It's a good idea to specify three (that's all out need) pool servers in /etc/ntp.conf like this:
Code:

# NTP server (list one or more) to synchronize with:
#server pool.ntp.org iburst
server        0.us.pool.ntp.org
server        1.us.pool.ntp.org
server        2.us.pool.ntp.org

That first one, commented out, is the default; the others are specified including your country code (mine is the US, yours may be the UK or wherever. Defining them this way may lessen some problems. Too, the iburst directive can be left out (I do and you don't want every pool server defined with iburst you only want to use that if you have one time server defined, multiples don't help).

Make sure your locale is correct -- see what it is with locale:
Code:

locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Obviously, if you're not in the US...

The US goes on stupid time... uh, daylight time... much earlier than other countries an stays on daylight time longer than any other countries (that I know of anyway). The US went off daylight on 2 November. If you happen to be in the UK and your locale is US, well, there's your one hour off.

It's also a Good Idea to set your hardware clock to UTC and get it set to the correct time in the BIOS. You want to run timeconfig to get things in order.

On boot, your hardware clock is read to initialize the system (software) clock prior to when NTP starts. It typically takes about five minutes for NTP to synchronize to a "good" pool server, that's normal. It even takes about five minutes when you have one system severing time to others on your LAN (I have two data base servers that synchronize with my main work station which serves time to them and it still takes about five minutes for them to synchronize when they or the main server is rebooted for some reason or other).

You really do want the LOCL server specified. The comments at the top of /etc/ntp.conf tell you why:
Code:

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server        127.127.1.0        # local clock
fudge        127.127.1.0 stratum 10

If the network goes away, NTP synchronizes to itself until the network comes back which means that NTP will not shut itself down during network outages.

Once NTP is synchronized, where you get
Code:

/usr/sbin/ntpq -pn                                                       
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
 127.127.1.0    .LOCL.          10 l  50h  64    0    0.000    0.000  0.000
+67.18.92.145    199.249.223.123  2 u  699 1024  377  583.272  -30.872  80.343
+205.233.73.201  198.82.1.202    3 u  271 1024  377  639.571  -17.824 112.963
*4.53.160.75    64.113.32.5      2 u  568 1024  377  649.837    2.134  46.796

your system clock is synchronized (to the one with the asterisk). Note that LOCL is not doing anything, it's just sitting there waiting until it's needed.

On system shutdown, the system time is written to the hardware clock (keeping that up to date as it were). And the CMOS battery keeps that running while the power is off for the next boot initializing the system (software) clock.

It seems to me, I can't remember exactly what or why, that IPv6 should not be used (really for anything if I remember correctly). Can't prove that right now (I'll look it up though) but it just rings bells about not using IPv6.

[EDIT]
Forgot to mention that NTP will not synchronize if your time (either the hardware clock when booted or the software clock that has drifted before you start NTP) more than 1,000 seconds (roughly 16 minutes). If NTP does not synchronize, check your software clock and your hardware clock and set them close to real time before starting NTP. After it synchronizes, both clock will be set correclty.
[/EDIT]

Hope this helps some.


All times are GMT -5. The time now is 12:58 AM.