HCX - Error while executing "/runHealthCheck.sh" due to Hostname being too long
search cancel

HCX - Error while executing "/runHealthCheck.sh" due to Hostname being too long

book

Article ID: 321584

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

Identify and remediate a known issue with HCX /runHealthCheck.sh script execution.

Symptoms:
Customer may report errors related to hostname being too long while executing ./runHealthCheck.sh for a given HCX Connector/Cloud system.

Steps for execution:

  • SSH into HCX appliance
  • Change directory to: /opt/vmware/tools/
  • Execute bash file: ./runHealthCheck.sh

Example:

[admin@hcx]$ hostname
hcx.example.com

[admin@hcx /opt/vmware/tools]$ ls -l | Health
total 20612
-r-xr-xr-x 1 admin secureall     5960 Sep 22  2021 nspHealthCheck
-r-xr-xr-x 1 admin secureall     1743 Sep 22  2021 runHealthCheck.sh

[admin@hcx /opt/vmware/tools]$ ./runHealthCheck.sh
logger: tag 'hcx.example.com HC-[2022-11-11 14:21:32-GMT] ' is too long
logger: tag 'hcx.example.com HC-[2022-11-11 14:21:32-GMT] ' is too long



Cause

For all HCX systems, the "runHealthCheck.sh" contains a tag which has been created by concatenating the hostname and timestamp information.
Since the timestamp has a fixed length, the only variable part is length of hostname used to deploy HCX system.

As a result, when HCX system has hostname defined more than 18 characters, the limitation will be imposed by the 'logger' library which is used in the 'runHealthCheck.sh' script.
And the limitation is with 'tag', which is passed as an argument to the 'logger' cannot be more than 48 characters.

Resolution

This issue is resolved in VMware HCX 4.6.0

Workaround:
Use a shorter hostname length (< 18 characters) for HCX Connector/Cloud system when using the script.

Additional Information

Impact/Risks:
There is NO impact in ANY HCX related workflows including Migration and Network Extension.
The well known health check command "hc -d" will remain functional from HCX Central CLI (CCLI).