5 Replies Latest reply on May 28, 2020 4:08 AM by robertkarlBNC

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

    robertkarlBNC Lurker

      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

        • 1. Re: SRM 8.3 Appliance Connect-SrmServer : Unable to connect to the remote server
          ashilkrishnan Novice
          VMware Employees

          Hi Robert,

           

          What version of PowerCLI are we using?

           

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

          • 2. Re: SRM 8.3 Appliance Connect-SrmServer : Unable to connect to the remote server
            robertkarlBNC Lurker

            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>

            • 3. Re: SRM 8.3 Appliance Connect-SrmServer : Unable to connect to the remote server
              ashilkrishnan Novice
              VMware Employees

              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 ?

              • 4. Re: SRM 8.3 Appliance Connect-SrmServer : Unable to connect to the remote server
                robertkarlBNC Lurker

                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

                • 5. Re: SRM 8.3 Appliance Connect-SrmServer : Unable to connect to the remote server
                  robertkarlBNC Lurker

                  Anybody have the same problem ?

                   

                  Any suggestion ?

                   

                  Thanks