[ntp:questions] NTP configuration problem

Danny Mayer mayer at ntp.isc.org
Wed Feb 15 17:42:49 UTC 2006


J S wrote:
> Hello
> I am trying to configure NTP client on a machine but observing
> unusual log.
> 
> 
> my ntp.config files read this
> 
> driftfile /etc/ntp/drift
> restrict ntp1.cs.wisc.edu nomodify ntrap noquery
> server ntp1.cs.wisc.edu minpoll 4 maxpoll 4
> 
> 
> My drift file reads 0.000
> whereas tcpdump is unable to capture any packets
> 
> ntpq - p does not list server ntp1.cs.wisc.edu
> I am not sure if ntp-client is configured properly on my machine
> How will I ensure this
> 
> Thanks in advance
> 
> this is the output message of ntpd -d. sorry for the spam , but I thought it
> may be necessary for troubleshooting
> 
> bash-2.05b# /usr/sbin/ntpd -d
> ntpd 4.2.0 at 1.1161-r Thu Mar 11 11:46:39 EST 2004 (1)
> addto_syslog: ntpd 4.2.0 at 1.1161-r Thu Mar 11 11:46:39 EST 2004 (1)
> addto_syslog: mlockall(): Cannot allocate memory
> addto_syslog: precision = 1.000 usec
> create_sockets(123)
> addto_syslog: no IPv6 interfaces found
> addto_syslog: bind() fd 3, family 2, port 123, addr 0.0.0.0,
> in_classd=0 flags=8 fails: Permission denied
> addto_syslog: bind() fd 3, family 2, port 123, addr 127.0.0.1,
> in_classd=0 flags=0 fails: Permission denied
> addto_syslog: bind() fd 3, family 2, port 123, addr 131.179.112.70,
> in_classd=0
> flags=8 fails: Permission denied
> addto_syslog: bind() fd 3, family 2, port 123, addr 131.179.112.70,
> in_classd=0
> flags=8 fails: Permission denied
> addto_syslog: bind() fd 3, family 2, port 123, addr 10.0.60.1,
> in_classd=0 flags=8 fails: Permission denied
> init_io: maxactivefd 0
> local_clock: at 0 state 0
> addto_syslog: frequency initialized 0.000 PPM from /etc/ntp/drift
> local_clock: at 0 state 1
> addto_syslog: configure: keyword "ntrap" unknown, line ignored
> key_expire: at 0
> peer_clear: at 0 assoc ID 16572 refid INIT
> newpeer: 131.179.112.70->128.105.39.11 mode 3 vers 4 poll 4 4 flags 0x1 0x1
> ttl
> 0 key 00000000
> report_event: system event 'event_restart' (0x01) status 'sync_alarm,
> sync_unspec, 1 event, event_unspec' (0xc010)
> addto_syslog: sendto(128.105.39.11): Bad file descriptor
> transmit: at 1 131.179.112.70->128.105.39.11 mode 3
> auth_agekeys: at 1 keys 1 expired 0
> timer: refresh ts 0
> addto_syslog: sendto(128.105.39.11): Bad file descriptor
> transmit: at 18 131.179.112.70->128.105.39.11 mode 3
> addto_syslog: sendto(128.105.39.11): Bad file descriptor
> transmit: at 34 131.179.112.70->128.105.39.11 mode 3
> _______________________________________________

You need to run privileged. Port 123 is a privileged port. Try running
as root first. Also lose the restrict statement. Unless you understand
how to use it it will just cause you more trouble. In any case ntrap is
not a valid argument to the restrict statement. Get ntpd working before
you worry about things like restrict. You should also have at least 3
server lines pointing to different servers if you want ntpd to be reliable.

Danny



More information about the questions mailing list