Cannot set NTP in vCenter server - Server unreachable
search cancel

Cannot set NTP in vCenter server - Server unreachable

book

Article ID: 414197

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Configuring NTP server from VAMI on the vCenter server fails.

 

  • Basic connectivity exists between the vCenter server and the NTP server :
    > A ping or traceroute command to check network connectivity to the NTP server is successful
    # ping <NTP_Server_IP_or_Hostname>
    # traceroute <NTP_Server_IP_or_Hostname>

    > No firewall or network security device blocking UDP port 123, which is used for NTP communication

    # nc -uz <NTP_Server_IP_or_Hostname> 123
    # tcpdump -i <interface> udp port 123
  • /var/log/vmware/applmgmt/applmgmt.log:

    yyyy-mm-ddThh:mm:ss DEBUG:vmware.appliance.timesync.impl:Operation output = b'\xe2\x97\x8f ntpd.service - Network Time Service\n     
    Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)\n
    Active: active (running) since 
    <date> hh:mm:ss   ntpd[3038432]: Listen and drop on 0 :123\n
    <date> hh:mm:ss   ntpd[3038432]: Listen and drop on 1 :123\n
    <date> hh:mm:ss   ntpd[3038432]: Listen normally on 2 :123\n
    <date> hh:mm:ss   ntpd[3038432]: Listen normally on 3 :123\n
    <date> hh:mm:ss   ntpd[3038432]: Listening on routing socket on fd #20 for interface updates\n
    <date> hh:mm:ss   ntpd[3038432]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized\n
    <date> hh:mm:ss   ntpd[3038432]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized\n <date> hh:mm:ss <NTP_Server_IP_or_Hostname> systemd[1]: Started Network Time Service.\n',
    error = b'' returncode = 0
    yyyy-mm-ddThh:mm:ss DEBUG:vmware.appliance.timesync.impl:NTP status Up
    yyyy-mm-ddThh:mm:ss INFO:vmware.appliance.vapi.auth:Authorization request for service_id: com.vmware.appliance.ntp, operation_id: get
    yyyy-mm-ddThh:mm:ss DEBUG:vmware.vherd.base.authorization_local:Verify privileges user (root) privilege ['ViewConfiguration']
    yyyy-mm-ddThh:mm:ss DEBUG:root:Validated user privileges in localstore or SSO

    yyyy-mm-ddThh:mm:ss DEBUG:vmware.appliance.timesync.impl:com.vmware.appliance.ntp.get()
    yyyy-mm-ddThh:mm:ss INFO:vmware.appliance.vapi.auth:Authorization request for service_id: com.vmware.appliance.ntp, operation_id: test

    yyyy-mm-ddThh:mm:ss DEBUG:vmware.appliance.timesync.impl:com.vmware.appliance.ntp.test(['<NTP_Server_IP_or_Hostname>'])
    yyyy-mm-ddThh:mm:ss DEBUG:vmware.appliance.timesync.ntpTestUtils:Testing connection to: ['<NTP_Server_IP_or_Hostname>']
    yyyy-mm-ddThh:mm:ss DEBUG:vmware.appliance.timesync.ntpTestUtils:NTP test out: b'server <NTP_Server_IP>, stratum 1, offset , delay \n', err: b' <date> hh:mm:ss ntpdate[]: no server suitable for synchronization found\n', returncode: 1
    yyyy-mm-ddThh:mm:ss DEBUG:root:TestRunStatuses: servers=['<NTP_Server_IP_or_Hostname>'] statuses=['SERVER_UNREACHABLE']
  • Running the command ntpdate -q <NTP_Server_IP_or_Hostname> returns the error: 'Server dropped: Server has gone too long without sync.' Additionally, the reference and originate timestamps in the output are significantly out of sync, indicating that the NTP server is not properly synchronized.
    ntpdate -d 
    <date> <time> ntpdate[]: ntpdate 
    Looking for host <NTP_Server_IP_or_Hostname> and service ntp
    <NTP_Server_IP> reversed <NTP_Server_IP_or_Hostname>
    host found :
    transmit(<NTP_Server_IP>)
    receive(<NTP_Server_IP>)
    transmit(<NTP_Server_IP>)
    receive(<NTP_Server_IP>)

    server <NTP_Server_IP>, port 123
    stratum xx, precision xx, leap xx, trust xx

    reference time:       <date> <year> <time>
    originate timestamp:  <date> <year> <time>
    transmit timestamp:   <date> <year> <time>

    <NTP_Server_IP>: Server dropped: server has gone too long without sync
    ...
    ...
    <date> <year> <time> ntpdate[]: no server suitable for synchronization found

Environment

vCenter Server 8.x

vCenter Server 7.x

Cause

Configuration issues on the NTP server, where the server's time is significantly out of sync with the actual time.

Resolution

Ensure that the NTP server's clock is properly synchronized, as any significant time discrepancy may prevent the vCenter Server from successfully completing the NTP synchronization process.

 

Additional Information