Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170379 - net-misc/chrony-1.21-r1: Chrony doesn't read configuration file
Summary: net-misc/chrony-1.21-r1: Chrony doesn't read configuration file
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Torsten Veller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-11 09:14 UTC by Alexander Skwar
Modified: 2007-03-11 11:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/conf.d/chronyd (chronyd,594 bytes, text/plain)
2007-03-11 09:23 UTC, Alexander Skwar
Details
/etc/chrony/chrony.conf (chrony.conf,12.36 KB, text/plain)
2007-03-11 09:24 UTC, Alexander Skwar
Details
Kernel .config of the running kernel (aka /proc/config.gz) (config,37.35 KB, text/plain)
2007-03-11 11:51 UTC, Alexander Skwar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Skwar 2007-03-11 09:14:55 UTC
I'm using chrony-1.21-r1 on a x86 system.

When I now run "chronyc tracking", I get:

alexander@blatt ~ $ chronyc tracking
Reference ID    : 0.0.0.0 (0.0.0.0)
Stratum         : 0
Ref time (UTC)  : Thu Jan  1 00:00:00 1970
System time     : 0.000000 seconds fast of NTP time
Frequency       : 0.000 ppm fast
Residual freq   : 0.000 ppm
Skew            : 0.000 ppm
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds

Also quite interesting is the output of "sources":

alexander@blatt ~ $ chronyc sources
210 Number of sources = 0
MS Name/IP address           Stratum Poll LastRx Last sample
============================================================================

I had a closer look at chrony, as I discovered in the morning that my system is 105 seconds fast - and it still IS fast:

alexander@blatt ~ $ ntpdate -q ch.pool.ntp.org
server 194.88.212.205, stratum 3, offset -105.866018, delay 0.03728
server 195.216.64.208, stratum 2, offset -105.870447, delay 0.03851
server 217.147.223.78, stratum 2, offset -105.869263, delay 0.03853
server 213.3.26.5, stratum 3, offset -105.864887, delay 0.08418
10 Mar 21:05:03 ntpdate[13878]: step time server 195.216.64.208 offset -105.870447 sec

Now, as the "chronyc sources" printed "number of sources = 0", I tend to think, that the configuration file is ignored. I'll attach the chrony.conf.

alexander@blatt ~ $ grep -v ^\# /etc/conf.d/chronyd | grep -v ^\$
CFGFILE="/etc/chrony/chrony.conf"
ARGS="-r -s"
test -c /dev/rtc && {
        grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
}
grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"

alexander@blatt ~ $ ps awux|grep -v vim|grep -v grep|grep -v tail|grep chrony
root     13997  0.0  0.1   1956   888 ?        S    21:07   0:00 /usr/sbin/chronyd -f /etc/chrony/chrony.conf -r -s -s

Why it, that chrony doesn't (seem to) read the configuration file - or at least seems to ignore the contents?
Comment 1 Alexander Skwar 2007-03-11 09:23:52 UTC
Created attachment 112910 [details]
/etc/conf.d/chronyd
Comment 2 Alexander Skwar 2007-03-11 09:24:16 UTC
Created attachment 112911 [details]
/etc/chrony/chrony.conf

Although I don't think, that it is necessary, here's emerge --info as well:

alexander@blatt ~ $ emerge --info
Portage 2.1.2.2 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.5-r0, 2.6.19-suspend2-r3.045 i686)
=================================================================
System uname: 2.6.19-suspend2-r3.045 i686 Intel(R) Celeron(R) M processor         1.50GHz
Gentoo Base System version 1.12.9
Timestamp of tree: Sun, 11 Mar 2007 08:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r4
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.15
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/Gentoo/Portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig ccache collision-protect distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="        http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/    ftp://ftp.tu-clausthal.de/pub/linux/gentoo/   http://distro.ibiblio.org/pub/linux/distributions/gentoo/       ftp://distro.ibiblio.org/pub/linux/distributions/gentoo       http://distfiles.gentoo.org/ "
LANG="de_DE.UTF-8"
LINGUAS="de"
PKGDIR="/Gentoo/Portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/Gentoo/Portage/build"
PORTDIR="/Gentoo/Portage/tree"
PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="alsa berkdb bitmap-fonts cli cracklib crypt dri esd fortran gdbm gnome gstreamer hal iconv isdnlog kdeenablefinal kdehiddenvisibility libedit libg++ libnotify midi ncurses nls nptl nptlonly pcre perl ppds pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="loopback usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="fbdev vesa vga via"
Unset:  CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Torsten Veller (RETIRED) gentoo-dev 2007-03-11 10:39:24 UTC
I took your chrony.conf file, put it into /etc/chrony, restarted chrony and it worked.

