Re: [chrony-users] How to set chrony on a remote server with always on internet

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


On Wed, 31 Mar 2010, J. Bakshi wrote:

On 03/31/2010 11:37 AM, J. Bakshi wrote:
Dear list,

During my search on time sync service in linux I have found chrony as a
good competitor of ntp.  I have found through several documentation that
chrony can also adjust the clock with fluctuating internet connection.
Hence chrony is my prime choice as a time deamon both for workstation as
well as servers. But as a newbie I have faced some problems and I
request you, the list to provide me some enlightenment, please.

[1] I have installed chrony in a remote debian box which is connected
with broadband connection and it hardly becomes offline.  In this
situation what might be the tweak in the configuration to make chrony
aware about this non ppp based Internet connection ?

[2]  The box has IST as the timezone.  i.e.

debian:~# date
Wed Mar 31 10:44:19 IST 2010

Do I need any modification in the timezone ? It has been mentioned that
chrony is based on UTC, But is it impossible to keep the timezone as
local one and run chrony ?

Please let me know.





Additionally I like to inform some more findings.

[3]   /var/log/chrony/statistics.log;   /var/log/chrony/tracking.log ;
/var/log/chrony/measurements.log  are empty.

You need the appropriate lines in /etc/chrony.conf
logdir /var/log/chrony
log statistics tracking rtc measurements

If they are still empty, it is probably because of problems with logrotate.
you need to tell chrony to use the new logs after you rotate them.

Eg, make /etc/logrotate.d/chrony the following file

/var/log/chrony/*.log {
    nocompress
    postrotate
    if service chronyd status |grep running>/dev/null ;then
      KEYID=`awk '$1=="commandkey"{print $2}' /etc/chrony/chrony.conf`
      PASS=`awk '$1 =="'$KEYID'" && $3=="" {P=$2}END {print P}'
/etc/chrony/chrony.keys`
      chronyc <<EOF
       password $PASS
       cyclelogs
       quit
EOF
   fi
   endscript
}



[4]  chronyc>tracking  reports

           506 Cannot talk to daemon

That meas that chronyd is not running or is stuck. If you are using an old
version of chrony, there is a possibility that the way it handles the rtc
could cause chronyd to hang.

ps aux|grep chronyd
If this shows that chronyd is running, then do service chronyd restart
but better is to get the latest version of chrony (1.24) and install that
instead of the older 1.23



[5]  I do have a firewall here and the box has apache, mail, squid
accessible from net.  Do I need to open any specific port for chrony ?

It must allow outgoing on port 123.
The responses should be fine since most firewalls allow responses back in.



eagerly waiting for a response.
thanks



--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

---
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/