Error: "Unable to connect to vCenter..." when configuring replications when the Replicator certificate has expired
search cancel

Error: "Unable to connect to vCenter..." when configuring replications when the Replicator certificate has expired

book

Article ID: 373388

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Configuring a new replication fails in Cloud Director Availability, and you see the error:

    Unable to connect to vCenter '####-####-####-####'

  • In the /opt/vmware/h4/cloud/log/cloud.log file on the Cloud Replication Management Appliance, you see a similar entry:

    2024-07-23 09:42:46.793 ERROR - [UI-####-####-####-####-DU-Dc-Qu] [job-28] com.vmware.h4.jobengine.JobExecution     : Task 4####-####-####-#### (WorkflowInfo{type='__pr
    ivate_sourceVmDetails', resourceType='VcdVm', resourceId='a41d0595-ea3f-4001-825c-bddd0d1ad8ab', isPrivate=true, resourceName='null'}) has failed com.vmware.h4.replicator.api.exceptions.FailedToAcquireVcConnection: Unable to connect to vCenter '####-####-####-####'.
            at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
            at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
            at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
            at com.vmware.h4.api.error.GenericServerExceptionProvider.get(GenericServerExceptionProvider.java:123)
            at com.vmware.h4.api.error.GenericServerExceptionProvider.get(GenericServerExceptionProvider.java:95)
            at com.vmware.h4.common.H4ClientFactory.lambda$errorDeserializer$1(H4ClientFactory.java:57)
            at com.vmware.rest.client.AbstractRestClient.convert(AbstractRestClient.java:225)
            at com.vmware.rest.client.json.RestClient.exchange(RestClient.java:104)
            at com.vmware.rest.client.json.RestClient.exchange(RestClient.java:128)
            at com.vmware.rest.client.json.RestClient.exchange(RestClient.java:150)
            at com.vmware.h4.manager.client.ManagerClient.getVm(ManagerClient.java:2141)
            at com.vmware.h4.cloud.peer.job.SourceVmDetailsJob.getSourceVmDetails(SourceVmDetailsJob.java:191)
            at com.vmware.h4.cloud.peer.job.SourceVmDetailsJob.execute(SourceVmDetailsJob.java:123)
            at com.vmware.h4.cloud.peer.job.SourceVmDetailsJob.execute(SourceVmDetailsJob.java:79)
            at com.vmware.h4.jobengine.JobEngine.execute(JobEngine.java:226)
            at com.vmware.h4.jobengine.JobEngine.lambda$resumeQueuedJob$1(JobEngine.java:166)
            at com.vmware.h4.jobengine.ThrottledExecutorService$1.run(ThrottledExecutorService.java:132)
            at com.vmware.h4.common.mdc.MDCRunnableWrapper.run(MDCRunnableWrapper.java:30)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
            at java.base/java.lang.Thread.run(Thread.java:833)

  • In the /opt/vmware/h4/manager/log/manager.log file on the Cloud Replication Management Appliance, you see a similar entry:

    2024-07-23 09:42:46.791 ERROR - [UI-####-####-####-####-DU-Dc-Qu-bn] [https-jsse-nio-8044-exec-12] c.v.h.c.c.error.ExceptionAdvisorBase     : A GET request from ESE@AZ1[127.0.0.1] to /inventory/AZ1/####-####-####-####/vm-##### failed.com.vmware.h4.replicator.api.exceptions.FailedToAcquireVcConnection: Unable to connect to vCenter '####-####-####-####'.
            at jdk.internal.reflect.GeneratedConstructorAccessor255.newInstance(Unknown Source)
            at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
            at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
            at com.vmware.h4.api.error.GenericServerExceptionProvider.get(GenericServerExceptionProvider.java:123)
            at com.vmware.h4.api.error.GenericServerExceptionProvider.get(GenericServerExceptionProvider.java:95)
            at com.vmware.h4.common.H4ClientFactory.lambda$errorDeserializer$1(H4ClientFactory.java:57)
            at com.vmware.rest.client.AbstractRestClient.convert(AbstractRestClient.java:225)
            at com.vmware.rest.client.json.RestClient.exchange(RestClient.java:104)
            at com.vmware.rest.client.json.RestClient.exchange(RestClient.java:128)
            at com.vmware.rest.client.json.RestClient.exchange(RestClient.java:150)
            at com.vmware.h4.replicator.client.ReplicatorClient.getVm(ReplicatorClient.java:962)
            at com.vmware.h4.manager.services.InventoryBrowser.lambda$getVm$5(InventoryBrowser.java:139)
            at com.vmware.h4.manager.services.InventoryBrowser.call(InventoryBrowser.java:225)
            at com.vmware.h4.manager.services.InventoryBrowser.lambda$queryInventory$23(InventoryBrowser.java:218)
            at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
            at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
            at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
            at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
            at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
            at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
            at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
            at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
            at java.base/java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:652)
            at com.vmware.h4.manager.services.InventoryBrowser.queryInventory(InventoryBrowser.java:219)
            at com.vmware.h4.manager.services.InventoryBrowser.getVm(InventoryBrowser.java:139)
            at com.vmware.h4.manager.controller.InventoryController.getVm(InventoryController.java:95)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:568)
            at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
            at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
            at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
            at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    ....

  • In the /opt/vmware/h4/replicator/log/replicator.log file on the Cloud Replication Management Appliance, you see a similar entry:

    2024-07-23 09:42:46.732 DEBUG - [UI-####-####-####-####-DU-Dc-Qu-bn-Br] [https-jsse-nio-8043-exec-4] com.vmware.h4.replicator.vc.VcConnector  : Unable to connect to VC ###-####-####-#### com.vmware.vim.sso.client.exception.InternalError: Failed trying to retrieve token: ns0:RequestFailed: EndTime: Wed Jul 17 13:41:33 GMT 2024 is not after startTime: Tue Jul 23 09:42:46 GMT 2024        at com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl$RequestResponseProcessor.handleFaultCondition(SecurityTokenServiceImpl.java:1161)

            at com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl$RequestResponseProcessor.sendRequest(SecurityTokenServiceImpl.java:988)
            at com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl$RequestResponseProcessor.executeRoundtrip(SecurityTokenServiceImpl.java:902)
            at com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl.acquireToken(SecurityTokenServiceImpl.java:155)
            at com.vmware.vlsi.client.sso.StsService.acquireBearerToken(StsService.java:88)
            at com.vmware.h4.replicator.vc.VcConnector$SimpleTokenRetriever.mkTokenInfo(VcConnector.java:410)
            at com.vmware.h4.replicator.vc.VcConnector$SimpleTokenRetriever.<init>(VcConnector.java:398)
            at com.vmware.h4.replicator.vc.VcConnector.vcAuthSettings(VcConnector.java:375)
            at com.vmware.h4.replicator.vc.VcConnector.acquireVcConnectionLatest(VcConnector.java:122)
            at com.vmware.h4.replicator.vc.VcConnector.acquire(VcConnector.java:328)
            at com.vmware.h4.replicator.vc.VcConnector.acquireLatest(VcConnector.java:313)
            at com.vmware.h4.replicator.vc.inventory.VcInventoryService.getVm(VcInventoryService.java:205)
            at com.vmware.h4.replicator.controller.InventoryController.getVm(InventoryController.java:280)
            at jdk.internal.reflect.GeneratedMethodAccessor1797.invoke(Unknown Source)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    .....

    AND

    2024-07-23 09:42:46.732 ERROR - [UI-####-####-####-####-DU-Dc-Qu-bn-Br] [https-jsse-nio-8043-exec-4] c.v.h.c.c.error.ExceptionAdvisorBase     : A GET request from ESE@AZ1[##.##.##.##]
    to /inventory/####-####-####-####/vms/vm-##### failed.

     

    com.vmware.h4.replicator.api.exceptions.FailedToAcquireVcConnection: Unable to connect to vCenter '####-####-####-####'.
            at com.vmware.h4.replicator.vc.VcConnector.acquire(VcConnector.java:331)
            at com.vmware.h4.replicator.vc.VcConnector.acquireLatest(VcConnector.java:313)
            at com.vmware.h4.replicator.vc.inventory.VcInventoryService.getVm(VcInventoryService.java:205)
            at com.vmware.h4.replicator.controller.InventoryController.getVm(InventoryController.java:280)
            at jdk.internal.reflect.GeneratedMethodAccessor1797.invoke(Unknown Source)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:568)
            at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
            at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
            at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
            at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
            at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)




Environment

VMware Cloud Director Availability 4.x

Cause

The replicator certificate has expired.

To check the certificate on the replicator:

  1. In a browser, navigate to vCloud Availability Replicator FQDN/IP.
  2. Log in to the Replicator Management Portal with root user credentials.
  3. In the left pane under Configuration, click Settings.
  4. Under Appliance settings, next to Certificate you have the information about the certificate expiring date

Resolution

When the certificate of the Replicator Service expires, you must replace it with the new self-signed or CA-signed certificate as per documentation at Replace the SSL certificate of the Replicator Service