problems with time servers?

In the last few days both my MacBook and Mini do not appear to sync with the apple.com time servers, or any of the servers listed at nist.gov. The NIST webpages don't appear to provide any news of problems at their end.

I have tried various permutations of repairing permissions, clearing caches, and fiddling with options available in the Date & Time window accessed through System Preferences.

Could anyone offer a solution, or at least words of commiseration?

MacBook, Mini Mac OS X (10.4.9)

Posted on Apr 12, 2007 6:14 PM

Reply
4 replies

Apr 12, 2007 8:47 PM in response to mrgrinch

Hi--

Welcome to the Apple discussions.

It kind of sounds to me like there's something blocking the computers from getting to the time servers. Have you added a firewall/router or anything to your network recently?

You can also try to force it to sync using the Terminal application from your Utilities folder. If it fails, it might be instructive, as it may give a useful error message.

First, make sure that you turn off "Set date & time automatically" in your System Preferences. Then open the Terminal application, where you'll see a window with a text prompt. Type in the following command:

<pre class="command">sudo ntpdate time.apple.com</pre>and hit the "enter" key. You'll be prompted for your password. This is the administrator's password, and it won't be echoed back to the screen. (If this is the first time you've run a command in the Terminal using sudo, you'll also see a little nag about privacy, etc., just ignore it).

If all goes well, you should see something like this:

<pre class="command">Looking for host time.apple.com and service ntp
host found : time1.apple.com
Looking for host time.apple.com and service ntp
host found : time1.apple.com
12 Apr 21:37:51 ntpdate[28343]: adjust time server 17.254.0.27 offset -0.000362 sec</pre>If you don't see that, post back with the error message you see.

charlie

Apr 12, 2007 9:07 PM in response to mrgrinch

I noticed the same problem with the NIST time servers and my computers, and I haven't changed anything firewall related in months. I used to use time.nist.gov but it stopped working some time recently. I don't know why.

I switched to one of the U.S. Navy primary time references instead. I'm just outside Washington D.C., so I now use the Naval Observatory clock at tick.usno.navy.mil.

A list of public time servers is available at: http://tycho.usno.navy.mil/ntp.html

Apr 13, 2007 6:45 PM in response to mrgrinch

Followed your instructions, here's the output:

Looking for host time.apple.com and service ntp
host found : time2.apple.com
Looking for host time.apple.com and service ntp
host found : time.apple.com
13 Apr 18:18:42 ntpdate[229]: no server suitable for
synchronization found


How do you connect to the Internet?

From looking around the Internet, it sounds like your problem is a blocked port. Make sure the firewall is turned off on your computer. And make sure that if you have a router/firewall for Internet sharing, that its firewall is allowing UDP packets through. It should connect to the time server (at Apple) on port 123. The connection back will be to a higher number port, it was around 55900 on my iMac just now.

Here's how I figured how which port: I opened Terminal again, but this time opened two windows. I the first one, I typed this:

<pre class="command">sudo tcpdump -i en0 port 123</pre>Again, I had to give my admin password. I get a couple of lines, then it just sits and waits:

<pre class="command">tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en0, link-type EN10MB (Ethernet), capture size 96 bytes</pre>Then, I switched to another Terminal window and entered a slightly different command:

<pre class="command">ntpdate -d -q time.apple.com</pre>The options here are this: -d gives enhanced debug output and -q just queries the server but doesn't actually set the time (so I don't need to use sudo). When I run that command, I get a bunch of lines in the other window where tcpdump is waiting:

<pre class="command">19:29:26.551255 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:26.590860 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48
19:29:26.591003 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:26.628405 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48
19:29:26.628509 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:26.661951 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48
19:29:26.662055 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:26.697510 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48
19:29:26.751198 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:26.786127 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48
19:29:27.751223 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:27.784616 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48
19:29:28.751239 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:28.785549 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48
19:29:29.751219 IP iMacName.local.55915 > time0.apple.com.ntp: NTPv4, Client, length 48
19:29:29.784047 IP time0.apple.com.ntp > iMacName.local.55915: NTPv4, Server, length 48</pre>You can see in that example that it actually connected to the NTP server at apple on the NTP port time0.apple.com .ntp. But it connected back to my computer on port 55915: iMacName.local .55915. It would be interesting to see what your computer says. (Just rename the local computer's name if you want, but make sure the port number is still there).

To stop tcpdump waiting for network traffic, just hit the control-"c" key combination.

Finally, one more suggestion, try adding a longer timeout to the ntpdate command you tried earlier:

<pre class="command">sudo ntpdate -t 4 time.apple.com</pre>The default timeout on OS X is 1 second, so maybe setting to a higher value will help.

charlie

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

problems with time servers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.