LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2005, 09:00 AM   #1
wjn
Member
 
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54

Rep: Reputation: 15
ntpd dead but pid file exists


Hi, everybody...

I'm stretching my newbie legs on this.

I'm trying to demote my Win2k PDC to a file server and move all the domain controlling activities over to my Centos 4 box. I've also set up an Astaro firewall (2 NICs in a dedicated PC) just to muddy the mix.

The current problem I'm trying to solve is using my Centos box as my LAN time authority. I opened port 123 in the firewall and the Centos box seems to be able to contact an external time server. Also, the firewall computer appears to sync to the Centos server.

However, when I tried to point my FC3 desktop to the Centos box it won't sync. I've been using the "services" gui interface to stop and start the service, which gleefully reports that the service was successfully restarted, but the time doesn't sync. In the "status" box, it says that "ntpd dead but pid file exists". I've tried to use KDE system guard to locate the process and kill it but it's not listed. I've also tried to "kill ntpd" from a command prompt but it wants a PID number.

BTW, when I use the "Time and Date" applet to set the FC3 box to NTP, I've tried using the server name, the servername.domain, and the server IP address. It says "attempting to contact server" and then just closes after a delay.

On a related note, I also have 3 Win2k machines on this network that I would like to timesync to my Centos box. When I try using "net time \\servername /set" I get a message "error 5 has occurred. Access is denied".

Any help on this mess will be greatly appreciated.

Cheers,

Bill
 
Old 05-15-2005, 09:03 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try deleting ntpd.pid then start the service.
 
Old 05-15-2005, 09:13 AM   #3
wjn
Member
 
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54

Original Poster
Rep: Reputation: 15
Good morning, David.

I tried what you suggested, then went to the "Time and Date" applet and tried to set the box to one of the Redhat time servers to see if it might connect "normally".

It appears that it did not, and in the service status box it says;

"ntpd dead but subsys locked"

That's interesting. Do you have any suggestions for that?

Thanks,

Bill
 
Old 05-15-2005, 09:17 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you run:
ps -ef | grep ntp

Do you see ntpd running? Are there any error messages in /var/log/messages?
 
Old 05-15-2005, 09:39 AM   #5
wjn
Member
 
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54

Original Poster
Rep: Reputation: 15
Here are a few lines from the messages file...

May 15 09:09:12 phoenix ntpd[5213]: precision = 2.000 usec
May 15 09:09:12 phoenix ntpd[5213]: Listening on interface wildcard, 0.0.0.0#123
May 15 09:09:12 phoenix ntpd[5213]: Listening on interface wildcard, ::#123
May 15 09:09:12 phoenix ntpd[5213]: Listening on interface lo, 127.0.0.1#123
May 15 09:09:12 phoenix ntpd[5213]: Listening on interface eth0, 192.168.0.17#123
May 15 09:09:12 phoenix ntpd[5213]: kernel time sync status 0040
May 15 09:09:12 phoenix ntpd[5213]: frequency initialized -6.866 PPM from /var/lib/ntp/drift
May 15 09:09:12 phoenix ntpd: ntpd startup succeeded
May 15 09:09:51 phoenix ntpd: ntpd shutdown failed


Earlier there was a line that indicated that it couldn't find my network server by name so I'm thinking I probably have a DNS configuration problem. However, it looks like the ntpd startup is OK but it won't shut down.

Here's the grep output...

[root@phoenix run]# ps -ef | grep ntp
root 5421 5149 0 09:31 pts/2 00:00:00 grep ntp

I really need to review some of these console commands again. Are the 5421 and 5149 PID numbers?

Funny how humble this makes a person.
 
Old 05-15-2005, 12:02 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Yes 5421 is the pid of the grep command and 5149 is the pid of it's parent.

Can you post the contents of /etc/hosts and /etc/resolv.conf and the output from "hostname" - that should help us work out if it is a dns/name resoving issue.
 
Old 05-15-2005, 01:42 PM   #7
wjn
Member
 
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54

Original Poster
Rep: Reputation: 15
OK, thanks...

[root@phoenix etc]# cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.17 phoenix.euphonic.com phoenix
192.168.0.44 amdk6-300
192.168.0.101 winserver-1000

192.168.0.33 amdk6-1000
192.168.0.77 gateway-233
192.168.0.200 guardian
192.168.0.90 eagle
192.168.0.15 budgie
192.168.0.29 wjniemi.eg.int
192.168.0.91 eagle-lan

[root@phoenix etc]# cat resolv.conf
; generated by NetworkManager, do not edit!
nameserver 192.168.0.200
nameserver 192.168.0.90

