Error "Unable to perform upgrade: org.postgresql.util. PSQLException: The hostname ###.##.#.### could not be verified by hostnameverifier PgjdbcHostnameVerifier." occurs during upgrade to VMware Cloud Director
search cancel

Error "Unable to perform upgrade: org.postgresql.util. PSQLException: The hostname ###.##.#.### could not be verified by hostnameverifier PgjdbcHostnameVerifier." occurs during upgrade to VMware Cloud Director

book

Article ID: 427815

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

VMware Cloud Director upgrade failed

During an upgrade via /opt/vmware/vcloud-director/bin/upgrade the following error is seen in the console.

The same error is seen in the upgrade log located at /opt/vmware/vcloud-director/logs/upgrade-<date>.log

Unable to perform upgrade: org.postgresql.util.PSQLException: The hostname XXX.XX.X.XXX could not be verified by hostnameverifier PgjdbcHostnameVerifier.

Environment

VMware Cloud Director 10.6.x

Cause

The database.jdbcUrl line in the /opt/vmware/vcloud-director/etc/global.properties file contains an incorrect database IP address.

Resolution

Important: If you encounter this error, roll back to the snapshot taken before the upgrade, before making any of these changes.
See Roll Back Your VMware Cloud Director Appliance When an Upgrade Fails for more information.

 

To resolve this issue, perform the following steps.

  1. Back up the global.properties file
    cp /opt/vmware/vcloud-director/etc/global.properties /opt/vmware/vcloud-director/etc/global.properties.backup
  2. Open the file with vi editor
    vi /opt/vmware/vcloud-director/etc/global.properties
  3. Look for the line beginning with database.jdbcUrl=jdbc:postgresql://##.##.##.##:5432/vcloud
  4. Change the IP value ##.##.##.## to the correct IP address. Example format:
    database.jdbcUrl=jdbc:postgresql://###.###.##.##:5432/vcloud?socketTimeout=90&ssl=true

    Note: This IP value should match the eth1 IP address of the current primary database node. This can be confirmed using the following command
    repmgr cluster show | grep primary
     
  5. Save the file
  6. Retry the upgrade.