HMS re-configuration fails post upgrading from 8.5 to 8.6
search cancel

HMS re-configuration fails post upgrading from 8.5 to 8.6

book

Article ID: 313971

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

Symptoms:
  • HMS re-configuration fails post upgrading from 8.5 to 8.6
  • /opt/vmware/hms/logs/hms-configtool.log will contain the below entries during HMS re-configuration post upgrade:
2023-03-18 11:47:33.899 INFO  com.vmware.hms.configtool.App [main] (..hms.configtool.App) [] | HMS Configuration Tool 8.6
2023-03-18 11:47:33.929 INFO  com.vmware.hms.configtool.App [main] (..hms.configtool.App) [] | FIPS mode: false
2023-03-18 11:47:33.933 INFO  com.vmware.hms.configtool.App [main] (..hms.configtool.App) [] | COMMAND: upgrade, CONFIG FILE: /opt/vmware/hms/conf/hms-configuration.xml
2023-03-18 11:47:33.944 DEBUG com.vmware.hms.configtool.App [main] (..hms.configtool.UpgradeProcessor) [] | Previous HMS version: 8.5.0.11694
2023-03-18 11:47:33.944 DEBUG com.vmware.hms.configtool.App [main] (..hms.configtool.UpgradeProcessor) [] | New HMS version: 8.6.0.15264 build number: 21134460
2023-03-18 11:47:33.945 DEBUG com.vmware.hms.configtool.App [main] (..hms.configtool.UpgradeProcessor) [] | Upgrading from 8.5.0.11694 to 8.6.0.15264.
2023-03-18 11:47:34.114 WARN  com.vmware.hms.configtool.App [main] (..hms.configtool.DatabaseProcessor) [] | Error while executing SQL statement: Connection to localhost:5432 refused. Check
that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
2023-03-18 11:47:34.116 ERROR com.vmware.hms.configtool.App [main] (..hms.configtool.DatabaseProcessor$JdbcRunnable) [] | Cannot execute sql statement.
org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
 
  • /opt/vmware/var/log/postupdate.log will contain entries similar to:
Reinitialize the embedded db ...
psql.bin: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Query failed! Is the database daemon running?
/bin/rm: cannot remove '/var/lib/vrmsdb': Device or resource busy
The files belonging to this database system will be owned by user "vrmsdb".
This user must also own the server process.


Job for hms-vpostgres.service failed because the control process exited with error code.
See "systemctl status hms-vpostgres.service" and "journalctl -xe" for details.
psql.bin: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Query failed! Is the database daemon running?
psql.bin: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Query failed! Is the database daemon running?
psql.bin: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Query failed! Is the database daemon running?


Failed to start 'hms-vpostgres' service after 60 attempts! Aborting...
Restoring instance vrmsdb ...
pg_restore: [archiver (db)] connection to database "vrmsdb" failed: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Re-running VR db schema upgrade ...


Environment

VMware vSphere Replication 8.x

Cause

The cause of the issue is wrong ownership and group for  file /var/log/vmware/vrmsdb/postgresql.log

Resolution

VMware is aware of the issue and is working on the fix.


Workaround:
  1. Log in to the vSphere Replication Management Server
  2. Change user to "root"
  3. Run the below command to change the ownership and group of the "postgresql.log" file:
    • chown vrmsdb:vrmsdb /var/log/vmware/vrmsdb/postgresql.log
  4. This is how it should appear upon ownership change ​​​​​​
root@s3-srm3-237-60 [ /home/admin ]# ls -l /var/log/vmware/vrmsdb/postgresql.log
-rw-rw---- 1 vrmsdb vrmsdb 933 Mar 16 09:44 /var/log/vmware/vrmsdb/postgresql.log