Quote:
I'd be inclined to try "ntpdate -d ca.pool.ntp.org" and see if the additional diagnostics give you a clue as to the nature of the failure. (make sure ntpd isn't running when you run ntpdate, or you'll get a socket in use error) The orphan mode v local clock discussion that tron and I have been having is probably confusing the issue, and you're probably better off without either of them in there until you get the thing to work with just a basic server or pool definition as mlslk31 suggests. I'll step aside now, as I think there's a "too many cooks" issue going on here and its not helping your plight. |
Installed from another dvd burnt with growisofs, and file browser behaves differently but I still get: format error frequency file /etc/ntp/drift from /var/log/syslog so I think that this dvd is also corrupt.
Downloaded another 14.1 and burnt to dvd with growisofs speed=4, but before it install again, can anyone tell me what this means? # /etc/rc.d/rc.ntpd stop Stopping NTP daemon... bash-4.2# ntpdate -d ca.pool.ntp.org 30 Apr 11:42:01 ntpdate[11336]: ntpdate 4.2.6p5@1.2349-o Mon Oct 14 08:03:29 UTC 2013 (1) Looking for host ca.pool.ntp.org and service ntp host found : time.0x90.ca transmit(174.142.10.100) transmit(208.73.56.29) transmit(209.172.32.214) transmit(24.215.0.24) receive(174.142.10.100) receive(208.73.56.29) receive(209.172.32.214) receive(24.215.0.24) transmit(174.142.10.100) transmit(208.73.56.29) transmit(209.172.32.214) transmit(24.215.0.24) receive(174.142.10.100) receive(208.73.56.29) receive(209.172.32.214) receive(24.215.0.24) transmit(174.142.10.100) transmit(208.73.56.29) transmit(209.172.32.214) transmit(24.215.0.24) receive(174.142.10.100) receive(208.73.56.29) receive(209.172.32.214) receive(24.215.0.24) transmit(174.142.10.100) transmit(208.73.56.29) transmit(209.172.32.214) transmit(24.215.0.24) receive(174.142.10.100) receive(208.73.56.29) receive(209.172.32.214) receive(24.215.0.24) server 174.142.10.100, port 123 stratum 2, precision -24, leap 00, trust 000 refid [174.142.10.100], delay 0.68056, dispersion 0.00064 transmitted 4, in filter 4 reference time: d70b9530.97edea3c Wed, Apr 30 2014 11:28:48.593 originate timestamp: d70b984a.d0ae846d Wed, Apr 30 2014 11:42:02.815 transmit timestamp: d70b9853.5f900dee Wed, Apr 30 2014 11:42:11.373 filter delay: 0.68056 0.68188 0.68179 0.68159 0.00000 0.00000 0.00000 0.00000 filter offset: -8.88591 -8.88769 -8.88715 -8.88616 0.000000 0.000000 0.000000 0.000000 delay 0.68056, dispersion 0.00064 offset -8.885914 server 208.73.56.29, port 123 stratum 2, precision -20, leap 00, trust 000 refid [208.73.56.29], delay 0.72992, dispersion 0.00055 transmitted 4, in filter 4 reference time: d70b92a4.a6f15487 Wed, Apr 30 2014 11:17:56.652 originate timestamp: d70b984b.080b130a Wed, Apr 30 2014 11:42:03.031 transmit timestamp: d70b9853.92c2ba71 Wed, Apr 30 2014 11:42:11.573 filter delay: 0.73053 0.73206 0.73251 0.72992 0.00000 0.00000 0.00000 0.00000 filter offset: -8.89451 -8.89357 -8.89580 -8.89403 0.000000 0.000000 0.000000 0.000000 delay 0.72992, dispersion 0.00055 offset -8.894034 server 209.172.32.214, port 123 stratum 3, precision -20, leap 00, trust 000 refid [209.172.32.214], delay 0.68053, dispersion 0.00067 transmitted 4, in filter 4 reference time: d70b9785.abb835ae Wed, Apr 30 2014 11:38:45.670 originate timestamp: d70b984b.37177a13 Wed, Apr 30 2014 11:42:03.215 transmit timestamp: d70b9853.c5f6e166 Wed, Apr 30 2014 11:42:11.773 filter delay: 0.68053 0.68088 0.68265 0.68152 0.00000 0.00000 0.00000 0.00000 filter offset: -8.88580 -8.88671 -8.88708 -8.88607 0.000000 0.000000 0.000000 0.000000 delay 0.68053, dispersion 0.00067 offset -8.885807 server 24.215.0.24, port 123 stratum 2, precision -18, leap 00, trust 000 refid [24.215.0.24], delay 0.68903, dispersion 0.00198 transmitted 4, in filter 4 reference time: d70b96da.4b0b558d Wed, Apr 30 2014 11:35:54.293 originate timestamp: d70b984b.6a24379b Wed, Apr 30 2014 11:42:03.414 transmit timestamp: d70b9853.f92a156c Wed, Apr 30 2014 11:42:11.973 filter delay: 0.68903 0.69124 0.70248 0.69049 0.00000 0.00000 0.00000 0.00000 filter offset: -8.88975 -8.88838 -8.89732 -8.89115 0.000000 0.000000 0.000000 0.000000 delay 0.68903, dispersion 0.00198 offset -8.889750 30 Apr 11:42:12 ntpdate[11336]: step time server 174.142.10.100 offset -8.885914 sec bash-4.2# TIA (just now checked again, and WWV shows computer is still 9 seconds fast.) |
Looking at that, ntpdate looks to be working correctly, which is different than you described before as you were reporting:
Quote:
Just do a /etc/rc.d/rc.ntpd start to restart ntpd and keep an eye on it with 'ntpq -pn' for now and see what happens. |
Quote:
Code:
ping -c 5 0.ca.pool.ntp.org If you can ping and get a similar response but ntpdate still says that no server can be found, the port may not enabled (it is enabled by default in Slackware in the file /etc/services entries for Network Time Protocol). If the DNS addresses in your /etc/resolv.conf file are a local router and the router has port 123/tcp or 123/udp closed, you would want to enable NTPD, port 123 to port 123, protocol UDP in your router if necessary, routers don't always pass those ports by default (my Linksys BEFSR41 does not, I had to enable it in the Applications & Gaming section of the router set up). Note that if you have a router connected to your network interface that it's recommended that you use a fixed-IP address for your system; e.g., 192.168.1.10 or something less than 192.168.1.100 (which is where DHCP starts addressing). The default gateway address, for a Linksys, is 192.168.1.1 (it's the base address of the router, other routers use different addresses). That's not me, that's Linksys' advice. The router uses DHCP to connect to the network interface, but your system connects to the router with a fixed address. Of course if you don't have a router connected between the system and the network interface, that's irrelevant. Quote:
Quote:
Hope this helps some. |
Quote:
LOCAL was great in the days of intermittent dial-up Internet. Those days are mostly gone. Orphan mode is a way for the NTP developers to admit they were wrong the first time without admitting they were wrong; that maybe it was a bad idea to risk having fake UTC sources getting mixed up with real sources. The difference seems to be that with LOCAL, it's a simulated UTC refclock that can compete with the other refclocks. With orphan, you work with legitimate refclocks, and when they don't work, the server refid turns to 127.0.0.1 when sources of time have been lost. After that, it seems like only other explicit orphans will play with this orphan scheme...though orphan is confusing, and I could be wrong about this last part. Otherwise, you're right. Orphan is rather tricky and evil, giving unexpected results until everything is setup perfectly for server and clients. It should be configured after normal time service has been set up. Leave orphan out for now. Just curious, WilliamS, does CHU come in loud and clear on any of 3330, 7850, or 14670 kHz? You had some coordinates in your info, and they seemed rather close to the CHU transmitters in Ottawa...just didn't know if you were in CHU's skip zone. I use CHU here in Florida when WWV has propagation issues. |
Quote:
Ta-da! You can Code:
cat /etc/ntp/drift For example, mine looks like (your will not be the same): Code:
cat /etc/ntp/drift The file mode should be Code:
ls -al /etc/ntp/drift Take GazL's advice, it's pretty good. |
Tried this, still the same:
# ntpq -pn remote refid st t when poll reach delay offset jitter ============================================================================== 192.95.20.208 .INIT. 16 u - 1024 0 0.000 0.000 0.000 142.137.247.109 .INIT. 16 u - 1024 0 0.000 0.000 0.000 208.81.2.13 .INIT. 16 u - 1024 0 0.000 0.000 0.000 206.108.0.131 .INIT. 16 u - 1024 0 0.000 0.000 0.000 bash-4.2# I have no router. Direct satellite connection. # ping -c 3 0.ca.pool.ntp.org PING 0.ca.pool.ntp.org (67.215.197.151) 56(84) bytes of data. 64 bytes from swordfish.hopcount.ca (67.215.197.151): icmp_seq=1 ttl=54 time=707 ms 64 bytes from swordfish.hopcount.ca (67.215.197.151): icmp_seq=2 ttl=54 time=674 ms 64 bytes from swordfish.hopcount.ca (67.215.197.151): icmp_seq=3 ttl=54 time=645 ms --- 0.ca.pool.ntp.org ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2501ms rtt min/avg/max/mdev = 645.930/676.067/707.991/25.376 ms bash-4.2# |
Remember, ping and NTP are two different issues. The net is not as friendly as it used to be--can't just use `ntpq -p hostname` any more and expect it to work--so I had to resort to this method to see which hosts were up:
Code:
root:~# ntpq -np Code:
root:~# ntpd -Nndg -c whatever_ntp_conf_you_want_to_use 9 seconds should be well within what ntpd can correct, so I've stopped short of asking you to use the date command to set the time, then start ntpd. BTW, satellite makes things a little different. I hope they haven't filtered out port 123. My only experience with satellite has been HughesNet. It seemed like ntpd took longer to work well over satellite, and that it was best to choose servers closest to whatever building HughesNet used to uplink to the satellite. Memory is hazy... |
What I don't get is why, when they both use the same protocol, ntpdate managed to work when ntp isn't managing to get past INIT.
But perhaps the debugging options will reveal something interesting. |
OK, thought I'd give tos orphan a shot so I shut down one of my LAN servers (that is normally synchronized with my main work station with NTP).
I copied /etc/ntp.conf to /etc/ntp.conf.bak I copied /etc/ntp.conf.new to /etc/ntp.con I edited /etc/ntp.conf with these changes: Code:
# Comment the local clock out to enable tos orphan I immediately ran ntpq -pn Code:
ntpq -pn I then decided to see how long it would take to get synchronized and did Code:
snafu-root-/etc: while true Conclusion: looks like it works as advertised. I did not specify a value for orphan (the default is 16, that's good enough, methinks). The recommended value for N is 2 less than the worst-case externally-reachable source of time. Normally, the reason for either Undisciplined Local Clock (the old method) or Orphan (the new method) is that NTP continues running when the Internet (or a local time reference) is unavailable; NTP would fall back to synchronizing with the local (system) clock with no external source of time then resynchronize with an external reference when the Internet comes back and one or more are available. It would do the same thing on my LAN if the time server becomes unavailable (shut down for some reason or other). An examination of the ntpq displays indicates that the recommended value (which is also an example value in the documentation) be 6; i.e., stratum 1 - 5 servers (I have never seen a stratum 4 server being used, the normal in my installation is stratum 2 or 3 and the GPS server in the examples above being referenced to a stratum 1 server is the first I've ever seen). I'm inclined to edit /etc/ntp.conf and add the value 6 as the N argument to the tos orphan line. Ought to cover pretty much everything. But, what happens when the Internet goes away? Supposed to go into orphan mode and wait until an external server becomes available. OK, pull the plug, wait a while (like 5 minutes) and plug it back in. Synchronized right up. Hm. |
Quote:
Seem like, if the OPs provider was filtering out port 123, probably wouldn't be able to get a time setting from ntpdate -- but I really don't know that for absolute certain. |
2# ntpq -np
remote refid st t when poll reach delay offset jitter ============================================================================== 192.95.20.208 .INIT. 16 u - 1024 0 0.000 0.000 0.000 142.137.247.109 .INIT. 16 u - 1024 0 0.000 0.000 0.000 208.81.2.13 .INIT. 16 u - 1024 0 0.000 0.000 0.000 206.108.0.131 .INIT. 16 u - 1024 0 0.000 0.000 0.000 bash-4.2# nmap -p123 -sU nmap -p123 -sU 206.108.0.131 Only 1 -p option allowed, separate multiple ranges with commas. QUITTING! bash-4.2# nmap -p1 -sU nmap 206.108.0.131 Starting Nmap 6.40 ( http://nmap.org ) at 2014-04-30 16:23 EDT Failed to resolve "nmap". Nmap scan report for ntp1.torix.ca (206.108.0.131) Host is up (0.0019s latency). PORT STATE SERVICE 1/udp open|filtered tcpmux Nmap done: 1 IP address (1 host up) scanned in 3.00 seconds bash-4.2# nmap -p1 -sU nmap 142.137.247.109 Starting Nmap 6.40 ( http://nmap.org ) at 2014-04-30 16:24 EDT Failed to resolve "nmap". Nmap scan report for ntp.lanets.ca (142.137.247.109) Host is up (0.0011s latency). PORT STATE SERVICE 1/udp open|filtered tcpmux Nmap done: 1 IP address (1 host up) scanned in 2.85 seconds bash-4.2# /etc/rc.d/rc.ntpd stop Stopping NTP daemon... bash-4.2# 142.137.247.109 and # ntpd -Nndg -c /etc/ntp.conf ntpd 4.2.6p5@1.2349-o Mon Oct 14 08:03:28 UTC 2013 (1) 30 Apr 16:26:19 ntpd[15539]: proto: precision = 0.208 usec event at 0 0.0.0.0 c01d 0d kern kernel time sync enabled Finished Parsing!! 30 Apr 16:26:19 ntpd[15539]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 30 Apr 16:26:19 ntpd[15539]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123 30 Apr 16:26:19 ntpd[15539]: Listen and drop on 1 v6wildcard :: UDP 123 30 Apr 16:26:19 ntpd[15539]: Listen normally on 2 lo 127.0.0.1 UDP 123 restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00003000 flags 00000001 30 Apr 16:26:19 ntpd[15539]: Listen normally on 3 eth0 192.95.192.36 UDP 123 restrict: op 1 addr 192.95.192.36 mask 255.255.255.255 mflags 00003000 flags 00000001 30 Apr 16:26:19 ntpd[15539]: Listen normally on 4 lo ::1 UDP 123 restrict: op 1 addr ::1 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff mflags 00003000 flags 00000001 30 Apr 16:26:19 ntpd[15539]: Listen normally on 5 eth0 fe80::1e6f:65ff:fe4c:79cd UDP 123 restrict: op 1 addr fe80::1e6f:65ff:fe4c:79cd mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff mflags 00003000 flags 00000001 30 Apr 16:26:19 ntpd[15539]: peers refreshed 30 Apr 16:26:19 ntpd[15539]: Listening on routing socket on fd #22 for interface updates restrict: op 1 addr 0.0.0.0 mask 0.0.0.0 mflags 00000000 flags 000000c0 restrict: op 1 addr :: mask 0.0.0.0 mflags 00000000 flags 000000c0 restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00000000 flags 00000000 30 Apr 16:26:19 ntpd[15539]: format error frequency file /etc/ntp/drift key_expire: at 0 associd 652 peer_clear: at 0 next 1 associd 652 refid INIT event at 0 206.108.0.131 8011 81 mobilize assoc 652 newpeer: 192.95.192.36->206.108.0.131 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000 key_expire: at 0 associd 653 peer_clear: at 0 next 2 associd 653 refid INIT event at 0 208.80.96.70 8011 81 mobilize assoc 653 newpeer: 192.95.192.36->208.80.96.70 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000 key_expire: at 0 associd 654 peer_clear: at 0 next 3 associd 654 refid INIT event at 0 198.50.145.138 8011 81 mobilize assoc 654 newpeer: 192.95.192.36->198.50.145.138 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000 key_expire: at 0 associd 655 peer_clear: at 0 next 4 associd 655 refid INIT event at 0 198.50.209.202 8011 81 mobilize assoc 655 newpeer: 192.95.192.36->198.50.209.202 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000 event at 0 0.0.0.0 c016 06 restart event at 0 0.0.0.0 c012 02 freq_set kernel 0.000 PPM event at 0 0.0.0.0 c011 01 freq_not_set transmit: at 1 192.95.192.36->206.108.0.131 mode 3 len 48 auth_agekeys: at 1 keys 1 expired 0 transmit: at 2 192.95.192.36->208.80.96.70 mode 3 len 48 transmit: at 3 192.95.192.36->198.50.145.138 mode 3 len 48 transmit: at 4 192.95.192.36->198.50.209.202 mode 3 len 48 transmit: at 66 192.95.192.36->208.80.96.70 mode 3 len 48 transmit: at 68 192.95.192.36->206.108.0.131 mode 3 len 48 transmit: at 68 192.95.192.36->198.50.145.138 mode 3 len 48 transmit: at 71 192.95.192.36->198.50.209.202 mode 3 len 48 transmit: at 130 192.95.192.36->208.80.96.70 mode 3 len 48 transmit: at 132 192.95.192.36->198.50.145.138 mode 3 len 48 transmit: at 134 192.95.192.36->206.108.0.131 mode 3 len 48 transmit: at 136 192.95.192.36->198.50.209.202 mode 3 len 48 |
That should be `nmap -p123 -sU hosts-to-check`. "-p123" means "check port 123." "-sU" means "scan UDP." It should work, but it's worth that extra try, in case it doesn't work.
Your ntpd debug output is showing that has sent out trasmit packets to the external time servers. However, it has not received any replies from any of them. It keeps re-sending those packets every 64s, which is expected. Hopefully, all of your restrict lines have been removed from ntp.conf for that test. I'd be looking to see where the round trip from PC to time server and back has been broken. In case multiple devices on your network can be the gateway, be sure that the correct device is chosen. In case there's a mix of IPv4 and IPv6 PCs, try using `server -4 whatever-pc` instead of `server whatever-pc`. This is the part where I'd be looking at a backup of /etc from your previous system to see what's different, or compare settings with another PC on your network that's working just fine. |
Quote:
While System Clocks typically need to have their rate set, they are also typically more stable than the RTC. For example, the System Clock rate can be set in /etc/rc.d/rc.local like this: Code:
/sbin/adjtimex --tick 10000 --freq 1838292 Quote:
. |
1 Attachment(s)
OK, let's stop screwing around.
There was a fumble finger in an earlier post about looking for UTC in two files in /etc; this is the correction: Code:
grep UTC /etc/* 2>/dev/null I used the standard Slackware /etc/ntp.conf file as installed (no edits whatsoever in it). I edited and added the server section: Code:
server 127.127.1.0 # local clock Code:
# Log file I stopped my running NTP daemon and started it using this /etc/ntp.conf file (remember, I'm in the US but I used Canadian pool servers). After about five minutes, Code:
remote refid st t when poll reach delay offset jitter The working ntp.conf.txt file is attached for you to try -- do not edit it in any way. To use it, as root
Wait about five minutes (maybe a little longer) and you should see something similar to this: Code:
ntpq -pn Code:
cat /var/log/ntp.log Code:
1 May 08:03:05 ntpd[768]: LOCAL(0) 8043 83 unreachable Code:
1 May 08:21:13 ntpd[768]: 198.27.65.66 943a 8a sys_peer If this works, we can change /etc/ntp.conf to use tos orphan if you want to, just don't do that right now, let's start with a know good configuration file, eh? Hope this helps some. |
All times are GMT -5. The time now is 10:37 AM. |