# ntpd broken after upgrading to 4.2

## Paladine01

I merged in the new ntpd and now it won't work anymore.  My config file has remained the same

 *Quote:*   

> 
> 
> restrict default ignore noquery notrust nomodify
> 
> restrict 127.0.0.1
> ...

 

However, it won't update the time and ntpq -p reveals some strange information

 *Quote:*   

>      remote           refid      st t when poll reach   delay   offset  jitter
> 
> ==============================================================================
> 
>  dewey.lib.ci.ph .INIT.          16 u    - 1024    0    0.000    0.000 4000.00
> ...

 

This is the first time I've seen it remote .INIT., last night I was getting .RSTR. which means restricted access.

Any gurus seen this before?

[quote]

----------

## neilhwatson

When you restarted ntpd were there any errors in the log files?  You have made no changes in your network (e.g. firewall)?

----------

## Paladine01

This is all I get, looks pretty normal

 *Quote:*   

> 
> 
> Apr 15 07:17:24 [ntpd] ntpd 4.2.0@1.1161-r Wed Apr 14 09:15:39 MST 2004 (1)
> 
> Apr 15 07:17:24 [ntpd] precision = 1.000 usec
> ...

 

----------

## neilhwatson

Are there any other log entries for ntpd after that point?

----------

## UberLord

4.2.0 seems to take longer to connect.

However, once it's up after around 5 mins then it's OK.

----------

## Paladine01

After running 10 hours, same thing.  Still in .INIT. state

----------

## Arno

Do you see anything wrong in /var/log/ntp.log ?

I had a problem of permissions with /var/lib/misc/ntp.drift and had to change the owner and group to ntp:ntp.

Hope this helps.

----------

## Paladine01

Here is the output I get when I enable debugging

 *Quote:*   

> 
> 
> ntpd 4.2.0@1.1161-r Wed Apr 14 09:15:39 MST 2004 (1)
> 
> addto_syslog: ntpd 4.2.0@1.1161-r Wed Apr 14 09:15:39 MST 2004 (1)
> ...

 

Same thing, stays in .INIT. state.  It seems like the servers aren't responding to me?

----------

## kallamej

 *ntp-4.2.0-r2.ebuild wrote:*   

> eerror "The notrust option was found in your /etc/ntp.conf!"
> 
>                 ewarn "If your ntpd starts sending out weird responses,"
> 
>                 ewarn "then make sure you have keys properly setup and see"
> ...

 

----------

## brown

 *kallamej wrote:*   

>  *ntp-4.2.0-r2.ebuild wrote:*   eerror "The notrust option was found in your /etc/ntp.conf!"
> 
>                 ewarn "If your ntpd starts sending out weird responses,"
> 
>                 ewarn "then make sure you have keys properly setup and see"
> ...

 

in case anyone else is still having this problem, it looks like getting rid of the "notrust" and "noserve" keywords worked for me

----------

## keithcheung

problem exists even removed 'notrust'

My config is as follow:

```
server          stdtime.gov.hk          iburst

logfile         /var/log/ntpd.log

driftfile       /var/lib/ntp/ntp.drift

restrict default nomodify

restrict 127.0.0.1

restrict 192.168.0.0 mask 255.255.255.0 notrust nomodify notrap

```

ntpd.log shows:

```

12 Sep 20:39:43 ntpd[10888]: Frequency format error in /var/lib/ntp/ntp.drift

12 Sep 20:48:23 ntpd[10888]: ntpd exiting on signal 15

12 Sep 20:48:45 ntpd[11062]: Frequency format error in /var/lib/ntp/ntp.drift

12 Sep 20:50:33 ntpd[11062]: ntpd exiting on signal 15

12 Sep 20:50:49 ntpd[11153]: Frequency format error in /var/lib/ntp/ntp.drift

12 Sep 20:53:45 ntpd[11153]: ntpd exiting on signal 15

12 Sep 21:11:24 ntpd[11530]: Frequency format error in /var/lib/ntp/ntp.drift

12 Sep 21:12:28 ntpd[11530]: ntpd exiting on signal 15

12 Sep 21:12:29 ntpd[11610]: Frequency format error in /var/lib/ntp/ntp.drift

12 Sep 21:13:02 ntpd[11610]: ntpd exiting on signal 15

12 Sep 21:13:18 ntpd[11704]: Frequency format error in /var/lib/ntp/ntp.drift

12 Sep 21:13:55 ntpd[11704]: ntpd exiting on signal 15

12 Sep 21:15:31 ntpd[11777]: ntpd exiting on signal 15

12 Sep 21:15:32 ntpd[11893]: Frequency format error in /var/lib/ntp/ntp.drift

12 Sep 21:45:22 ntpd[11893]: ntpd exiting on signal 15

12 Sep 21:47:13 ntpd[12087]: Frequency format error in /var/lib/ntp/ntp.drift

```

ntpq -p shows :-

```

     remote           refid      st t when poll reach   delay   offset  jitter

==============================================================================

 210.0.235.14    .INIT.          16 u    -  512    0    0.000    0.000 4000.00

```

How may I fix it ?

----------

## neilhwatson

IIRC the drift file is created automatically by ntpd.  Top ntpd, delete the drift file, then start ntpd.

----------

## deboeck

I don't think the drift file is the problem. I've had the same problem today and first I also thought it was the drift file. After some googling I found out that the error is simple printed if the drift file is empty. Once you get NTP up and running, the error will dissapear.

To get your server up and running, I think you'll have to remove the 

```
restrict default nomodify
```

 line and change the next line to 

```
restrict 127.0.0.1 notrust nomodify
```

.

The default line is not necessary anymore in 4.2. I'm not a 100% about this, but I'll check it at work tomorrow.

Cheers,

Steven

----------

## keithcheung

It doesn't work.

Here's the output of ntpq -p after changed the config

```

     remote           refid      st t when poll reach   delay   offset  jitter

==============================================================================

 210.0.235.14    .INIT.          16 u    -   64    0    0.000    0.000 4000.00

```

Wrong system time cause lots of trouble...

----------

## deboeck

Hmm,

don't know what the problem could be then. Here's my ntp.conf :

```

server ntp.telenet.be

server ntp1.belbone.be

server ntp2.belbone.be

logfile /var/log/ntpd.log

driftfile /var/lib/ntp/ntp.drift

restrict 127.0.0.1 notrust nomodify

```

Maybe you can try this one.

I'm sure you thought of this, but if the difference between your clock and the NTP server is more than 1000 seconds, your ntp server will not update your clock.

Steven

----------

## keithcheung

still don't work..

here's the output of ntpq -p

```

     remote           refid      st t when poll reach   delay   offset  jitter

==============================================================================

 ntp.charon.tele .INIT.          16 u    -   64    0    0.000    0.000 4000.00

 ntp1.belbone.be .INIT.          16 u    -   64    0    0.000    0.000 4000.00

 ntp2.belbone.be .INIT.          16 u    -   64    0    0.000    0.000 4000.00

```

----------

## neilhwatson

Are you sure the servers are actually available to you?  Can you nmap that single port (123 IIRC)?  Can you traceroute to the server?

----------