[root@phoenix etc]# hostname
phoenix.euphonic.com
[root@phoenix etc]#

192.168.0.200 is the internal NIC on my firewall "guardian", which is set up as a DNS proxy. 192.168.0.90 is the server "eagle" NIC. I am running DNS on eagle. It also has a second NIC at 192.168.0.91 called "eagle-lan".

Here is the /etc/hosts file from eagle:

[bill@eagle-lan etc]$ cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.0.44 amdk6-300
192.168.0.101 winserver-1000
192.168.0.15 budgie
192.168.0.17 phoenix
192.168.0.12 aptiva-350
192.168.0.200 guardian
192.168.0.33 amdk6-1000
127.0.0.1 localhost.localdomain eagle-lan localhost
[bill@eagle-lan etc]$
 
Old 05-15-2005, 02:08 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you are still getting the subsys error (I missed that earlier) then try removing the lockfile:
rm -f /var/lock/subsys/nptd

Then restart the service:
service ntpd restart
 
Old 05-15-2005, 02:26 PM   #9
wjn
Member
 
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54

Original Poster
Rep: Reputation: 15
Curious.

I tried running the command you suggested, and then tried the restart command.

BASH didn't like the service restart... didn't know what to do (command not found error).

I've been looking at some files in the ntp subdirectory of etc. Is there anything there worth messing with?
 
Old 05-15-2005, 02:33 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You may need to use the full path if service isn't in your path:
/sbin/service ntpd restart

There may be configuration problems but it seems odd that it isn't starting by default.
 
Old 05-15-2005, 03:25 PM   #11
wjn
Member
 
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54

Original Poster
Rep: Reputation: 15
Now this is interesing....

[root@phoenix /]# /sbin/service ntpd restart
Shutting down ntpd: [FAILED]
ntpd: Synchronizing with time server: [ OK ]
Starting ntpd: [ OK ]
[root@phoenix /]#

It now appears to be working; the two clocks are synced. But the status window still says "ntpd dead but pid file exists". Hmmm.

Now on to the Windows boxes...

any thoughts about using a Linux NTP service for Windows time reference?
 
Old 05-15-2005, 03:34 PM   #12
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Perhaps the service died again - can you see it from running "ps -ef | grep ntp" Are there any more messages in /var/log/messages? Is there a /var/log/ntpd?

cmdtime is a pretty good ntp client for windows:
http://www.softshape.com/download/#freeware
 
Old 05-16-2005, 04:45 AM   #13
wjn
Member
 
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54

Original Poster
Rep: Reputation: 15
Hello David...

This is the output of the grep command...

[root@phoenix bill]# ps -ef | grep ntp
ntp 3729 1 0 May15 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid
root 3749 3729 0 May15 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid
root 6211 6192 0 04:09 pts/3 00:00:00 grep ntp

My temporary solution for the Windows part of my domain is to point the Windows server to the RedHat clock. The event viewer says it's not working but the times are correct.

Goofy, eh?

 
Old 05-16-2005, 05:46 AM   #14
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
That is odd. The first line from the ps output is correct. The second line (process) is owned by root with the parent process being the first (process 3729). I don't see that at my end.
Code:
[scowles@excelsior ~]$ ps -ef | grep ntp
ntp       3389     1  0 Mar19 ?        00:00:03 ntpd -u ntp:ntp -p /var/run/ntpd.pid
scowles  28091 26574  0 05:30 pts/1    00:00:00 grep ntp
Try shutting down both services manually along with removing the pid file. Then restart ntpd.
 
Old 05-22-2005, 11:42 AM   #15
ilyagp
LQ Newbie
 
Registered: May 2005
Location: Russia, Novosibirsk
Distribution: ASPLinux 9.2 (close to RH 9.2)
Posts: 1

Rep: Reputation: 0
May be helpfull...

Dear wjn! Visit this. https://www.redhat.com/archives/fedo.../msg04226.html
May be it will be an answer to your question.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
crond dead but pid file exists ryedunn Linux - General 0 01-27-2005 10:23 AM
xinetd dead but pid file exists pas Linux - Newbie 2 01-21-2005 03:52 PM
nmbd dead but pid file exists mammajamma101 Linux - Newbie 2 01-14-2005 09:16 AM
Xinetd dead --xinetd dead but pid file exists hillxy Linux - General 1 04-15-2004 02:10 PM
nmbd dead but pid file exists Zaius Linux - Newbie 8 01-26-2004 02:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:05 AM.

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