[ntp:questions] NTP rejects refclock

Martin Burnicki martin.burnicki at meinberg.de
Wed Feb 8 17:45:57 UTC 2012


pc wrote:
> I'm setting up an NTP stratum-1 server with a Meinberg C51 timecode
> receiver.
> The problem is that NTP doesn't seem to be accepting data from the
> refclock driver.
> After running overnight, "ntpq -c associations" says:
> ind assid status  conf reach auth condition  last_event cnt
> ===========================================================
>    1 65521  8011   yes    no  none    reject    mobilize  1
>    2 65522  941a   yes   yes  none candidate    sys_peer  1
>    3 65523  941a   yes   yes  none candidate    sys_peer  1
>    4 65524  961a   yes   yes  none  sys.peer    sys_peer  1
>    5 65525  9424   yes   yes  none candidate   reachable  2
> where&1 is the Meinberg refclock and&2,&3,&4,&5 are peers.
> "ntpq -c clockvar" says:
> associd=0 status=0000 , no events, clk_unspec,
> device="Meinberg DCF77 C51 or compatible", timecode=, poll=943,
> noreply=0, badformat=0, baddata=0, fudgetime1=10.000, stratum=0,
> refid=DCFa, flags=0, refclock_time="<UNDEFINED>", refclock_status="",
> refclock_format="Meinberg Standard",
> refclock_states="*NOMINAL: 16:44:55 (100.00%); running time: 16:44:55"
> The clockstats file is empty (but the loopstats and peerstats files
> are normal).
> ntp.conf:
> driftfile /var/lib/ntp/drift
> includefile /etc/ntp/crypto/pw
> keys /etc/ntp/keys
> server mode 2
> peer timenet  iburst
> peer timenet1 iburst
> peer timenet2 iburst
> peer timenet3 iburst
> logfile /var/ntp/ntp.log
> statistics clockstats loopstats peerstats
> statsdir /var/ntp/ntpstats/
> filegen clockstats file clockstats type day link enable
> filegen peerstats  file peerstats  type day link enable
> filegen loopstats  file loopstats  type day link enable
> What am I doing wrong?

If I remember correctly then associations with condition "reject" can be 
any associations which are just not the sys.peer or candidates, so this 
sounds like the clock may just have been outvoted by the other peers 
specified in ntp.conf.

Can you show the output of "ntpq -p" ?

On the other hand, the variable refclock_time="<UNDEFINED>" in the 
output of the cv command seems to indicate that the time string has not 
been received.

Please note the parse driver (127.127.8.x) configures the serial port 
according to what is expected:

with mode 2: 9600/7E2, Meinberg standard time string
with mode 7: 19200/8N1, Meinberg standard or Uni Erlangen string

The C51 should by default be set to 9600/7E2, Meinberg standard time 
string. So mode 2 should be OK for the default settings.

Do you have the symbolic link /dev/refclock-0 which points to the serial 
port to which the clock is connected?

You may try to stop ntpd and just use cu to see if the serial string can 
be received:

# cu -l /dev/refclock-0 -s 9600 -e
D:24.01.12;T:2;U:14.51.49;  U D:24.01.12;T:2;U:14.51.50;  U 
D:24.01.12;T:2;U:14.51.51;  U D:24.01.12;T:2;U:14.51.52;  U

Please note the STX and ETX characters at the beginning and end of the 
string do not appear in the output of cu.

You can also simply run "cat /dev/refclock-0" but need to make sure in 
this case the port parameters have been set correctly, i.e. 8600/7E2.

And a final note:
This is just a receiver for the AM modulation of DCF77, which is only 
accurate to a few milliseconds, and so is the PPS signal.


Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list