LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-13-2008, 12:37 AM   #1
smallbook
Member
 
Registered: Jan 2008
Posts: 40

Rep: Reputation: 15
not sure if ntpd is working


hi everyone. I have some issues with ntpd installed in my updated version4 redhat. I cannot start up ntpd with the command service ntpd start, it will give out different sorts of error messages but the common one is about failing to load libcrypto.so.4, no such directory or file even though the file is there and the sym link exists. Another one have problem on synchronizing with the server. However, if i do it this way :

cd /etc/rc.d/init.d
ntpd

It works fine. But i am not sure whether it is really working. I have some outputs here in the log file, can somebody please verify if it is working alright?

13 Feb 14:01:18 ntpd[14438]: configure: keyword "authenticate" unknown, line ignored
13 Feb 14:04:32 ntpd[14438]: synchronized to LOCAL(0), stratum 10
13 Feb 14:04:32 ntpd[14438]: kernel time sync disabled 0041
13 Feb 14:05:35 ntpd[14438]: kernel time sync enabled 0001

Somehow, it seems to be synchornized to LOCAL and this is the output of ntpq -p

remote refid st t when poll reach delay offset jitter
==============================================================================
*LOCAL(0) LOCAL(0) 10 l 36 64 377 0.000 0.000 0.001
192.168.20.163 .INIT. 16 u - 1024 0 0.000 0.000 4000.00

There is a * in front of LOCAL, does it mean it is only synchronizing to the LOCAL and not the time server with the ip address 192.168.20.163?

Please help, i am utterly confused and there isn't a whole lot of information about ntpd on the web. It sounds really easy but somehow it just doesn't work over here. Thanks a whole lot.

Just to add, if i issue ntpdate, it works fine and this is hte output:

13 Feb 14:37:57 ntpdate[31785]: ntpdate 4.2.0a@1.1190-r Thu Oct 5 04:11:33 EDT 2006 (1)
Looking for host 192.168.20.163 and service ntp
host found : 192.168.20.163
transmit(192.168.20.163)
receive(192.168.20.163)
transmit(192.168.20.163)
receive(192.168.20.163)
transmit(192.168.20.163)
receive(192.168.20.163)
transmit(192.168.20.163)
receive(192.168.20.163)
transmit(192.168.20.163)
server 192.168.20.163, port 123
stratum 3, precision -20, leap 00, trust 000
refid [192.168.20.163], delay 0.02568, dispersion 0.00008
transmitted 4, in filter 4
reference time: cb5d0e15.38262456 Wed, Feb 13 2008 14:35:01.219
originate timestamp: cb5d0ee6.bc83cafb Wed, Feb 13 2008 14:38:30.736
transmit timestamp: cb5d0ec5.bf8982cb Wed, Feb 13 2008 14:37:57.748
filter delay: 0.02687 0.02576 0.02568 0.02573
0.00000 0.00000 0.00000 0.00000
filter offset: 32.98871 32.98813 32.98815 32.98812
0.000000 0.000000 0.000000 0.000000
delay 0.02568, dispersion 0.00008
offset 32.988151

13 Feb 14:37:57 ntpdate[31785]: step time server 192.168.20.163 offset 32.988151 sec

Any ideas?

Last edited by smallbook; 02-13-2008 at 12:39 AM.
 
Old 02-13-2008, 12:51 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
A couple of things

Where do you use "authenticate" in the config file?

Do you have the ntp port open on your firewall?
 
Old 02-13-2008, 01:05 AM   #3
smallbook
Member
 
Registered: Jan 2008
Posts: 40

Original Poster
Rep: Reputation: 15
I have disabled firewall temporarily to test out. And i am trying to figure out too where authenticate comes from. My /etc/ntp.conf file looks like this:

driftfile /var/lib/ntp/drift
broadcastdelay 0.008
logfile /var/log/ntpd.log
authenticate yes
keys /etc/ntp/keys
server 192.168.20.163


I think it's from this but even if i comment out, the problem still persists, meaning i still can't start up using service ntpd start and i am not sure by issuing ntpd in /etc/rc.d/init.d ensure that ntpd works fine.
 
Old 02-13-2008, 04:01 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you have the keys set up properly? If you don't need them, comment the line out.

