That was rather interesting reading---I now have a far better
appreciation for ntp.
So, should the gumstix repositories be setting a different default
value for the NTP server?
On Thu, Jul 25, 2013 at 5:33 AM, Andy Walls <andy@...> wrote:
> On Wed, 2013-07-24 at 12:55 -0700, Paul D. DeRocco wrote:
>> When I enabled more systemd journal output for some other purpose, I noticed
>> that I was getting occasional messages
>> ntpd_intres: host name not found: time.server.example.com
>> I figured, oh, that's another default config file that one is supposed to
>> edit before the thing will actually work. It didn't take long to find
>> /etc/ntp.conf, which contains the following:
>> # This obtains a random server which will be close
>> # (in IP terms) to the machine. Add other servers
>> # as required, or change this.
>> server time.server.example.com
>> One would think that "time.server.example.com" is just some placeholder, but
>> the preceding comment suggest that it is some magic name that makes the
>> server do something fancy. So I tried changing it to the name of a real time
>> server, by looking up a nearby one on the web and entering its name. Ten
>> minutes later, my NTP server died:
>> Jan 01 10:39:48 overo systemd: ntpd.service: main process exited,
>> code=exited, status=255/n/a
>> Jan 01 10:39:48 overo systemd: Unit ntpd.service entered failed state
>> I tried a different server and restarted the service. Same result.
> ntpd will panic if the time servers have a large offset (1000 seconds)
> from the local clock. It's ntp's way of telling you, "Fix your clock,
> I'm not going to guess who's right and who's wrong and what NTP epoch
> we're in."
> Also, if the offset is more than 4 hours, not even the -g or -q flags to
> ntpd or the 'tinker panic 0' configuration line will work to set the
>> When I first restarted the service, after editing the file, I got this:
>> systemd: Stopping Network Time Service...
>> ntpd_intres: ntpd exiting on signal 15
>> ntpd: ntpd exiting on signal 15
>> systemd: Starting Network Time Service...
>> systemd: PID 1642 read from file /run/ntpd.pid does not exist.
>> ntpd: ntpd 4.2.6p5@... Fri Jul 19 18:43:50 UTC 2013 (2)
>> so obviously it knew what time it was then. It continued spewing journal
> Are you sure? Or is that the date and time ntpd was built?
>> ntpd: proto: precision = 30.517 usec
>> ntpd: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
>> ntpd: Listen and drop on 1 v6wildcard :: UDP 123
>> ntpd: Listen normally on 2 lo 127.0.0.1 UDP 123
>> ntpd: Listen normally on 3 eth0 192.168.123.139 UDP 123
>> ntpd: Listen normally on 4 lo ::1 UDP 123
>> ntpd: peers refreshed
>> ntpd: Listening on routing socket on fd #21 for interface updates
>> systemd: Started Network Time Service.
>> systemctl status ntpd | more
>> ntpd.service - Network Time Service
>> Loaded: loaded (/lib/systemd/system/ntpd.service; enabled)
>> Active: active (running) since Sat, 2000-01-01 09:58:28 UTC; 32s
>> Process: 1790 ExecStart=/usr/bin/ntpd -p /run/ntpd.pid
>> (code=exited, status=0/SUCCESS)
>> Main PID: 1791 (ntpd)
>> CGroup: name=systemd:/system/ntpd.service
>> In other words, when it finshed starting the service, it had reset the clock
>> to the start of 2000. Why would it do that?
> ntpd will never jump the clock by more than 4 hours, even if you tell it
> a one time large jump is OK.
> Comments from the Dr. Mills on the matter:
>> Doesn't the Overo have an RTC
>> that keeps reasonable time even in the absence of any NTP connection to the
>> outside world?
> You need an initial proper clock setting.
> If you need it automatically set after power up then you can:
> 1. install a battery (the Gumstix TOBI boards have a battery holder) or
> 2. get the correct time from another source, like a GPS, and use 'date'
> or settimeofday() to set the system time.
>> So is "time.server.example.com" really a code for "find me a server
> No. It's probably in the default file so that millions of misconfigured
> embedded devices don't DoS the time servers.
>> I googled that string and didn't come up with anything but a
>> copy of the /etc/ntp.conf file itself. If it is, then why is it outputting
>> error messages every ten minutes?
> If you are fielding a product with a non-user-configurable timeserver,
> take a look at:
> If not, then use time.nist.gov if in the US:
>> More to the point, am I supposed to do something with /etc/ntp.conf, or just
>> leave it the way it is in the standard build?
> It's useless, if you leave it alone. I also believe the line
> restrict default
> leaves UDP port 123 for IPv4 and IPv6 pretty wide open for external
> machines to connect to your ntpd daemon using (ntpdc and ntpq) and muck
> with it.
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> gumstix-users mailing list