Let's see why it doesn't work for you: 
Please restart chrony.
What is in the log files in /var/log/chrony/*.log?
It still doesn't work if you use ips? e.g 194.88.212.205


IIRC chrony has problems with modules, but i can be wrong here.

My kernel config:
# CONFIG_RTC is not set
CONFIG_GEN_RTC=y
CONFIG_GEN_RTC_X=y
# CONFIG_HPET is not set
# CONFIG_RTC_CLASS is not set
Comment 4 Alexander Skwar 2007-03-11 11:51:23 UTC
Created attachment 112920 [details]
Kernel .config of the running kernel (aka /proc/config.gz)

(In reply to comment #3)
> I took your chrony.conf file, put it into /etc/chrony, restarted chrony and it
> worked.

Hm, interesting.

> Let's see why it doesn't work for you: 

Yep, thanks.

> Please restart chrony.
> What is in the log files in /var/log/chrony/*.log?

Nothing. That's another thing I do not understand. Why does chrony not log?

alexander@blatt ~ $ ls -la /var/log/chrony/
insgesamt 12
drwxr-xr-x  2 root root   40  8. Mar 18:59 .
drwxr-xr-x 10 root root 8192 11. Mar 11:12 ..
-rw-r--r--  1 root root    0 10. Sep 00:32 .keep_net-misc_chrony-0
-rw-rw-rw-  1 root root    0  8. Mar 18:59 measurements.log
-rw-rw-rw-  1 root root    0  8. Mar 18:59 statistics.log
-rw-rw-rw-  1 root root    0  8. Mar 18:59 tracking.log

(Originally, those files were not chmod 0666; I changed that from 0644 to 0666, in the hope, that chrony would log if the files are surely writeable. In vain :(

> It still doesn't work if you use ips? e.g 194.88.212.205

I now have only have "server" line in chrony.conf with "your" IP.

alexander@blatt ~ $ chronyc sources
210 Number of sources = 0
MS Name/IP address           Stratum Poll LastRx Last sample
============================================================================

> IIRC chrony has problems with modules, but i can be wrong here.
> 
> My kernel config:
> # CONFIG_RTC is not set
> CONFIG_GEN_RTC=y
> CONFIG_GEN_RTC_X=y
> # CONFIG_HPET is not set
> # CONFIG_RTC_CLASS is not set

alexander@blatt ~ $ zcat /proc/config.gz | grep \\\(RTC\\\|HPET\\\)
CONFIG_HPET_TIMER=y
CONFIG_RTC=m
CONFIG_GEN_RTC=m
CONFIG_GEN_RTC_X=y
CONFIG_HPET=y
CONFIG_HPET_RTC_IRQ=y
CONFIG_HPET_MMAP=y
CONFIG_RTC_LIB=m
CONFIG_RTC_CLASS=m
# RTC interfaces
CONFIG_RTC_INTF_SYSFS=m
CONFIG_RTC_INTF_PROC=m
CONFIG_RTC_INTF_DEV=m
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# RTC drivers
CONFIG_RTC_DRV_DS1553=m
CONFIG_RTC_DRV_DS1742=m
CONFIG_RTC_DRV_M48T86=m
CONFIG_RTC_DRV_TEST=m
CONFIG_RTC_DRV_V3020=m

(Complete config is attached)

But even if it could not access the RTC, why does it not load any servers?


...

I unloaded rtc and loaded genrtc module. After restarting chronyd, I now get:

alexander@blatt ~ $ chronyc tracking
Reference ID    : 194.88.212.205 (xolotl.zooomclan.org)
Stratum         : 4
Ref time (UTC)  : Sun Mar 11 11:46:04 2007
System time     : 0.000000 seconds fast of NTP time
Frequency       : 131.008 ppm slow
Residual freq   : -0.029 ppm
Skew            : 5.305 ppm
Root delay      : 0.015198 seconds
Root dispersion : 0.093109 seconds

Well. User error, of sorts, I'd say. I still think, that chrony shouldn't fail to load the sources if genrtc isn't available, but that's the way it is, I guess.

Closing bug.

Thanks for your help, though! Thanks to you, I'm able to use chrony now.