VMware Cloud Community
davidjerwood
Enthusiast
Enthusiast
Jump to solution

ESX 3.5 & NTP

I am trying to setup/configure my new esx 3.5 servers to sync time with the NTP Servers. I have entered the ip addresses of my ntp servers in the "Time Configuration" settings and have manually checked the ntpconf but when I run ntpdate on my esx host I get " 2 Jan 12:54:57 ntpdate[3049]: no servers can be used, exiting" although the time does appear to be correct.

Has anyone else had this issue, am I missing something?

Any help appreciated.

0 Kudos
1 Solution

Accepted Solutions
AWo
Immortal
Immortal
Jump to solution

You have to enter "ntpdate 172.27.25.210". Only "ntpdate" is the wrong syntax. By using ntpdate you do a one-time sync so you can check if the ntp server is available.

Nevertheless, ntpd should be stopped.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =

View solution in original post

0 Kudos
9 Replies
AWo
Immortal
Immortal
Jump to solution

ntpd should not run while using ntpdate.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
davidjerwood
Enthusiast
Enthusiast
Jump to solution

Sorry how do you mean?

0 Kudos
AWo
Immortal
Immortal
Jump to solution

"ntpd" is the ntp daemon (service) which runs in the background to do the time sync. If you use the "ntpdate" command this daemon should be stopped temporarily.

Try "/etc/init.d/ntpd stop" (and "start" to start it again).

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
davidjerwood
Enthusiast
Enthusiast
Jump to solution

Ok, Thanks very much.

I have tried stopping the NTP Service running NTPdate and then starting

NTP Service again but NTPdate still reports "ntpdate[10938]: no servers

can be used, exiting"

Here is a copy of my NTP Log.

*****

Jan 2 13:08:06 lvprdesx005 ntpdate[10954]: can't find host server

Jan 2 13:08:06 lvprdesx005 ntpdate[10954]: can't find host server

Jan 2 13:08:06 lvprdesx005 ntpdate[10954]: step time server

172.24.25.210 offset 0.000083 sec

Jan 2 13:08:06 lvprdesx005 ntpd: succeeded

Jan 2 13:08:06 lvprdesx005 ntpd[10958]: ntpd 4.1.2@1.892 Thu Feb 15

04:31:47 EST 2007 (1)

Jan 2 13:08:06 lvprdesx005 ntpd[10958]: precision = 21 usec

Jan 2 13:08:06 lvprdesx005 ntpd[10958]: kernel time discipline status

0040

Jan 2 13:08:06 lvprdesx005 ntpd[10958]: getnetnum: "kod" invalid host

number, line ignored

Jan 2 13:08:06 lvprdesx005 ntpd[10958]: frequency initialized 0.000

from /var/lib/ntp/drift

Jan 2 13:08:06 lvprdesx005 ntpd: ntpd startup succeeded

*****

Having said that when I start the service it reports.

****

# /etc/init.d/ntpd start

ntpd: Synchronizing with time server:

Starting ntpd:

# tail -f messages

0 Kudos
AWo
Immortal
Immortal
Jump to solution

Please post your "ntp.conf" and the ntpdate command as well as "ifconfig -all" from your ESX console.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
davidjerwood
Enthusiast
Enthusiast
Jump to solution

NTP.Conf

***

restrict kod nomodify notrap noquery nopeer

restrict 127.0.0.1

server 172.27.25.210

server 172.24.25.210

driftfile /var/lib/ntp/drift

  1. Authentication delay. If you use, or plan to use someday, the

***

Ifconfig

***

# ifconfig

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:47150 errors:0 dropped:0 overruns:0 frame:0

TX packets:47150 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:6863896 (6.5 Mb) TX bytes:6863896 (6.5 Mb)

vswif0 Link encap:Ethernet HWaddr 00:50:56:49:CB:5E

inet addr:172.27.1.45 Bcast:172.27.1.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:54154 errors:0 dropped:0 overruns:0 frame:0

TX packets:20322 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:33442943 (31.8 Mb) TX bytes:7293638 (6.9 Mb)

***

# ntpdate

2 Jan 13:21:36 ntpdate[18882]: no servers can be used, exiting

***

Many Thanks for your help

0 Kudos
AWo
Immortal
Immortal
Jump to solution

You have to enter "ntpdate 172.27.25.210". Only "ntpdate" is the wrong syntax. By using ntpdate you do a one-time sync so you can check if the ntp server is available.

Nevertheless, ntpd should be stopped.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
davidjerwood
Enthusiast
Enthusiast
Jump to solution

Great, That works

Thanks very much for your help.

0 Kudos
AWo
Immortal
Immortal
Jump to solution

Jan 2 13:08:06 lvprdesx005 ntpd[10958]: getnetnum: "kod" invalid host

number, line ignored

What about this host? It seems that the name ca't be resolved.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos