Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-15-2005, 09:00 AM
|
#1
|
Member
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54
Rep:
|
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
|
|
|
05-15-2005, 09:03 AM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Try deleting ntpd.pid then start the service.
|
|
|
05-15-2005, 09:13 AM
|
#3
|
Member
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54
Original Poster
Rep:
|
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
|
|
|
05-15-2005, 09:17 AM
|
#4
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
If you run:
ps -ef | grep ntp
Do you see ntpd running? Are there any error messages in /var/log/messages?
|
|
|
05-15-2005, 09:39 AM
|
#5
|
Member
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54
Original Poster
Rep:
|
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.
|
|
|
05-15-2005, 12:02 PM
|
#6
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
05-15-2005, 01:42 PM
|
#7
|
Member
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54
Original Poster
Rep:
|
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]$
|
|
|
05-15-2005, 02:08 PM
|
#8
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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
|
|
|
05-15-2005, 02:26 PM
|
#9
|
Member
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54
Original Poster
Rep:
|
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?
|
|
|
05-15-2005, 02:33 PM
|
#10
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
05-15-2005, 03:25 PM
|
#11
|
Member
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54
Original Poster
Rep:
|
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?
|
|
|
05-15-2005, 03:34 PM
|
#12
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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
|
|
|
05-16-2005, 04:45 AM
|
#13
|
Member
Registered: Sep 2003
Location: midwest
Distribution: RH8, RH9, Fedora
Posts: 54
Original Poster
Rep:
|
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?

|
|
|
05-16-2005, 05:46 AM
|
#14
|
Member
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620
Rep:
|
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.
|
|
|
05-22-2005, 11:42 AM
|
#15
|
LQ Newbie
Registered: May 2005
Location: Russia, Novosibirsk
Distribution: ASPLinux 9.2 (close to RH 9.2)
Posts: 1
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 12:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|