VMware Cloud Community
lexit
Contributor
Contributor
Jump to solution

Upgrade from vcenter appliance 5.5.0 to vcenter 6 appliance database error

Hello All,

I am trying to do an inhouse lab upgrade to vcenter appliance 6. I first upgraded from vcenter 5.5 windows to Vcenter 5.5 appliance using the upgrade fling.

Next i want to do the upgrade to vcenter 6 but this fails with an database schema error message at stage 4 during it's validation.

The exact error message is:

Source vCenter Server schema validation found an issue.

Read the vcdb_req.err log file and address the issues found.

This file i found on the appliance itself and i opened it with command:

more /var/log/vmware/upgrade/vcdb_req.err

At the top of the file i see the following messages:

------------------------------------------------------------------------------------------------------------

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

^^^^^^^^^^

Error while executing ./Upgrade-v2013-to-v2015/postgresql/validate_PostgreSQL.sql:310, reason: Cannot execute statement(rc=-1).

And at the bottom:

1 [P0001](7) ERROR: ERROR ! Extra sequences: vpx_host_cnx_seq;;

Error while executing the query

------------------------------------------------------------------------------------------------------------

How can i pass or solve these error messages to do the upgrade ?

1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Log with the root user.

Then execute:

/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -c "drop sequence if exists vpx_host_cnx_seq cascade"

View solution in original post

8 Replies
admin
Immortal
Immortal
Jump to solution

Can you attach the vcdb_req.err and vcdb_req.out?

Thanks,

- Ivo

0 Kudos
lexit
Contributor
Contributor
Jump to solution

Attached the 2 files, hope you can help me with this.... It is driving me nuts 🙂

0 Kudos
admin
Immortal
Immortal
Jump to solution

Not sure how but your schema has an extra sequence which is not supposed to be there.

drop sequence if exists vpx_host_cnx_seq cascade;

This should resolve your issue.

0 Kudos
lexit
Contributor
Contributor
Jump to solution

I am not familiair with postgress databases, how can i enter the drop command in the database ?

0 Kudos
admin
Immortal
Immortal
Jump to solution

Log with the root user.

Then execute:

/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -c "drop sequence if exists vpx_host_cnx_seq cascade"

lexit
Contributor
Contributor
Jump to solution

Wow, that did the trick..... Thanks for the answer, i am now upgrading 🙂

0 Kudos
dsohayda
Enthusiast
Enthusiast
Jump to solution

Thanks for this. I ran into this issue when doing the same scenario in my lab.

0 Kudos
vHaridas
Expert
Expert
Jump to solution

Thanks for This, I face same issue with my LAB and Prod vCenter upgrade.

First I had converted Windows vCenter 5.5 u2e to vCenter Appliance 5.5 u2e then while upgrading Appliance to 6 u2 I got this same error. 

Thanks once again.

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/
0 Kudos