Operating System - Linux
1829585 Members
1774 Online
109992 Solutions
New Discussion

Re: ntpd dead but subsys locked error

 
Andrew Kaplan
Super Advisor

ntpd dead but subsys locked error

Hi there --

I have several machines that are supposed to be running ntp on them but for some reason are unable to do so. When I run the /etc/init.d/ntpd status command, I get the following message:



I have not seen this before, and could use some help. All machines in question are running Red Hat 8.0. The ntp.conf files have been configured to have the servers sync with a particular time server.

A Journey In The Quest Of Knowledge
12 REPLIES 12
Andrew Kaplan
Super Advisor

Re: ntpd dead but subsys locked error

Sorry -- the error message is:

ntpd dead but subsys locked
A Journey In The Quest Of Knowledge
K.C. Chan
Trusted Contributor

Re: ntpd dead but subsys locked error

it just mean that for some reasons the nptd daemon dies before removing the lock file.

Check the logs file, there may be clues as to why it dies.
Reputation of a thousand years can be determined by the conduct of an hour
Vitaly Karasik_1
Honored Contributor

Re: ntpd dead but subsys locked error

1) what is your ntp.conf file?
2) did you try "service ntpd restart"?
Johannes Krackowizer_1
Valued Contributor

Re: ntpd dead but subsys locked error

hi andrew,

please post your ntp.conf

best regards,

johannes
"First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture." (Linus Torvalds)
Andrew Kaplan
Super Advisor

Re: ntpd dead but subsys locked error

Thank-you all for your replies. I am posting the ntp.conf file per request.
A Journey In The Quest Of Knowledge
Vitaly Karasik_1
Honored Contributor

Re: ntpd dead but subsys locked error

I've started ntpd on my RHEL3.0 box with your config file and ntpd works.

- did you try to check ntpd status by "ps -ef|grep ntp" ?

- upgrade with last RHL8.0 paches may be useful
Andrew Kaplan
Super Advisor

Re: ntpd dead but subsys locked error

Hi there --

I ran the service ntpd restart command, and it generated the same error message that was mentioned in a previous e-mail. I also ran the ps -ef |grep ntp command, and the output was the following:

nptd -U ntp

Regarding the service patches for Red Hat 8.0, can you specify which one(s) would be of use here? Thanks.
A Journey In The Quest Of Knowledge
Vitaly Karasik_1
Honored Contributor

Re: ntpd dead but subsys locked error

1) if ps shows ntpd running - ntp works. probably it's just some bug in ntpd script.
try run " ntpq -c pe" in order to check ntpd status.
see for more http://www.fifi.org/doc/ntp-doc/html/debug.htm NTP Debugging Techniques

2) I sugest to install the latest available for RHL8.0 "ntp" package
Ermin Borovac
Honored Contributor

Re: ntpd dead but subsys locked error

It looks like your system time is too far off from network time so ntpd cannot synchronise your system time with network time.

You can try getting /etc/init.d/ntpd to run ntpdate to update your system time. To do this put IP addresses of your NTP servers in /etc/ntp/step-tickers file.

# echo "" > /etc/ntp/step-tickers
# /etc/init.d/ntpd start

You should also check that your NTP servers are functional with 'ntpq -p'.

# /usr/sbin/ntpq -p

To check if your local system time has been synced run 'ntpq -p' without IP address.

# /usr/sbin/ntpq -p
* 2 u 745 1024 377 0.468 0.168 0.048

If the output line starts with asterisk it means that your system time has been synced with NTP server.

Anu Mathew
Valued Contributor

Re: ntpd dead but subsys locked error

ntpd would die if your initial time difference is huge from the "right" time from the ntp server.

Here are some tips:

1) Run ntpdate from the command prompt as root to set the time before you start ntpd. This would fail with a socket error if you have ntpd running

2) Once you have run ntpdate, run sethwclock (rhel2.1) or hwclock --systohc (rhel 3.0) to set your hardware clock to the system time.

Hope this helps.

--Anu
Chris Xu
Trusted Contributor

Re: ntpd dead but subsys locked error

ntpd places a lock file at /var/lock/subsys/nptd when started. If nptd died abnormally, the lock file was not removed. Go ahead deleting that file, and start your ntpd again by using "service ntpd start".

Chris
Andrew Kaplan
Super Advisor

Re: ntpd dead but subsys locked error

Hi there --

Thank-you all for your replies. I came up with a "novel" solution to the problem. The Webmin administration utility includes a program that works with NTP and aids with the synchroniza- tion of software and system clocks on the systems in question. Once I installed the program and configured it accordingly, NTP worked fine.

Admittedly this is a "roughshod" approach to resolving this issue.
A Journey In The Quest Of Knowledge