An administrator observes this error while trying to add site pair "Unable to retrieve pairs from extension server at https://xxxx:8043. A runtime error occurred in the vSphere Replication Management Server. Exception details: 'EntityManagerFactory is closed'."
Live Site Recovery 9.x
The error “EntityManagerFactory is closed” occurred because the HBR service took over 30 minutes to start listening on port 8123. During this delay, the HMS service could not connect and shut down, which closed the EntityManagerFactory.
hms.log:
2025-09-10 17:20:50.913 ERROR com.vmware.hms.remote.SiteManager [tcweb-13] (..hms.remote.SiteManagerImpl) [operationID=d2705eb9-6e77-4385-9c80-88463a3790a3-HMS-34,sessionID=74C97731] | Exception while executing getHmsInfo
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:467) ~[spring-orm-5.3.36.jar:5.3.36]
at com.vmware.jvsl.persistence.transaction.HmsJpaTransactionManager.doBegin(HmsJpaTransactionManager.java:88) ~[jvsl-persistence-9.0.2.jar:?]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:400) ~
2025-09-10 17:16:15.217 ERROR com.vmware.hms.HmsService [hms-main-thread-10] (..vmware.hms.HmsService) [] | stage 2 starting...FAILED
HMS Server failed to start successfully:
com.vmware.vim.vmomi.client.exception.ConnectionException: https://xxxx:8123/ invocation failed with "org.apache.http.conn.HttpHostConnectException: Connect to xxxx:8123 [xxxx/x.x.x.x] failed: Connection refused"
Once the HBR service successfully started listening on port 8123, HMS was able to connect, and the “EntityManagerFactory is closed” error no longer appeared in the logs.