Re: [chrony-users] How to fail over to Internet when local server is not available

[ Thread Index | Date Index | More Archives ]

I forgot to answer your question about how the laptop is synchronized. Its configuration looks like this:


server offline minpoll 8
server offline minpoll 8
server offline minpoll 8
server offline minpoll 8

where I added the "manual" keyword so that it could act as a server.


On 06/14/2016 06:01 AM, Patrick Goebel wrote:
Hi Miroslav,

Thanks for your reply. I tried removing the offline option from each server but that did not solve the problem. I finally figured out that the issue appears to be related to using the Zeroconf hostname for the laptop (pi-robot-netbook.local). If I use the IP address for the netbook or the DNS hostname of a different host that I know is not an NTP server, the problem goes away.

Using the Zeroconf hostname for the laptop is important so maybe I'll have to live with occasionally manually restarting chrony on the desktop unless there is some other way to have chrony recognize a Zeroconf hostname.


On 06/13/2016 12:48 AM, Miroslav Lichvar wrote:
On Sun, Jun 12, 2016 at 04:45:46PM -0700, Patrick Goebel wrote:

I am trying to run chrony (Ubuntu 14.04 binary packages) to synchronize my
desktop and a laptop that sits on top of a mobile robot.  For various
reasons, the laptop on the robot has to be the chrony master and the desktop polls the laptop for time updates. However, since the robot and its laptop are often turned off while I am doing other work on the desktop, I want the desktop's chrony daemon to fail over to another Internet chrony server when
it can't reach the robot's laptop.
So the requirement is that the desktop and laptop are synchronized to
each other, but they don't necessarily have to be synchronized to true
time if the internet connection is down for instance? How is the
laptop synchronized?

After reading the chrony manual and FAQ, I can't seem to get the desired
behavior.  Here is the relevant section of my chrony.conf file on the

server offline minpoll 8
server offline minpoll 8
server offline minpoll 8
server offline minpoll 8

server pi-robot-netbook.local prefer iburst minpoll 8

The robot laptop is pi-robot-netbook.local. If this laptop is off when I
start chrony on the desktop, the chrony daemon starts in offline mode
instead of realizing that it has other servers it could try.
You could remove the offline options, so it will always be trying to
contact the servers and you wouldn't have to deal with the chronyc
online/offline command. chronyd would automatically select the best
servers that are currently responding.

I could not
find any parameters that tell chrony to ignore a server during startup if it
cannot be reached within a certain time window.  I also tried running:
There is no option to drop a server when it doesn't respond, but there
is the auto_offline option which will switch it to the offline state
automatically after few missed responses.

$ chronyc -a online

but I get the error:

506 Cannot talk to daemon
That's odd. Do you run the command under root? Is there a key in the
key file that has the same number as commandkey specified in
chrony.conf? chronyc needs to access the key file to read the command
key, but if it failed I think it would print a different error.

even though the daemon is running:

ps -ef | grep chrony
root     16257  1841  0 16:40 ?        00:00:00 /usr/sbin/chronyd

And tracking shows:

$ chronyc tracking

Reference ID    : ()
Stratum         : 10

The Pi Robot Project

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+