Unable to connect to the remote server: dr.fault.SessionLimitExceeded
search cancel

Unable to connect to the remote server: dr.fault.SessionLimitExceeded

book

Article ID: 384823

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction


You are unable to connect to SRM server using Power CLI API. 

Connect-SrmServer : Unable to connect to the remote server: dr.fault.SessionLimitExceeded
At line:1 char:1
+ Connect-SrmServer -SrmServerAddress 'srmserver.broadcom.corp' -Crede ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo         : NotSpecified: (:) [Connect-SrmServer], VimException
   + FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.VimException,VMware.VimAutomation.Srm.Commands.Commands.ConnectSrmServer

 

Connect-SrmSdkServer : {"error_code":"4.1","message":"Rate limit exceeded. Requests have been temporarily blocked."}
At C:\SCRIPTS\SRMIPCustomization.ps1:52 char:14
+ ...    $srmsdk= Connect-SrmSdkServer $srm.Name -Credential $bgc -RemoteCr ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-SrmSdkServer], ApiException
    + FullyQualifiedErrorId : VMware.Binding.OpenApi.Client.ApiException,VMware.Sdk.Srm.ConnectSrmSdkServer

Environment

VMware Site Recovery Manager 9.x

VMware.PowerCLI 13.2.1 build 22851661

VMware vCenter Server 8.x

Cause


You can hit this error by opening multiple API sessions (look at the information below) and not closing them, thereby exceeding limits. It's necessary to close an API session or reuse the same session.

SessionLimitExceeded fault is thrown when the total number of connections to the SRM is more then 45 (this is the default value). This limit can be changed by modifying the vmware-dr.xml file with:
<connections>
    <sessionLimit>90</sessionLimit>
</connections>

 

ConnectionLimitReached fault is thrown when the active connections to the External API is more then 10 (this is the default value). The limit can be changed by modifying the vmware-dr.xml file with:
<plugins>
   <ExternalApi>
      <connectionLimit>50</connectionLimit>
   </ExternalApi>
</plugins>


NOTE: These settings are not found in the Advanced Settings of SRM UI.

Resolution


Use the Connect-SrmSdkServer cmdlet to connect to Site Recover Manager server. Do not use the old Connect-SrmServer cmdlet, already available in the VMware.VimAutomation.Srm module, as it’s not compatible with the VMware.Sdk.Srm module cmdlets.


NOTE: External SRM API is no longer supported, please use Site Recovery Manager REST API

Additional Information