Loading

×Sorry to interrupt
This page has an error. You might just need to refresh it.
[NoErrorObjectAvailable] Uncaught ReferenceError: addCTracking is not defined
Failing descriptor: {markup://c:KM_ArticleThemeLayout}

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

"Internal error occurs during VMware vCenter Server Database pre-upgrade checks" upgrading vCenter Server Appliance to 6.x/7.0 (70979)

Last Updated: 11/9/2023Categories: TroubleshootingTotal Views: 7400Language:
English

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Symptoms

vCenter Server Appliance upgrade to 6.x/7.0 fails with the error:

Internal error occurs during VMware vCenter Server Database pre-upgrade checks

Cannot validate target appliance configuration as not enough information from the source %(0)s can be collected

In the /var/log/vmware/upgrade/CollectRequirements_com.vmware.vcdb_YYYY_MM_DD_HH_MM.log file, you see entries similar to:

2019-05-21T14:32:20.357Z INFO vcdb.const read_db_value:
2019-05-21T14:32:20.357Z ERROR __main__ Upgrade Phase 'vcdb:CollectRequirements' failed. Exception: could not convert string to float:
Traceback (most recent call last):
File "/tmp/vmware-upgrade-temp-dirx7dSM8r1MC/tmpSKh6ZXVEIo/payload/componentPhaseLauncher.py", line 461, in main
executionResult = systemExtension(exeContext)
File "/tmp/vmware-upgrade-temp-dirx7dSM8r1MC/tmpSKh6ZXVEIo/libs/sdk/extensions.py", line 94, in __call__
result = self.extension(*args)
File "/tmp/vmware-upgrade-temp-dirx7dSM8r1MC/tmpSKh6ZXVEIo/libs/sdk/extensions.py", line 110, in _func
return func(*args)
File "/tmp/vmware-upgrade-temp-dirx7dSM8r1MC/tmpSKh6ZXVEIo/payload/component-scripts/vcdb/__init__.py", line 22, in do_collect_upgrade_requirements req = do_linux_collect_req(context)
File "/tmp/vmware-upgrade-temp-dirx7dSM8r1MC/tmpSKh6ZXVEIo/payload/component-scripts/vcdb/vcdb_collect_requirements_functions.py", line 374, in do_linux_collect_reqsize_core, size_set, size_core_et = core_set_size_postgres()
File "/tmp/vmware-upgrade-temp-dirx7dSM8r1MC/tmpSKh6ZXVEIo/payload/component-scripts/vcdb/vcdb_db_utils.py", line 279, in core_set_size_postgres
size_core = num(get_psql_query_result(sql_core))
File "/tmp/vmware-upgrade-temp-dirx7dSM8r1MC/tmpSKh6ZXVEIo/payload/component-scripts/vcdb/vcdb_db_utils.py", line 45, in num
return float(str_num)
ValueError: could not convert string to float

In the /var/log/vmware/upgrade/vcdb_req.out file, you see entries similar to:

Password for user postgres:
psql.bin: fe_sendauth: no password supplied

Cause

This issue occurs when .pgpass file is not available on the source vCenter Server Appliance.

Resolution

To resolve this issue:

Check for .pgpass file under /root folder. If not available, proceed with below steps to recreate the file:

Login to Source VCSA using SSH.

Execute the command ls /root/ -larth to verify the file presence.

Note: Take Snapshot of Source vCenter Server Appliance before proceeding with below steps.

Copy PGUSER Password from the /etc/vmware-vpx/embedded_db.cfg file.

For example:

root@testvcenter [ / ]# cat /etc/vmware-vpx/embedded_db.cfg | grep PGUSER_PASSWORD

PGUSER_PASSWORD='5%|=w&L?gWa>p70_'

Create the .pgpass file under /root with the new password:

touch /root/.pgpass

chmod 0600 /root/.pgpass

vi /root/.pgpass

Press Insert Key and Copy below contents to the file, replace PASSWORD with the password copied from above step and press ESC Key and wq! to exit the VI editor:

localhost:5432:postgres:postgres:PASSWORD
127.0.0.1:5432:postgres:postgres:PASSWORD
localhost:5432:VCDB:postgres:PASSWORD
127.0.0.1:5432:VCDB:postgres:PASSWORD
/var/run/vpostgres:5432:*:postgres:PASSWORD

Take a copy of /storage/db/vpostgres/pg_hba.conf file:

cp /storage/db/vpostgres/pg_hba.conf /storage/db/vpostgres/pg_hba.conf_backup

Edit the /storage/db/vpostgres/pg_hba.conf file using VI editor and change md5 to trust for below values:

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

Save and close the pg_hba.conf file.

Stop and Start vPostgres service for the changes to be effective:

service-control --stop vmware-vpostgres
service-control --start vmware-vpostgres

Connect to the database as a postgres user. It does not ask for a password because we have changed the method in pg_hba.conf file to trust:

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

Change the postgres user password with the password copied from the first step (from file /etc/vmware-vpx/embedded_db.cfg):

ALTER USER postgres PASSWORD 'new_password';
\q (to exit from postgres)

Revert the changes made on pg_ha.conf file, edit /storage/db/vpostgres/pg_hba.conf using VI editor and change trust to md5 for below values:

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

Save and close the pg_hba.conf file.

Stop and Start vPostgres service for the changes to be effective:

service-control --stop vmware-vpostgres
service-control --start vmware-vpostgres

Connect to the database as a postgres user to verify the new password. If password is set properly, it will not ask for a password as it will take the password from .pgpass file:

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
\q (to exit from postgres)

Continue with the upgrade process.

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
Workspace ONE UEM の自動検出による加入を有効にする (50100674)

KB
•
如何从 ESXi 主机分离 LUN 设备 (2004605)

KB
•
Download and Install VMware Fusion (2014097)

Results 1-4 of 4

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vCenter Server Appliance

VMware vCenter Server

Related Versions:

VMware vCenter Server Appliance 6.7.x

VMware vCenter Server Appliance 6.5.x

VMware vCenter Server 7.0.x

Take Our Survey

Support Assistant