Unable to log in to VAMI with root user via GUI

I was preparing vCenter for an upgrade to vSphere 7 Update 3c and needed to access VAMI, however, I was not able to log in with the root credentials. Of course, I have a triple-check password.

More surprising was the fact that I was able to SSH to vCenter with credentials that failed on GUI. I tried to change the password via the SSH command passwd

After the password change, I still was not able to log in via GUI.

Good thing is that from vSphere 7 there is an option to log in to VAMI with administrator@vsphere.local . I tested that and was able to login.

This strange behavior is happening due to the vmware-statsmonitor service taking a long time to start. n this delayed duration, the applmgmt service gets marked as stopped

To resolve this issue please follow those steps:

  1. SSH to vCenter
  2. Change to /bin/bash if you are in appliance shell
  3. Go to the below directory:
cd /etc/vmware/vmware-vmon/svcCfgfiles/
  1. Make a backup folder:
mkdir /root/backup
  1. Backup applmgmt.json and statsmonitor.json files:
cp /etc/vmware/vmware-vmon/svcCfgfiles/applmgmt.json /root/backup/
cp /etc/vmware/vmware-vmon/svcCfgfiles/statsmonitor.json /root/backup/
  1. Change permissions on the existing json files:
chmod 700 applmgmt.json 
chmod 700 statsmonitor.json
  1. Change value of StartTimeout  in applmgmt.json file to 600 seconds using VI editor
  1. Modify statsmonitor service config for vMon to set higher startup timeout (This adds a StartTimeout”: 600 to the statsmonitor.json):
sed -i '/StartTimeout/d' /etc/vmware/vmware-vmon/svcCfgfiles/statsmonitor.json 
sed -i '/ApiHealthFile/a "StartTimeout": 600,' /etc/vmware/vmware-vmon/svcCfgfiles/statsmonitor.json 
  1. Stop and start statsmonitor service explicitly:
/usr/lib/vmware-vmon/vmon-cli -k statsmonitor
/usr/lib/vmware-vmon/vmon-cli -i statsmonitor
  1. Reboot the VCSA:
reboot

After reboot login to the VAMI page with root credentials should be successful.

  1. Change permissions on the existing json files to the original permissions:
cd /etc/vmware/vmware-vmon/svcCfgfiles/
chmod 444 applmgmt.json
chmod 444 statsmonitor.json

Please like and share to spread the knowledge in the community.

If you want to chat with me please use Twitter: @AngrySysOps

Visit my FB page: https://www.facebook.com/AngrySysOps

Read my blog: https://angrysysops.com

Subscribe to my channel : https://www.youtube.com/channel/UCRTcKGl0neismSRpDMK_M4A

Please leave the comment