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

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Sun, Jun 12, 2016 at 04:45:46PM -0700, Patrick Goebel wrote:
> Hello,
> 
> 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
> desktop:
> 
> server 0.debian.pool.ntp.org offline minpoll 8
> server 1.debian.pool.ntp.org offline minpoll 8
> server 2.debian.pool.ntp.org offline minpoll 8
> server 3.debian.pool.ntp.org 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    : 127.127.1.1 ()
> Stratum         : 10

-- 
Miroslav Lichvar

-- 
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+ http://listengine.tuxfamily.org/