[ntp:questions] chrony as a server

Miroslav Lichvar mlichvar at redhat.com
Mon Feb 16 14:26:04 UTC 2015


On Mon, Feb 16, 2015 at 12:56:27PM +0000, David Lord wrote:
> I've just fetched chrony-2.0-pre1. It seemed to compile and
> install ok on NetBSD-6/i386. The client IS one of the servers
> configured in chrony.conf and it behaved same as with 1.31.

I didn't know this was such a common configuration.

As a workaround you can add "acquisitionport 123" to chrony.conf to
use just one socket for all (client, peer, server) communication,
which will effectively disable the check in which the server's request
is failing.

> That was it, as restart after the client had been removed from
> chrony.conf the client picked up a reply from chrony. So that
> bug still needs fixing.

I'm not sure what's wrong, it seems to be working for me with
2.0-pre1.

ntp.conf (for ntp-4.2.6p5) on host 1:

server 192.168.100.2 minpoll 3 maxpoll 3
driftfile /var/lib/ntp/drift

chrony.conf on host 2:

pool 2.pool.ntp.org iburst
server 192.168.100.1 minpoll 3 maxpoll 3
driftfile /var/lib/chrony/drift
allow 0/0

# /usr/sbin/chronyd -d -d
...
2015-02-16T14:16:27Z ntp_core.c:906:(transmit_timeout) Transmit timeout for [192.168.100.1:123
]
(this is chrony sending its client request)
2015-02-16T14:16:27Z ntp_io.c:679:(send_packet) Sent 48 bytes to 192.168.100.1:123 from [UNSPE
C] fd 6
(receiving reply from ntpd)
2015-02-16T14:16:27Z ntp_io.c:562:(read_from_socket) Received 48 bytes from 192.168.100.1:123 
to 192.168.100.2 fd 6
...
(discarding it for synchronization loop testD=0)
2015-02-16T14:16:27Z ntp_core.c:1287:(receive_packet) test123=111 test567=111 testABCD=1110 kod_rate=0 valid=1 good=0  

(this is ntpd's request)
2015-02-16T14:16:33Z ntp_io.c:562:(read_from_socket) Received 48 bytes from 192.168.100.1:123 to 192.168.100.2 fd 5  
(and chrony sending reply)
2015-02-16T14:16:33Z ntp_io.c:679:(send_packet) Sent 48 bytes to 192.168.100.1:123 from 192.168.100.2 fd 5  

# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*192.168.100.2   176.9.1.148      4 u    6    8  377    0.143    0.044   0.055


If you compile chrony with --enable-debug, do you see similar Received
and Sent message pairs in the chronyd -d -d output?

-- 
Miroslav Lichvar


More information about the questions mailing list