WeFixIT

oVirt: DataAccessResourceFailureException

From one day to another the oVirt Management Webinterface broke with the Exception:

org.springframework.dao.DataAccessResourceFailureException:Error retrieving database metadata; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.postgresql.util.PSQLException: This connection has been closed.

After investigating the log file I found in “/var/log/ovirt-engine-dwh/ovirt-engine-dwhd.log” the following error:

org.postgresql.util.PSQLException: ERROR: right sibling's left-link
doesn't match: block 2 links to 1 instead of expected 4 in index
"idx_vm_device_history_vm_id_type"

Solution

Thanks to Strahil N., who gave me a hint in the ovirt maillinglist this points to a broken “history” table.

This are the steps to fix the database without data losing

  • SSH to the engine
  • run

engine-setup –offline

  • Don’t perform vaccum on the database because it’s broken and so the setup will stop
  • After the setup completed your system should be up and running

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top