Problem Scenario Resolutions:
- Invalid Hostname: While deploying the Cloud Proxy, the hostname field might be empty and is set to photon-machine, which is an invalid hostname.
How to check the hostname:
- From the Cloud Proxy machine, login as root, use the command hostname to check the hostname of the machine.
root@sc1-10-###-##-#[ ~ ]# hostname
sc1-10-###-##-#.<domain>.com
- In the application UI, go to Configurations > Cloud Proxies, select the Cloud Proxy and check if the hostname matches the value returned from the hostname command.
NOTE: For Cloud Proxy version 7.2.0.52742 Build 19165859 or later:
If Cloud Proxy has the hostname set to photon-machine, when you launch the Cloud Proxy machine, a Host name validation displays warning warning comes up - "Invalid hostname! Please set up a correct hostname".
- You can update the hostname of the machine using the following command:
/opt/vmware/share/vami/vami_config_net
- Verify the updated hostname using the command hostname and see if it is returns the updated and correct hostname.
- Run the script /configure-host-name.sh from the root directory to update the hostname in the agents running inside the container.
You might encounter a scenario in which the hostname returned by the command hostname matches the one present on the application UI, but the configuration still fails. In such a scenario, validate the hostname in java arguments.
Steps to check the hostname in java arguments:
- Enter the Docker container using the following command.
docker exec -it log-forwarder bash
- Enter the following command to get the java arguments.
ps –eaf | grep java
Ensure that the hostname is correct in java arguments. If not, update the hostname using the /configure-host-name.sh script.
NOTE: The /configure-host-name.sh script will not be present in Cloud Proxy versions earlier than 7.2.0.52742 Build 19165859, reboot the machine to update it to the latest version.
- Hostname is not reachable: The host provided to Cloud Proxy may not be reachable. You can check by executing the nslookup command on the host. If the host is invalid, it returns NXDomain for the host.
[user@host lint-app % nslookup photon-machine
Server : <serverIP>
Address: <Address>
** server can't find photon-machine: NXDOMAIN
If the host is valid, the hostname and the address of the host are returned.
[
user@host lint-app % nslookup photon-machine <server name>
Server : <serverIP>
Address: <Address>
Name: <NXHost servername>
Address: <Address>
Resolution: Update the hostname of the Cloud Proxy machine with a reachable host. You can update the hostname using the steps provided above.
- Hostname has an invalid character: The hostname should not have invalid characters. If the hostname has an invalid character, it cannot be configured on ESXi.
In the above example, it says that there exists an illegal character at index 9, which is ‘_’. If hostname contains ‘_’ character, the configuration will fail.
Resolution: The hostname should be updated to a valid one. You can update the hostname using the steps provided in point 1 above.