System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

ntp error message but ntpdate works

SOLVED
Go to solution
kenken_3
Regular Advisor

ntp error message but ntpdate works

Hi,

I have a few redhat ES4 linux boxes and I have confiured the ntp. However, I encountered a funny error message. When I try to start the ntp service, it always tells me:

shutdown ntpd: OK
ntpd: synchronizing with time server [Failed]
starting ntpd: OK.

the time is not synchronized though it is only has 1 mins difference.

However, when I tried the ntpdate -b ntpserver1. It works and the time synchronized immediately.

very strange. Anyone knows how to solve this?

thanks
wang & wang
8 REPLIES
~sesh
Esteemed Contributor

Re: ntp error message but ntpdate works

It seems like ntpdate works fine when you try to synchronize by specifying an ntp server. The error may be because the default ntp server cannot be accessed.

Check the /etc/ntp.conf file & look at the default NTP server. If necessary change the server to the one that works.

Good luck!
malik_3
Regular Advisor

Re: ntp error message but ntpdate works

hi
did you see /etc/ntp.conf file and are you sure that your ntp server is correct? if not you have to describe as well as it
Vitaly Karasik_1
Honored Contributor

Re: ntp error message but ntpdate works

in RHEL for some reason ntpdate and ntpd use different servers during start:
1) ntpd from /etc/ntp.conf
2) ntpdate from /etc/ntp/step-tickers


So I guess you have a problem in /etc/ntp.conf.

kenken_3
Regular Advisor

Re: ntp error message but ntpdate works

the ip address I used in "ntpdate -b ntpserver1" is the first server ip address in my /etc/ntp.conf.

However, it always tells me the synchronizing failed. However, once I stop the ntpd daemon and run it manully with ntpdate -b server1, everying works fine.

really strange

wang & wang
kenken_3
Regular Advisor

Re: ntp error message but ntpdate works

Hi Vitaly,

I have attached my ntp.conf in my first post. However, when I try to put the my ntp servers into /etc/ntp/step-tickers and restart the ntpd daemon. Everything works this time.

anyone could explain this?

wang & wang
Ivan Kuznetsov
Frequent Advisor
Solution

Re: ntp error message but ntpdate works

Hello!

As Vitaly wrote above, RHEL4 uses /etc/ntp.conf for ntpd and /etc/ntp/step-tickers for one-time startup sync.

Startup script firstly tries to set time with ntpdate using /etc/ntp/step-tickers as time servers list. Then it starts ntp daemon which use /etc/ntp.conf. If time servers in /etc/ntp/step-tickers are wrong/unaccessible you will see 'synchronizing with time server [Failed]' message.

You can run 'ntpdate -dqvu `cat /etc/ntp/step-tickers`' manualy and see more diagnostics


Ivan Kuznetsov
Frequent Advisor

Re: ntp error message but ntpdate works

Most probably 'ntpdate -b ntpserver1' fails because the udp port 123 is busy by runnng ntpd. You can add '-u' option to use unprivileged udp port

kenken_3
Regular Advisor

Re: ntp error message but ntpdate works

what Ivan said is right. I need to put ntp servers into step-tickets.
wang & wang