RCA: Unable to upgrade to 6.0 u1 from 5.5 U3

Issue: Unable to upgrade to 6.0 u1 from 5.5 U3 version because of DB authentication issue.

summary: While upgrading to 6.0 from 5.5 VCVA version. In step 4 when connect to source appliance  getting the following message after filling all the information and hitting next.

         vcdb Error while reading data from the vCenter Server database: psql.bin: FATAL:  Ident authentication failed for user "postgres"

Log analysis:

CollectRequirements_com.vmware.vcdb.log file

2015-10-22T15:38:24.391Z INFO __main__ Set root upgrade folder to: /var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts

2015-10-22T15:38:24.466Z INFO __main__ Context file /var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/upgrade_working_directory/system-data/upgrade-com.vmware.vcdb-upgradeContext does not exist. Use default context

2015-10-22T15:38:24.466Z INFO extensions Found upgrade phase <module 'vcdb' from '/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts/vcdb/__init__.pyc'>:CollectRequirements'

2015-10-22T15:38:24.466Z INFO extensions Executing upgrade phase '<module 'vcdb' from '/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts/vcdb/__init__.pyc'>:CollectRequirements' with context {u'destinationVcPlatform': u'Linux', u'resourceDir': u'/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/upgrade_working_directory', u'locale': u'en', u'destinationPlatform': u'Linux', u'destinationVcVersion': u'6.0', u'sourceVcPlatform': u'Linux', u'sourcePlatform': u'Linux', 'logD

ir': '/var/log/vmware/upgrade', u'sourceSsoVersion': u'5.5', u'sourceVcVersion': u'5.5', u'destinationSsoVersion': u'6.0', u'systemExportDir': u'/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/upgrade_working_directory/system-data'}.

2015-10-22T15:38:24.466Z INFO vcdb Configuring log folder paths in /var/log/vmware/upgrade

2015-10-22T15:38:24.467Z INFO vcdb Retrieving DB type...

2015-10-22T15:38:24.467Z INFO vcdb DB type retrieved: PostgreSQL

2015-10-22T15:38:24.485Z INFO vcdb Retrieving DB user...

2015-10-22T15:38:24.523Z INFO vcdb DB user retrieved: vc

2015-10-22T15:38:24.540Z INFO vcdb Retrieving DB password...

2015-10-22T15:38:24.590Z INFO vcdb DB password retrieved: ****

2015-10-22T15:38:24.611Z INFO vcdb Validating source embedded schema...

2015-10-22T15:38:45.571Z INFO vcdb Souce embedded schema validation completed.

2015-10-22T15:38:45.583Z ERROR vcdb Error while reading data from the vCenter Server database: psql.bin: FATAL:  Ident authentication failed for user "postgres"

2015-10-22T15:38:45.584Z ERROR __main__ Upgrade Phase 'vcdb:CollectRequirements' failed. Exception: Error while reading data from the vCenter Server database: psql.bin: FATAL:  Ident authentication failed for user "postgres"Traceback (most recent call last):

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/componentPhaseLauncher.py", line 379, in main

    executionResult = systemExtension(exeContext)

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/libs/sdk/extensions.py", line 94, in __call__

    result = self.extension(*args)

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/libs/sdk/extensions.py", line 110, in _func

    return func(*args)

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts/vcdb/__init__.py", line 1667, in doCollectUpgradeRequirements

    req = doLinuxCollectReq(context)

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts/vcdb/__init__.py", line 1026, in doLinuxCollectReq

    sizeCore, sizeSet = CoreSetSizeLinux()

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts/vcdb/__init__.py", line 503, in CoreSetSizeLinux

    sizeCore = num(getPsqlQueryResult(sqlCore))

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts/vcdb/__init__.py", line 471, in getPsqlQueryResult

    return read_db_value(cmd)

  File "/var/tmp/vmware-upgrade-requirements/cis-upgrade-runner/payload/component-scripts/vcdb/__init__.py", line 211, in read_db_value

    raise PermanentError(cause=error, resolution=suggAction)

PermanentError: Error while reading data from the vCenter Server database: psql.bin: FATAL:  Ident authentication failed for user "postgres" 

vcdb_req.err file 

WARNING: Cannot execute statement(rc=100).

DELETE FROM VPX_TABLE

^^^^^^^^^^

WARNING: Cannot execute statement(rc=100).

DELETE FROM VPX_INDEX_COLUMN

^^^^^^^^^^

WARNING: Cannot execute statement(rc=100).

DELETE FROM VPX_SCHEMA_HASH

^^^^^^^^^^

WARNING: Cannot execute statement(rc=100).

DELETE FROM VPX_TABLE

^^^^^^^^^^

WARNING: Cannot execute statement(rc=100).

DELETE FROM VPX_INDEX_COLUMN

^^^^^^^^^^

WARNING: Cannot execute statement(rc=100).

DELETE FROM VPX_SCHEMA_HASH

^^^^^^^^^^

psql.bin: FATAL:  Ident authentication failed for user "postgres"

Solution Sugguested:

The error is coming from Postgres, please check if the pg_hba.cfg file has the correct authentication method selected as documented in the text below

Edit the file /etc/postgresql/8.4/main/pg_hba.conf and replace ident or peer by either md5 or trust, depending on whether you want it to ask for a password on your own computer or not. (for VMware vpostgres, it should be md5)

To reload the configuration if it needs to be modified, please restart the appliance preferably.