VMware Cloud Community
egr
Contributor
Contributor

ntpd does not synch time during boot process

Hi,

I configured the ntp client on our ESX 3.01 servers as described in

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1339

I pointed to our DC (W2K3).

When I start ntpd it synchs with our Domain Controller.

The problem is that during bootup of the host the time is not synchronized.

Following message:

Synchronizing with time server: \[FAILED]

After that the ntpd is started without any problems.

Any ideas?

During boot it sees that the network is up and running.

Regards

/egr

0 Kudos
8 Replies
emmar
Hot Shot
Hot Shot

Have you updated your /etc/ntp/step-tickers file with the FQDN of your time source?

I think this file is used on boot up

Also have you run the following to make sure the ntpd service start on boot up:

chkconfig --level 345 ntpd on

E

0 Kudos
dominic7
Virtuoso
Virtuoso

It might also be because your hardware clock is too far off for ntpd to sync up. Once you have the local clock set right you can sync it to the hardware clock

#> hwclock --systohc

Then give it a reboot and see if ntpd starts right.

0 Kudos
egr
Contributor
Contributor

Hi,

thanks for your replies!

I have entered the IP in in the step tickers file so DNS should not be a problem.

"hwclock --systohc' works without any problems.

The problem is not that ntpd does not start but that the time isn't synched while booting.

So ntpd does start without any problems.

But when taking a look at the boot process one can see that before ntpd is started it is tried to synch time.

And this does not work - strange.

I have thought about changing the number in the boot script so for example from S58 to S95 but am not sure wheter this is a good way.

Any further ideas?

Regards

/egr

0 Kudos
moneill
Enthusiast
Enthusiast

Why do you need the time to be synchronised while the server is booting?

Mike

0 Kudos
Texiwill
Leadership
Leadership

Hello,

The ntpd service does two things on boot, the first is to use 'ntpdate' and sync the time to one of the servers. The second is to run ntpd so that the time stays in sync. The problem you are having is with ntpdate.

Do the following:

service ntpd stop

cat /etc/ntp/step-tickers

Use the lines from that and run:

ntpdate lineFromStepTickersOuptut

If this fails to work, then either there is a network problem or some other issue. This is really not an ESX issue but a NTP issue at this point.

Best regards,

Edward

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
marvinb
Enthusiast
Enthusiast

this is interesting. I have had this problem with RHEL 3.0 and 4.0. Some systems are fine, some it always fails and they are identically configured.

0 Kudos
marvinb
Enthusiast
Enthusiast

this is interesting. I have had this problem with RHEL 3.0 and 4.0. Some systems are fine, some it always fails and they are identically configured.

0 Kudos
Texiwill
Leadership
Leadership

Hello,

Generally this could be do to a number of issues, but the most prevalent is the 'restrict' line in the ntpd servers configuration file. Your ntpd server may not allow the server in question to contact it. Check to see if that line is on the NTP server. If you are using one of the RHEL time servers and not an internal time server then it is most likely a network issue. Check the firewall to see if it allows ntp out. For ESX use: esxcfg-firewall -e ntpClient

Best regards,

Edward

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos