vCenter Runtime settings shows vCenter name as "localhost"
search cancel

vCenter Runtime settings shows vCenter name as "localhost"

book

Article ID: 414262

calendar_today

Updated On:

Products

VMware vCenter Server 8.0

Issue/Introduction

  • Adding ESXi hosts to the vCenter will fail.
  • Manually changing the vCenter Runtime settings to vCenter FQDN reverts to "localhost" following a reboot.
  • From /var/log/vmware/vpxd/vpxd.log , following events are observed :
    • YYYY-MM-DDThh-mm-ss.613Z error vpxd[3668659] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Failed to connect to database: ODBC error: (08001) - [unixODBC]connection to server on socket "/var/run/vpostgres/.s.PGSQL.5432" failed: FATAL:  Peer authentication failed for user "vpxd"
      --> .  Retry attempt: 2945 ...
      YYYY-MM-DDThh-mm-ss.623Z info vpxd[3668659] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Logging in to DSN: VMware VirtualCenter with username vpxd
      YYYY-MM-DDThh-mm-ss.626Z info vpxd[3668659] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Logging in to DSN: VMware VirtualCenter with username vpxd
      YYYY-MM-DDThh-mm-ss.629Z info vpxd[3668659] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Logging in to DSN: VMware VirtualCenter with username vpxd
      YYYY-MM-DDThh-mm-ss.631Z info vpxd[3668659] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Logging in to DSN: VMware VirtualCenter with username vpxd

  • On running command in vCenter ssh /usr/sbin/vpxd to verify if vpxd.cfg file is valid, it gives the below output : 
    • YYYY-MM-DDThh-mm-ss.271Z info vpxd[3727273] [Originator@6876 sub=Default] [VdbSchemaLoader::LookupSchemaFromDB] Loaded  schema and index information from DB
      YYYY-MM-DDThh-mm-ss.285Z error vpxd[3727273] [Originator@6876 sub=vpxdVdb] Database version will not be set in vpxd.cfg
      YYYY-MM-DDThh-mm-ss.287Z warning vpxd[3727273] [Originator@6876 sub=Default] [Vdb::LockRepositoryHelper] Failed to get exclusive lock: P0001:1:ODBC error: (P0001) - ERROR: Failed Lock
      --> DETAIL: Failed to exclusive lock vCenter repository!;
      --> Error while executing the query

       

Environment

  • VMware vCenter Server 8.0
  • VMware vCenter Server 7.0

Cause

  • This can be caused by a corrupt vpxd.cfg which triggers the vpxd process to start with default settings.
  • /etc/hosts or /etc/hostname file does not have the correct FQDN mapping.
  • The vCenter appliance was deployed using "localhost" or IP instead of FQDN.
  • VPXD configuration overwritten during upgrade or failed patch.
  • vpxd.cfg or /etc/hosts has incorrect permissions, preventing vpxd from saving updates.

Resolution

  • Verify if the /etc/vmware-vpx/vpxd.cfg is valid or corrupt using KB : Validating corrupt VCSA (vpxd.cfg)
  • Steps to rectify the vpxd.cfg file :
    • Copy the contents of /etc/vmware-vpx/vpxd.cfg file to a notepad and save the file with extension ".xml"
    • Then open the file in web browser (edge or chrome) to point out the invalid line  as below :
      • This page contains the following errors: 
        error on line <number> at column <number>: Opening and ending tag mismatch: <tag name> line <number> and <parent tag name>
  • To resolve this issue, edit the /etc/vmware-vpx/vpxd.cfg file using the vi editor on the vCenter Server, and correct the mismatched tag on the line indicated in the error message.
    • Identity the incorrect line number.
    • Edit the /etc/vmware-vpx/vpxd.cfg file on vi editor to make the changes.
    • Save and exit the file: Press Esc, then type: :wq
  • Restart the vpxd service : service-control --restart vpxd