[ntp:questions] ntpd 4.2.6p5 will not synchronize to broadcast servers

Gary Johnson garyjohn at eskimo.com
Mon Apr 29 23:46:02 UTC 2013


Gary Johnson <garyjohn at eskimo.com> wrote:
> Brian Utterback <brian.utterback at oracle.com> wrote:
> > I think this is a duplicate of bug 629.
> > 
> > On 4/24/2013 9:54 PM, Harlan Stenn wrote:
> > > Gary,
> > >
> > > The short answer is "I don't know".  I believe we have successfully used
> > > broadcast clients in 4.2.6.
> > >
> > > Please see if ntp-dev works for you though - if there is a problem there
> > > we want to fix that before releasing 4.2.8.
> > >
> > > And having written the above:
> > >
> > >   http://bugs.ntp.org/show_bug.cgi?id=2261
> 
> Thank you both!  I had found those bug reports earlier, but I didn't
> think that wildcards and "255.255.255.255" applied in my case, so I
> didn't look closely at either one.  I read the discussions associated
> with both last night and applied Dave Hart's suggestion at the bottom of
> the bug 629 discussion to add
> 
>     interface listen wildcard
>     interface listen all
> 
> to my /etc/ntp.conf.  Broadcast now works!
> 
> I changed the simple test case I posted originally to
> 
>     $ ntpd -4 -b -D2 -c /etc/ntp.conf.test &
> 
> where /etc/ntp.conf.test contains only those two interface commands.

> I will download and install ntp-dev later today and let you know how
> that goes.

We had some issues with getting ntp-dev-4.2.7p367 compiled and installed
on our system but we now have it running.  When given a list of servers,
it chooses and syncs to a system peer just fine.

The bad news is that this version does not work at all with broadcast
messages, not even with the interface commands added to /etc/ntp.conf.

    $ ntpq -crv
    associd=0 status=c016 leap_alarm, sync_unspec, 1 event, restart,
    version="ntpd 4.2.7p367 at 1.2483-o Mon Apr 29 21:01:02 UTC 2013 (1)",
    processor="mips64", system="Linux/3.4.34", leap=11, stratum=16,
    precision=-17, rootdelay=0.000, rootdisp=7.575, refid=INIT,
    reftime=00000000.00000000  Thu, Feb  7 2036  6:28:16.000,
    clock=d5297b65.cf1fce0d  Mon, Apr 29 2013 23:06:13.809, peer=0, tc=3,
    mintc=3, offset=0.000000, frequency=0.000, sys_jitter=0.000000,
    clk_jitter=0.008, clk_wander=0.000

The debug output is now a little chatty with all the messages about
select().

    $ ntpd -4 -b -D2 -c /etc/ntp.conf.test
    29 Apr 23:10:45 ntpd[3361]: ntpd 4.2.7p367 at 1.2483-o Mon Apr 29 21:01:02 UTC 2013 (1): Starting
    29 Apr 23:10:45 ntpd[3361]: Command line: ntpd -4 -b -D2 -c /etc/ntp.conf.test
    ntp_rlimit: STACK: 50 4k pages
    ntp_rlimit: MEMLOCK: 32 MB
    29 Apr 23:10:45 ntpd[3361]: set_process_priority: Leave priority alone: priority_done is <2>
    29 Apr 23:10:45 ntpd[3361]: proto: precision = 6.919 usec (-17)
    proto_config: code 1 value 1 dvalue 0.000000
    29 Apr 23:10:45 ntpd[3361]: Unable to listen for broadcasts, no broadcast interfaces available
    Finished Parsing!!
    create_sockets(123)
    move_fd: estimated max descriptors: 1024, initial socket boundary: 16
    29 Apr 23:10:45 ntpd[3361]: Listen normally on 0 v4wildcard 0.0.0.0:123
    created interface #0: fd=16, bfd=-1, name=v4wildcard, flags=0x89, ifindex=0, sin=0.0.0.0, bcast=0.0.0.0, mask=255.255.255.255, Enabled:
    create_interface(127.0.0.1#123)
    29 Apr 23:10:45 ntpd[3361]: Listen normally on 1 lo 127.0.0.1:123
    restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00003000 flags 00000001
    created interface #1: fd=17, bfd=-1, name=lo, flags=0x5, ifindex=0, sin=127.0.0.1, mask=255.0.0.0, Enabled:
    create_interface(10.10.143.200#123)
    29 Apr 23:10:45 ntpd[3361]: Listen normally on 2 eth0 10.10.143.200:123
    restrict: op 1 addr 10.10.143.200 mask 255.255.255.255 mflags 00003000 flags 00000001
    created interface #2: fd=18, bfd=-1, name=eth0, flags=0x19, ifindex=0, sin=10.10.143.200, bcast=10.10.143.255, mask=255.255.255.0, Enabled:
    create_interface(10.27.50.174#123)
    29 Apr 23:10:45 ntpd[3361]: Listen normally on 3 remote 10.27.50.174:123
    restrict: op 1 addr 10.27.50.174 mask 255.255.255.255 mflags 00003000 flags 00000001
    created interface #3: fd=19, bfd=-1, name=remote, flags=0x19, ifindex=0, sin=10.27.50.174, bcast=10.27.50.255, mask=255.255.255.0, Enabled:
    29 Apr 23:10:45 ntpd[3361]: peers refreshed
    create_sockets: Total interfaces = 4
    29 Apr 23:10:45 ntpd[3361]: Listening on routing socket on fd #20 for interface updates
    loop_config: item 1 freq 0.000000
    event at 0 0.0.0.0 c01d 0d kern kernel time sync enabled
    event at 0 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
    local_clock: mu 0 state 1 poll 3 count 0
    event at 0 0.0.0.0 c011 01 freq_not_set
    event at 0 0.0.0.0 c016 06 restart
    select() returned -1: Interrupted system call
    auth_agekeys: at 1 keys 0 expired 0
    select() returned -1: Interrupted system call
    timer: interface update
    select() returned -1: Interrupted system call
    select() returned -1: Interrupted system call
    select() returned -1: Interrupted system call
    select() returned -1: Interrupted system call
    select() returned -1: Interrupted system call
    ...

To top it off, this version of ntpdc is not working for us, either.  It
seems that anything it can answer by itself works, but anything it needs
to query ntpd for times out.

    $ ntpdc --version
    ntpdc 4.2.7p367 at 1.2483-o Mon Apr 29 21:01:06 UTC 2013 (1)
    $ ntpdc -c kerninfo
    localhost: timed out, nothing received
    ***Request timed out

In summary, our solution for now will be to go with 4.2.6p5 with those
two interface commands added to our /etc/ntp.conf.  This is really going
to put us in a bind in the future, however, if this is not resolved in
4.2.8.

Please let me know if there is any other debug output I can provide or
experiments I can perform to help identify the cause of this or to help
verify a solution.

Regards,
Gary



More information about the questions mailing list