Hello all well I been having problems with my vCSA for some time now. and i cant found anything on google what will fix my problem. The problem is after rebooting my ESXi my vCSA web GUI will not loud when i go to the main site i get this Error:
Only way i can fix this is to delete the vCSA and reinstall it. I also tried upgrading to the newest build 6.5.0a on the ESXi host and vCSA and still after a reboot vCSA comes up with at 503 error (i was running just 6.5). I can get in to SSH and the web management on port 5480 and all the health statuses are saying "Good". I can not get in to sFTP to copy out files like the logs files. I have not change the IP of the ESXi or vCSA. On my network i am using a UBNT ERLite?3 router and I have the MAC and IP set in the DHCP table. From anyware on the network i can ping it by name and IP and if i do a NSLOOKUP it comes back correctly. I also shutdown the vCSA and try to ping in and i get no replay (just checking to make sure there is no duplicate IP's). Below are the service running and stopped on vCSA.
I have found that some people having the same problem and they were able to just restart the "vsphere-client" and then start it but that does not work for me. I also tried when i installed vCSA with DHCP instead of a static IP.. vCSA got the right IP but after I reboot the ESXi I still got the 503 error. "pbraren" from HERE had some good luck with this but it did not work for me .
So, I opened a case with VMware and it's a known issue for vCenter 6.5.0a. The below fix directly solved the error I was seeing.
Information attached for reference only. Please be aware that this may NOT be applicable to your system and may bork it completely!
Symptoms
On the webclient, the web page shows the error: 503 Service Unavailable (Failed to connect to endpoint). . .
PowerCLI cannot connect to vCenter.
vpxd on vCenter Server 6.5 intermittently crashes with the following error stack in the vpxd log file:
2016-11-28T02:09:36.418Z error vpxd[7F27BD4A9700] [Originator@6876 sub=Default opID=HB-host-83@226512-71ec21d0] [VdbStatement] SQLError was thrown: "ODBC error: (23505) - ERROR: duplicate key value violates unique constraint "pk_vpx_vm_virtual_device";
--> Error while executing the query" is returned when executing SQL statement "INSERT INTO VPX_VM_VIRTUAL_DEVICE (ID, DEVICE_KEY, CONN_AL_GU_CONTROL_FLAG, CONN_CONNECTED_FLAG, CONN_START_CONNECTED_FLAG, CONN_STATUS, DEVICE_INFO_SUMMARY, DEVICE_INFO_LABEL, DEVICE_CONTROLLER_KEY, DEVICE_UNIT_NUMBER, DEVICE_TYPE, DEVICE_TEXT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
Note:
-
The VMware vCenter Server 6.5 vpxd logs are located in the %ALLUSERSPROFILE%\VMWare\vCenterServer\logs\vmware-vpx folder.
-
-
The VMware vCenter Server Appliance vpxd 6.5 logs are located in the /var/log/vmware/vmware-vpx folder.
Resolution
Caution: Before making database modifications, ensure there is a working backup of the database or snapshot.
If the embedded postgres database is being used, locate the duplicate key in the postgresql logs:
postgresql.log
UTC 583a9c81.5814 127750 VCDB vc ERROR: duplicate key value violates unique constraint "pk_vpx_vm_virtual_device"
UTC 583a9c81.5814 127750 VCDB vc DETAIL: Key (id, device_key)=(361, 3002) already exists.
Note: The postgresql.log can be found in var/log/vmware/vpostgres
To connect to the embedded postgres database:
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
To remove the duplicate key run the below command:
(modify the id and device_key according to your vpxd log below!):
DELETE FROM vc.vpx_vm_virtual_device where id='361' and device_key='3002';