• Skip to primary navigation
  • Skip to main content

frankdenneman.nl

  • AI/ML
  • NUMA
  • About Me
  • Privacy Policy

ntpq -p connection refused error message

May 30, 2016 by frankdenneman

Sometimes a small misconfiguration can cause havoc in a complex distributed system. It becomes really annoying when no proper output is provided by log files and status report. While investigating time issues in my lab I ran into the following error message while executing the ntpq -p command:
01-ntpq-p connection refused
TL;DR
NTP client is disabled, enable it via the GUI
The standard NTP query program (ntpq) is one of the quickest way to verify that the Network Time Protocol Daemon (ntpd) is up and running. The command ntpq -p prints a list of peers known to the ESXi host as well as a summary of their state. Running the command on another ESXi host provided the following output.
02-ntpq -p feedback
Requesting the status of the NTPD status on the host with weird time issues, shows it’s not running. No proper feedback is provided by the command line other than it’s starting, no failure code is returned.
03.NTPD status
Management service initialisation, such as ntpd starts are logged in the file /var/log/syslog.log in ESXi 5.1 and up. Unfortunately, nothing useful is logged in this logfile as well.
04.syslog.log output
I couldn’t find a command that provides accurate output whether the NTP client was enabled or not. Time to open up the web client. Host time configuration can be found when selecting the ESXi host, Manage, Time Configuration. Apparently NTP was not enabled.
05-NTP client disabled
Simple problem to fix, unfortunately there is no simple command line function that allows to verify while NTP client is enabled (sans PowerCli)

Filed Under: VMware

Comments

  1. Doug says

    May 30, 2016 at 4:51 pm

    Unfortunately, there seems to be no command line option to setup ntp either (not since the ESX days, nothing ever carried over to ESXi). That would make automated or semi-automated rollouts easier to make sure everything was setup the same.

  2. Al Iannacone says

    June 23, 2016 at 5:16 pm

    PowerCLI can be used to determine the Policy and whether or not the NTP Daemon is running.
    Get-VMHost | Get-VMHostService | ?{$_.key -like “ntpd”} | select VMHost,Policy,Running

Copyright © 2025 · SquareOne Theme on Genesis Framework · WordPress · Log in