Failed to start 'hms-vpostgres' service.
Unable to reconfigure the appliance fails with error message as ' Failed to register VRMS' simultaneously we see that hms-vpostgres service is crashing.
/var/log/vmware/dr/drconfig.log
drconfig.log
2025-05-28T12:25:37.499+02:00 error drconfig[02535] [SRM@6876 sub=ConfigureVrmsOp opID=774fc3e9-7cdc-47e5-b89b-d8639e819412-configure:9fb7] command:
--> /usr/bin/python /opt/vmware/share/htdocs/service/hms/cgi/hms-dr.py --cmd saveembeddedconf --ls=https://VCSA.:443/lookupservice/sdk --lspemfile=/opt/vmware/hms/conf/lsCert [email protected] --vcip=. --vcport=80 --vcthumbprint= --servername=VCSA. --hmshost=. --hmsport=8043 --self-moid=unused --adminmail=admin@VCSA. --secmail=admin@VCSA. --strict-certs 1
--> stdout:
--> {"error": "Bad exit code: 1"}
-->
--> stderr:
--> psql.bin: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
--> Is the server running locally and accepting connections on that socket?
--> psql.bin: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
--> Is the server running locally and accepting connections on that socket?
--> psql.bin: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
--> Is the server running locally and accepting connections on that socket?
--> psql.bin: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
--> Is the server running locally and accepting connections on that socket?
--> psql.bin: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
--> Is the server running locally and accepting connections on that socket?
--> psql.bin: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
--> Is the server running locally and accepting connections on that socket?
--> psql.bin: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
--> Is the server running locally and accepting connections on that socket?
--> Failed to start 'hms-vpostgres' service after 60 attempts! Aborting...
-->
--> Traceback (most recent call last):
--> File "/opt/vmware/share/htdocs/service/hms/cgi/hms-dr.py", line 55, in main
--> cmd.validate()
--> File "/opt/vmware/share/htdocs/service/hms-dr/cgi/commands.py", line 627, in validate
--> embdb.check_schema()
--> File "/opt/vmware/share/htdocs/service/hms-dr/cgi/embdb.py", line 72, in check_schema
--> commands.execute([__TOOL__, '--check', '-y'])
--> File "/opt/vmware/share/htdocs/service/hms-dr/cgi/commands.py", line 328, in execute
--> raise Exception('Bad exit code: %d' % proc.returncode)
--> Exception: Bad exit code: 1
-->
-->
2025-05-28T12:25:37.499+02:00 info drconfig[02535] [SRM@6876 sub=ConfigureVrmsOp opID=774fc3e9-7cdc-47e5-b89b-d8639e819412-configure:9fb7] Exiting ConfigureVrms
2025-05-28T12:25:37.500+02:00 verbose drconfig[02535] [SRM@6876 sub=vmomi.soapStub[59] opID=774fc3e9-7cdc-47e5-b89b-d8639e819412-configure:9fb7] Resetting stub adapter; <[N7Vmacore4Http3Ext15DrUserAgentImplE:0x00007fd9f409c0f8], /lookupservice/sdk>, (null)
2025-05-28T12:25:37.500+02:00 error drconfig[02535] [SRM@6876 sub=ConfigureVrmsOp opID=774fc3e9-7cdc-47e5-b89b-d8639e819412-configure:9fb7] Operation failed
--> (vmodl.fault.SystemError) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> reason = "Failed to register VRMS."
--> msg = ""
--> }
System Logs show below error messages-
Generate the system logs journalctl -xe > /tmp/jour.txt
less /tmp/jour.txt
Jun 06 10:11:20 systemd[1]: hms-vpostgres.service: Scheduled restart job, restart counter is at 9.
Jun 06 10:11:20 systemd[1]: Stopped VMware Postgres database server.
Jun 06 10:11:20 systemd[1]: Starting VMware Postgres database server...
Jun 06 10:11:20 pg_ctl[873267]: pg_ctl: invalid data in PID file "/var/lib/vrmsdb/postmaster.pid"
Jun 06 10:11:20 systemd[1]: hms-vpostgres.service: Control process exited, code=exited, status=1/FAILURE
Jun 06 10:11:20 systemd[1]: hms-vpostgres.service: Failed with result 'exit-code'.
Jun 06 10:11:20 systemd[1]: Failed to start VMware Postgres database server.
Jun 06 10:11:30 systemd[1]: hms-vpostgres.service: Scheduled restart job, restart counter is at 10.
Jun 06 10:11:30 systemd[1]: Stopped VMware Postgres database server.
Jun 06 10:11:30 systemd[1]: hms-vpostgres.service: Start request repeated too quickly.
Jun 06 10:11:30 systemd[1]: hms-vpostgres.service: Failed with result 'exit-code'.
Jun 06 10:11:30 systemd[1]: Failed to start VMware Postgres database server.
VMware vSphere Replication 8.x
VMware vSphere Replication 9.x
This issue usually occurs because of the invalid data in PID file "/var/lib/vrmsdb/postmaster.pid"
A valid postmaster.pid file will have contents similar to below -
root [ /var/lib/vrmsdb ]# cat postmaster.pid
801
/var/lib/vrmsdb
1748522864
5432
/tmp
127.0.0.1
2 0
ready
cp postmaster.pid postmaster.pid.bak
rm -rf /var/lib/vrmsdb/postmaster.pid
systemctl stop hms-vpostgres
systemctl start hms-vpostgres
Once the hms-vpostgres service has been started. Kindly reconfigure the appliance using VAMI Page.
This time the reconfigure should complete without any issues.