VCenter Server error LDAP

This Error i face it multiple times with Vcenter 6.7 and 7 that’s why i am sharing my experiance with it.

After importing the vcenter appliance (the first step in installing the VCSA) and when start the initializing the VCSA and create the SSO Domain (VSphere.local).

I receive an error that Could not connect VMware directory service Via LDAP.

After Investigation found that in the import phase the file “/etc/hosts” its parameters changed.

From

127.0.0.1 localhost.localdom localhost
::1 localhost.localdom localhost ipv6-localhost ipv6-loopback

To

And this cause that the appliance cannot talk with itself. So, we should go and edit the file and change it back to the original parameter and the setup will success.

First enable the SSH in the VCenter appliance.

Second using Putty or Mputty to log in to the appliance.

And login with the username and password. Write “Shell” to enter the configuration mode.

Third open the Hosts file using this command “vi /etc/hosts”.

Using the arrows move to the lines and edit the configuration to the below:

127.0.0.1 localhost.localdom localhost
::1 localhost.localdom localhost ipv6-localhost ipv6-loopback

After finish editing and to save use press “esc” bottom and write “:w” and to save and quit the file use “:wq”. An click Enter.

And deploy the second step it will success.