Here's what my log looks like from startup
Quote:
Feb 13 18:58:30 gandalf ntpd[2808]: ntpd 4.2.2p1@1.1570-o Sat Nov 10 12:36:14 UTC 2007 (1)
Feb 13 18:58:30 gandalf ntpd[2809]: precision = 1.000 usec
Feb 13 18:58:30 gandalf ntpd[2809]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Feb 13 18:58:30 gandalf ntpd[2809]: Listening on interface wildcard, ::#123 Disabled
Feb 13 18:58:30 gandalf ntpd[2809]: Listening on interface lo, ::1#123 Enabled
Feb 13 18:58:30 gandalf ntpd[2809]: Listening on interface eth0, fe80::20f:b5ff:feff:9a3#123 Enabled
Feb 13 18:58:30 gandalf ntpd[2809]: Listening on interface lo, 127.0.0.1#123 Enabled
Feb 13 18:58:30 gandalf ntpd[2809]: Listening on interface eth1, 192.168.1.1#123 Enabled
Feb 13 18:58:30 gandalf ntpd[2809]: Listening on interface eth0, 192.168.0.2#123 Enabled
Feb 13 18:58:30 gandalf ntpd[2809]: kernel time sync status 0040
Feb 13 18:58:34 gandalf ntpd[2809]: frequency initialized -15.217 PPM from /var/lib/ntp/drift
Feb 13 19:01:48 gandalf ntpd[2809]: synchronized to LOCAL(0), stratum 10
Feb 13 19:01:48 gandalf ntpd[2809]: kernel time sync enabled 0001
Feb 13 19:02:51 gandalf ntpd[2809]: synchronized to 192.189.54.17, stratum 2
Feb 13 19:18:03 gandalf ntpd[2809]: time reset -0.402837 s
Feb 13 19:21:22 gandalf ntpd[2809]: synchronized to LOCAL(0), stratum 10
Feb 13 19:23:32 gandalf ntpd[2809]: synchronized to 192.189.54.17, stratum 2
Feb 13 20:15:19 gandalf ntpd[2809]: synchronized to 192.189.54.33, stratum 2
Feb 13 20:36:37 gandalf ntpd[2809]: synchronized to 192.189.54.17, stratum 2
 
Old 02-13-2008, 06:54 PM   #5
smallbook
Member
 
Registered: Jan 2008
Posts: 40

Original Poster
Rep: Reputation: 15
I thought key file is compulsory? I didn't set anything in the key file. What is it for? I read somewhere that it is normal to have ntpd falling back to LOCAL after it need not syncrhonize against the external clock.

From my side, my ntpd.log file is pretty empty, it only stores information when ntpd is started and when it was terminated.
13 Feb 14:59:44 ntpd[31982]: ntpd exiting on signal 15
13 Feb 15:01:07 ntpd[32012]: configure: keyword "authenticate" unknown, line ignored
13 Feb 15:04:23 ntpd[32012]: synchronized to LOCAL(0), stratum 10
13 Feb 15:04:23 ntpd[32012]: kernel time sync disabled 0041
13 Feb 15:05:29 ntpd[32012]: kernel time sync enabled 0001
13 Feb 15:21:49 ntpd[32012]: ntpd exiting on signal 15

FOr example this, after i restarted it after 15:21, there is no entries anymore but i started using cd /etc/rc.d/init.d and issue ntpd. WHen i grep for the process, it exists and service ntpd status returns that it is running. I just need to verify that by issuing ntpd command at the path /etc/rc.d/init.d, ntpd is running fine. Any idea?
 
Old 02-13-2008, 07:38 PM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I think that key file is only if you are using symetric keys between servers. I don't use it (it's commented out).

Edit

See http://www.eecis.udel.edu/~mills/ntp/html/authopt.html

Last edited by billymayday; 02-13-2008 at 07:59 PM.
 
Old 02-13-2008, 08:33 PM   #7
smallbook
Member
 
Registered: Jan 2008
Posts: 40

Original Poster
Rep: Reputation: 15
Latest findings

Hi billy, some latest findings. My servers are not able to syncrhonize with the time server i created that pulls time from external sources. Time server can reach external sources but my internal ones just cannot reach my time server. When i did a nestat to check for port 123 this is the output on client side:

udp 0 0 192.168.20.82:123 0.0.0.0:*
udp 0 0 192.168.19.22:123 0.0.0.0:*
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
udp 0 0 :::123 :::*

Do you think it is correct? On the server side :

udp 0 0 192.168.20.163:123 0.0.0.0:*
udp 0 0 192.168.18.23:123 0.0.0.0:*
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
udp 0 0 :::123 :::*

Jitter is up to 4000 which means my client is not able to connect to server. I did not enable firewall on my time server and also my clients. What else is hindering it from accessing? When i did npdate -u -v time_srv_ip, it works fine. It is only ntp daemon that cannot access. HELP!!!! wat's wrong
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with ntpd... JordanH Linux - Networking 8 05-09-2005 07:22 PM
ntpd jayhel Slackware 2 02-19-2005 10:12 AM
Is ntpd working? lhill Linux - Networking 4 08-31-2003 12:10 PM
ntpd working? Greg21 Linux - Software 1 06-13-2003 03:08 PM
ntpd susx Linux - Newbie 3 08-28-2001 04:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration