VMware Cloud Community
robertkarlBNC
Contributor
Contributor

SRM 8.3 Appliance Connect-SrmServer : Unable to connect to the remote server

Hi,

we recently migrate from Windows SRM to appliance and since then we were not able to connect via powercli.

I know that the default port is now 443 and you have to specified that in the connection string but still no luck.

Here is my connection string :

Connect-SrmServer -SrmServerAddress 10.60.10.10 -port 443 -Credential $credential

Connect-SrmServer : Unable to connect to the remote server

At line:1 char:1

+ Connect-SrmServer -SrmServerAddress 10.60.10.10 -port 443 -Credentia ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-SrmServer], VimException

    + FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.VimException,VMware.VimAutomation.Srm.Commands.Commands.ConnectSr

   mServer

if i do a netstat right after the command i have this

C:\Users\Administrator>netstat -an | findstr "10.60.10.10"

  TCP    10.60.192.205:50191    10.60.10.10:443       ESTABLISHED

  TCP    10.60.192.205:50192    10.60.10.10:443       ESTABLISHED

Which tell that the communication is ok.

I also try this but no luck to find any solutions

PS C:\Users\Administrator> $exception = $error[0].Exception

$exception | select *

ErrorId           : ConnectServer_UnhandledException

ErrorCategory     : NotSpecified

TargetObject      :

RecommendedAction :

SessionId         :

ConnectionId      :

Severity          : Error

Message           : Unable to connect to the remote server

Data              : {}

InnerException    : System.NullReferenceException: Object reference not set to an instance of an object.

                       at VMware.VimAutomation.Srm.Impl.V1.SrmServerImpl.ConstructSrmServer(String srmServerId, SrmClient srmClient, String loggedInUser)

                       at VMware.VimAutomation.Srm.Impl.V1.SrmServiceImpl.ConnectSrm(SrmClientConnectAction connectAction, String hostName, Nullable`1

                    portOverride, String protocol, String username, CookieContainer cookieContainer, IServerCertificateValidationHandler

                    certificateValidationHandler)

                       at VMware.VimAutomation.Srm.Commands.Commands.ConnectSrmServer.<>c__DisplayClass57_0.<ProcessManualParamset>b__1(IServerCertificateVal

                    idationHandler certificateValidationHandler)

                       at VMware.VimAutomation.Srm.Commands.Commands.ConnectSrmServer.<>c__DisplayClass64_0.<ConnectCertificateValidationHandled>b__0()

TargetSite        : Void ConnectCertificateValidationHandled(System.Func`2[VMware.VimAutomation.Common.Interop.V1.Certificate.IServerCertificateValidationHan

                    dler,VMware.VimAutomation.Srm.Interop.V1.SrmServerInterop[]])

StackTrace        :    at VMware.VimAutomation.Srm.Commands.Commands.ConnectSrmServer.ConnectCertificateValidationHandled(Func`2 connectAction)

                       at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.ErrorCallbackCmdletBase.ProcessRecord()

                       at System.Management.Automation.CommandProcessor.ProcessRecord()

HelpLink          :

Source            : VMware.VimAutomation.Srm.Commands

HResult           : -2146232832

Also if i specified wrong credential i have the expected error message

Connect-SrmServer : Cannot complete login due to an incorrect user name or password.

anyone can help ?

Thanks

Reply
0 Kudos
9 Replies
ashilkrishnan
VMware Employee
VMware Employee

Hi Robert,

What version of PowerCLI are we using?

Please try -Port 443( with 'P' in CAPS)

Reply
0 Kudos
robertkarlBNC
Contributor
Contributor

Hi,

thank for taking time to reply.

Here is the version of powercli

PS C:\Users\Administrator> Get-Module VMware* -ListAvailable | ft -AutoSize

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version         Name                                    ExportedCommands                                                                         

---------- -------         ----                                    ----------------                                                                         

Script     12.0.0.15947289 VMware.CloudServices                    {Connect-Vcs, Get-VcsOrganizationRole, Get-VcsService, Get-VcsServiceRole...}            

Script     7.0.0.15902843  VMware.DeployAutomation                 {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}                  

Script     7.0.0.15902843  VMware.ImageBuilder                     {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImage...

Manifest   12.0.0.15947286 VMware.PowerCLI                                                                                                                  

Script     7.0.0.15939650  VMware.Vim                                                                                                                       

Script     12.0.0.15939657 VMware.VimAutomation.Cis.Core           {Connect-CisServer, Disconnect-CisServer, Get-CisService}                                

Script     12.0.0.15940183 VMware.VimAutomation.Cloud              {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}                 

Script     12.0.0.15939652 VMware.VimAutomation.Common             {Get-Task, New-OAuthSecurityContext, Stop-Task, Wait-Task}                               

Script     12.0.0.15939655 VMware.VimAutomation.Core               {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHost...

Script     12.0.0.15939647 VMware.VimAutomation.Hcx                {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXComputeProfile...}    

Script     7.12.0.15718406 VMware.VimAutomation.HorizonView        {Connect-HVServer, Disconnect-HVServer}                                                  

Script     12.0.0.15939670 VMware.VimAutomation.License            Get-LicenseDataManager                                                                   

Script     12.0.0.15939671 VMware.VimAutomation.Nsxt               {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtPolicyService, Get-NsxtService}      

Script     12.0.0.15939651 VMware.VimAutomation.Sdk                {Get-ErrorReport, Get-PSVersion, Get-InstallPath}                                        

Script     12.0.0.15939672 VMware.VimAutomation.Security           {Add-AttestationServiceInfo, Add-KeyProviderServiceInfo, Add-TrustAuthorityKeyProviderS...

Script     11.5.0.14899557 VMware.VimAutomation.Srm                {Connect-SrmServer, Disconnect-SrmServer}                                                

Script     12.0.0.15939648 VMware.VimAutomation.Storage            {Add-EntityDefaultKeyProvider, Add-KeyManagementServer, Add-VsanFileServiceOvf, Add-Vsa...

Script     1.3.0.0         VMware.VimAutomation.StorageUtility     Update-VmfsDatastore                                                                     

Script     12.0.0.15940185 VMware.VimAutomation.Vds                {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDS...

Script     12.0.0.15947287 VMware.VimAutomation.Vmc                {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccount...}                        

Script     12.0.0.15940184 VMware.VimAutomation.vROps              {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}           

Script     12.0.0.15947288 VMware.VimAutomation.WorkloadManagement {Get-WMNamespace, Get-WMNamespacePermission, Get-WMNamespaceStoragePolicy, New-WMNamesp...

Script     6.5.1.7862888   VMware.VumAutomation                    {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Compliance...}

I have also try your suggestion with same result :

PS C:\Users\Administrator> Connect-SrmServer -SrmServerAddress 10.60.194.44 -Port 443 -Credential $credential

Connect-SrmServer : Unable to connect to the remote server

At line:1 char:1

+ Connect-SrmServer -SrmServerAddress 10.60.194.44 -Port 443 -Credentia ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-SrmServer], VimException

    + FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.VimException,VMware.VimAutomation.Srm.Commands.Commands.ConnectSr

   mServer

PS C:\Users\Administrator>

Reply
0 Kudos
ashilkrishnan
VMware Employee
VMware Employee

Robert,

Thank you for sharing this information

I was going through interoperability matrices between SRM and PowerCLI. It doesn't provide clear information about newer PowerCLI versions.

VMware Product Interoperability Matrices

Can you try with PowerCLI version 11.1.0 ?

Reply
0 Kudos
robertkarlBNC
Contributor
Contributor

Hi,

again thank for taking the time to help me !

I have reinstall powercli with the following command : Install-Module -Name VMware.PowerCLI -RequiredVersion 11.1.0.11289667

with result :

ModuleType Version         Name                                ExportedCommands                                                                             

---------- -------         ----                                ----------------                                                                             

Script     12.0.0.15947289 VMware.CloudServices                {Connect-Vcs, Get-VcsOrganizationRole, Get-VcsService, Get-VcsServiceRole...}                

Script     7.0.0.15902843  VMware.DeployAutomation             {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}                      

Script     7.0.0.15902843  VMware.ImageBuilder                 {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProf...

Manifest   11.1.0.11289667 VMware.PowerCLI                                                                                                                  

Script     7.0.0.15939650  VMware.Vim                                                                                                                       

Script     12.0.0.15939657 VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}                                    

Script     12.0.0.15940183 VMware.VimAutomation.Cloud          {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}                     

Script     12.0.0.15939652 VMware.VimAutomation.Common         {Get-Task, New-OAuthSecurityContext, Stop-Task, Wait-Task}                                   

Script     12.0.0.15939655 VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpS...

Script     7.9.0.14170454  VMware.VimAutomation.HorizonView    {Connect-HVServer, Disconnect-HVServer}                                                      

Script     12.0.0.15939670 VMware.VimAutomation.License        Get-LicenseDataManager                                                                       

Script     12.0.0.15939671 VMware.VimAutomation.Nsxt           {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtPolicyService, Get-NsxtService}          

Script     12.0.0.15939651 VMware.VimAutomation.Sdk            Get-ErrorReport                                                                              

Script     12.0.0.15939672 VMware.VimAutomation.Security       {Add-AttestationServiceInfo, Add-KeyProviderServiceInfo, Add-TrustAuthorityKeyProviderServe...

Script     11.5.0.14899557 VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}                                                    

Script     12.0.0.15939648 VMware.VimAutomation.Storage        {Add-EntityDefaultKeyProvider, Add-KeyManagementServer, Add-VsanFileServiceOvf, Add-VsanObj...

Script     1.3.0.0         VMware.VimAutomation.StorageUtility Update-VmfsDatastore                                                                         

Script     12.0.0.15940185 VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitc...

Script     12.0.0.15947287 VMware.VimAutomation.Vmc            {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccount...}                            

Script     12.0.0.15940184 VMware.VimAutomation.vROps          {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}               

Script     6.5.1.7862888   VMware.VumAutomation                {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Compliance...}                            

Unfortunately i have the same error : Connect-SrmServer : Unable to connect to the remote server

Reply
0 Kudos
robertkarlBNC
Contributor
Contributor

Anybody have the same problem ?

Any suggestion ?

Thanks

Reply
0 Kudos
ashilkrishnan
VMware Employee
VMware Employee

Hi Robert,

I noticed similar issue in 8.2 and got connected with following options:

1. Connect to vCenter using connect-Viserver cmdlet

2. Connect to SRM using following command syntax:

Connect-SrmServer -Port 443 -User administrator@vsphere.local -Password xxxxxx -RemoteUser administrator@vsphere.local -RemotePassword xxxxxx

Let me know if that helps

Reply
0 Kudos
BGATOS
Contributor
Contributor

I am having the exact issue, did you get a fix from VMware?

The release notes only tell you to use the -Port option but this makes no difference. As mentioned above, 8.2 seems fine but not 8.3

Reply
0 Kudos
BGATOS
Contributor
Contributor

@    FYI - issue is that powerCLI above 11.1 is not supported on SRM 8.3. Need to import a lower version module to execute connect-srmServer

Reply
0 Kudos
robertkarlBNC
Contributor
Contributor

Hi,

I was able to get it working by using the following module

ModuleType Version       Name                             ExportedCommands       

---------- -------       ----                             ----------------       

Binary     6.0.0.0       VMware.DeployAutomation                                 

Binary     6.0.0.0       VMware.ImageBuilder                                     

Binary     6.5.0.4624453 VMware.VimAutomation.Cis.Core                           

Binary     6.5.0.4624821 VMware.VimAutomation.Cloud                              

Manifest   6.5.0.4624451 VMware.VimAutomation.Common                             

Binary     6.5.0.2604913 VMware.VimAutomation.Core        HookGetViewAutoCompleter

Binary     6.0.0.0       VMware.VimAutomation.HA                                 

Binary     7.0.2.4596620 VMware.VimAutomation.HorizonView                        

Binary     6.5.0.4624822 VMware.VimAutomation.License                            

Binary     6.5.0.4624825 VMware.VimAutomation.PCloud                             

Manifest   6.5.0.4624452 VMware.VimAutomation.Sdk         Get-PSVersion          

Binary     6.5.0.4624820 VMware.VimAutomation.Storage                            

Binary     6.5.0.4624695 VMware.VimAutomation.Vds                                

Binary     6.5.0.4624824 VMware.VimAutomation.vROps                              

Binary     6.0.0.0       VMware.VumAutomation                                    

thanks

Reply
0 Kudos