VMware Cloud Community
skushwa1
Contributor
Contributor

Not able to connect SRM server using powercli

Team,

Can anyone help me to fix below error.

Connect-SrmServer srmservername -Port 9007

Connect-SrmServer: Unable to connect to the remote server: One or more errors occurred. (Srm endpoint is not found on locations: /dr:9007, /vcdr/extapi/sdk:9007 and /drserver/vcdr/

0 Kudos
12 Replies
LucD
Leadership
Leadership

Which PowerCLI version?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
skushwa1
Contributor
Contributor

I am using powercli module version on powershell. 

I am not sure if I am using correct switch while connecting SRM server. 

Please refer screenshot below of of command as well as version details.

 

_______________________________________________________

 

PS C:\Users\> $psversiontable

Name Value
---- -----
PSVersion 7.2.1
PSEdition Core
GitCommitId 7.2.1
OS Microsoft Windows 6.1.7601 Service Pack 1
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0.}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

PS C:\Users\>

 

 

PS C:\Users\> Connect-SrmServer srmserver -Port 443

Connect to SRM server
Enter credentials to connect to SRM server


Connect-SrmServer: Unable to connect to the remote server: One or more errors occurred. (Srm endpoint is not found on locations: /dr:9007, /vcdr/extapi/sdk:9007 and /drserver/vcdr/
extapi/sdk:443. If the port is different from 9007,9007,443, you should specify it)

 

0 Kudos
LucD
Leadership
Leadership

What does the following return?

Get-Module -Name VMware* -ListAvailable


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
skushwa1
Contributor
Contributor

Please refer text file enclosed.

0 Kudos
LucD
Leadership
Leadership

That is the latest version.
I suggest you open an SR


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Tags (1)
0 Kudos
skushwa1
Contributor
Contributor

It is already opened but got the update that SRM using powercli is not under their scope 🙂

0 Kudos
LucD
Leadership
Leadership

That is not what Chapter 13 in the VMware PowerCLI User's Guide says.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
skushwa1
Contributor
Contributor

It is very clear here to file support request.. Thank you. Let me double check with team.

0 Kudos
JoshMancil
Contributor
Contributor

Did you ever get anywhere with Support? I am running into same error. Connecting from Unix server to SRM Appliance.

Name                           Value
----                           -----
PSVersion                      7.2.2
PSEdition                      Core
GitCommitId                    7.2.2
OS                             Linux 4.18.0-348.12.2.el8_5.x86_64 #1 SMP Mon Jan 17 07:06:06 EST 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0â¦}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0



ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     12.4.0.18⦠           VMware.CloudServices                Desk      {Connect-Vcs, Disconnect-Vcs, Get-VcsOrganizationRole, Get-VcsServiceâ¦}
Script     7.0.2.178⦠           VMware.DeployAutomation             Desk      {Add-CustomCertificate, Add-DeployRule, Add-ProxyServer, Add-ScriptBundleâ¦}
Script     7.0.2.178⦠           VMware.ImageBuilder                 Desk      {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfileâ¦}
Manifest   12.4.1.18⦠           VMware.PowerCLI                     Desk
Script     12.4.1.18⦠           VMware.PowerCLI.Sdk                 Core,Desk
Script     12.4.1.18⦠           VMware.PowerCLI.Sdk.Types           Core,Desk
Script     12.4.1.18⦠           VMware.PowerCLI.VCenter             Core,Desk {Get-VIMachineCertificate, Get-VITrustedCertificate, Remove-VITrustedCertificate, New-VIMachineCertificateSigningRequestâ¦}
Script     12.4.1.18⦠           VMware.PowerCLI.VCenter.Types.Cert⦠Core,Desk
Script     1.0.106.1⦠           VMware.Sdk.Runtime                  Desk      {Get-ServerConfiguration, New-ServerConfiguration, Add-ServerConfiguration, Set-ServerConfigurationâ¦}
Manifest   1.0.104.1⦠           VMware.Sdk.vSphere                  Desk
Script     3.0.104.1⦠           VMware.Sdk.vSphere.Appliance        Core,Desk {Invoke-GetItemHealthMessages, Invoke-GetHealthSettings, Invoke-UpdateHealthSettings, Invoke-CreateLocalAccountsâ¦}
Script     2.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Access Core,Desk {Invoke-GetAccessConsolecli, Invoke-SetAccessConsolecli, Invoke-GetAccessDcui, Invoke-SetAccessDcuiâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Health Core,Desk {Invoke-GetHealthApplmgmt, Invoke-GetHealthDatabase, Invoke-GetHealthDatabaseStorage, Invoke-GetHealthLoadâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Infra⦠Core,Desk {Invoke-ExportInfraprofileConfigs, Invoke-ImportInfraprofileConfigsAsync, Invoke-ListInfraprofileConfigs, Invoke-ValidateInfraprofileConfigsAsyncâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Local⦠Core,Desk {Invoke-GetLocalAccountsGlobalPolicy, Invoke-SetLocalAccountsGlobalPolicy, Initialize-LocalAccountsPolicyInfo}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Loggi⦠Core,Desk {Invoke-GetLoggingForwarding, Invoke-SetLoggingForwarding, Invoke-TestLoggingForwarding, Initialize-LoggingForwardingConfigâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Netwo⦠Core,Desk {Invoke-CreateNetworkingDnsDomains, Invoke-ListNetworkingDnsDomains, Invoke-SetNetworkingDnsDomains, Invoke-GetNetworkingDnsHostnameâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Recov⦠Core,Desk {Invoke-GetSystemNameArchive, Invoke-ListSystemNameArchives, Invoke-ValidateRecoveryBackup, Invoke-ListBackupJobDetailsâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Suppo⦠Core,Desk Invoke-GetSupportBundleComponents
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.System Core,Desk {Invoke-GetSystemGlobalFips, Invoke-SetSystemGlobalFips, Invoke-ListSystemStorage, Invoke-ResizeExSystemStorageâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Appliance.Update Core,Desk {Invoke-InstallVersionPending, Invoke-ListUpdatePending, Invoke-PrecheckVersionPending, Invoke-StageAndInstallVersionPendingâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Cis              Core,Desk {Invoke-CreateSession, Invoke-DeleteSession, Invoke-GetSession, Invoke-CancelTaskâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Cis.Tagging      Core,Desk {Invoke-AddToUsedByCategoryId, Invoke-CreateCategory, Invoke-DeleteCategoryId, Invoke-GetCategoryIdâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Content          Core,Desk {Invoke-GetContentConfiguration, Invoke-UpdateContentConfiguration, Invoke-FindContentLibrary, Invoke-GetLibraryIdContentâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.ContentLibrary   Core,Desk {Invoke-GetLibraryItemVersionLibraryChanges, Invoke-ListLibraryItemContentChanges, Invoke-CancelDownloadSessionId, Invoke-CreateLibraryItemDownloadSessionâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Esx.Hcl          Core,Desk {Invoke-DownloadHclCompatibilityDataAsync, Invoke-GetHclCompatibilityDataStatus, Invoke-ListHostHclCompatibilityReleases, Invoke-CreateHostCompatibilityReportAsyncâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Esx.Hosts        Core,Desk {Invoke-ListHostSoftwareInstalledComponents, Invoke-GetSoftware, Initialize-HostsSoftwareHostCredentials}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.Esx.Settings     Core,Desk {Invoke-DeleteClusterDraftSoftwareAddOn, Invoke-GetClusterDraftSoftwareAddOn, Invoke-GetClusterSoftwareAddOn, Invoke-SetClusterDraftSoftwareAddOnâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.VAPI.Metadata    Core,Desk {Invoke-GetCliCommand, Invoke-GetCliCommandFingerprint, Invoke-ListMetadataCliCommand, Invoke-GetComponentIdAuthenticationâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter          Core,Desk {Invoke-GetCluster, Invoke-ListCluster, Invoke-CreateDatacenter, Invoke-DeleteDatacenterâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Authent⦠Core,Desk Invoke-CreateAuthenticationToken
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.CertMan⦠Core,Desk {Invoke-GetCertificateManagementSigningCertificate, Invoke-RefreshSigningCertificate, Invoke-SetCertificateManagementSigningCertificate, Invoke-GetCertificateManagementTlsâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Content  Core,Desk {Invoke-CreateContentRegistriesHarbor, Invoke-DeleteRegistryRegistriesHarbor, Invoke-GetRegistryRegistriesHarbor, Invoke-ListContentRegistriesHarborâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Datasto⦠Core,Desk Invoke-GetDatastoreDefaultPolicy
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Deploym⦠Core,Desk {Invoke-CheckMigrateActiveDirectory, Invoke-CancelDeploymentHistory, Invoke-GetDeploymentHistory, Invoke-PauseDeploymentHistoryâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Guest    Core,Desk {Invoke-CreateGuestCustomizationSpecs, Invoke-DeleteNameGuestCustomizationSpecs, Invoke-ExportNameCustomizationSpecs, Invoke-GetNameGuestCustomizationSpecsâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Identity Core,Desk {Invoke-CreateIdentityProviders, Invoke-DeleteProviderIdentity, Invoke-GetProviderIdentity, Invoke-ListIdentityProvidersâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Invento⦠Core,Desk {Invoke-GetInventoryDatastore, Invoke-GetInventoryNetwork}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.ISO      Core,Desk {Invoke-MountIsoImage, Invoke-UnmountIsoImage, Initialize-IsoImageMountRequestBody, Initialize-IsoImageUnmountRequestBody}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.LCM      Core,Desk {Invoke-CreateLcmDiscoveryAssociatedProducts, Invoke-DeleteProductDiscoveryAssociatedProducts, Invoke-GetProductDiscoveryAssociatedProducts, Invoke-ListLcmDiscoveryAssociatedProductsâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Namespa⦠Core,Desk {Invoke-ListNamespaceManagementSoftwareClusterAvailableVersions, Invoke-ListNamespaceManagementClusterCompatibility, Invoke-DisableCluster, Invoke-EnableClusterâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Namespa⦠Core,Desk {Invoke-CreateNamespaceDomainSubjectAccess, Invoke-DeleteNamespaceDomainSubjectAccess, Invoke-GetNamespaceDomainSubjectAccess, Invoke-SetNamespaceDomainSubjectAccessâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.OVF      Core,Desk {Invoke-ListOvfExportFlag, Invoke-ListOvfImportFlag, Invoke-CreateOvfLibraryItem, Invoke-DeployOvfLibraryItemIdâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Services Core,Desk {Invoke-GetService, Invoke-GetServices, Invoke-RestartService, Invoke-StartServiceâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Storage  Core,Desk {Invoke-ListPoliciesEntitiesCompliance, Invoke-CheckCompatibilityPolicyPolicies, Invoke-ListStoragePolicies, Invoke-ListPoliciesComplianceVmâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.SystemC⦠Core,Desk {Invoke-GetSystemConfigDeploymentType, Invoke-SetSystemConfigDeploymentType, Invoke-GetSystemConfigPscRegistration, Invoke-RepointSystemConfigPscRegistrationâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Tagging  Core,Desk Invoke-ListAssociations
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Topology Core,Desk {Invoke-GetNodeTopology, Invoke-ListTopologyNodes, Invoke-ListTopologyReplicationStatus}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Trusted⦠Core,Desk {Invoke-CreateTrustedInfrastructureTrustAuthorityHostsAttestation, Invoke-GetHostTrustedInfrastructureAttestation, Invoke-DeleteClusterVersionBaseImagesAsync, Invoke-GetClusterBaseImagesAsyncâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.VCHA     Core,Desk {Invoke-GetClusterActive, Invoke-DeployVchaClusterAsync, Invoke-FailoverVchaClusterAsync, Invoke-GetVchaClusterâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.Vm       Core,Desk {Invoke-GetVmHardwareBoot, Invoke-UpdateVmHardwareBoot, Invoke-ConnectVmCdrom, Invoke-CreateVmHardwareCdromâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vCenter.VmTempl⦠Core,Desk {Invoke-CheckInTemplateLibraryItemVmCheckOuts, Invoke-CheckOutTemplateLibraryItemCheckOuts, Invoke-DeleteTemplateLibraryItemVmVmTemplateCheckOuts, Invoke-GetTemplateLibraryItemVmVmTemplateCheckOutsâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphere.vStats           Core,Desk {Invoke-CreateStatsAcqSpecs, Invoke-DeleteIdStatsAcqSpecs, Invoke-GetIdStatsAcqSpecs, Invoke-ListStatsAcqSpecsâ¦}
Script     1.0.104.1⦠           VMware.Sdk.vSphereRuntime           Core,Desk {New-vSphereServerConfiguration, Get-vSphereServerConfiguration, Set-vSphereServerConfiguration, Set-vSphereServerConfigurationApiKeyâ¦}
Script     7.0.3.187⦠           VMware.Vim                          Desk
Script     12.4.0.18⦠           VMware.VimAutomation.Cis.Core       Desk      {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Script     12.0.0.15⦠           VMware.VimAutomation.Cloud          Desk      {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalogâ¦}
Script     12.4.0.18⦠           VMware.VimAutomation.Common         Desk      {Get-PowerCLIContext, Get-Task, New-OAuthSecurityContext, Stop-Taskâ¦}
Script     12.4.0.18⦠           VMware.VimAutomation.Core           Desk      {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServerâ¦}
Script     12.4.0.18⦠           VMware.VimAutomation.Hcx            Desk      {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXComputeProfileâ¦}
Script     12.3.0.18⦠           VMware.VimAutomation.HorizonView    Desk      {Connect-HVServer, Disconnect-HVServer}
Script     12.0.0.15⦠           VMware.VimAutomation.License        Desk      Get-LicenseDataManager
Script     12.3.0.17⦠           VMware.VimAutomation.Nsxt           Desk      {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtGlobalManagerService, Get-NsxtPolicyServiceâ¦}
Script     12.4.0.18⦠           VMware.VimAutomation.Sdk            Desk      {Get-ErrorReport, EnableParameterCompleters, Get-PSVersion, Get-InstallPath}
Script     12.3.0.17⦠           VMware.VimAutomation.Security       Desk      {Add-AttestationServiceInfo, Add-KeyProviderServiceInfo, Add-TrustAuthorityKeyProviderServer, Add-TrustAuthorityKeyProviderServerCertificateâ¦}
Script     12.3.0.17⦠           VMware.VimAutomation.Srm            Desk      {Connect-SrmServer, Disconnect-SrmServer}
Script     12.4.1.18⦠           VMware.VimAutomation.Storage        Desk      {Add-EntityDefaultKeyProvider, Add-KeyManagementServer, Add-VsanFileServiceOvf, Add-VsanObjectToRepairQueueâ¦}
Script     1.6.0.0               VMware.VimAutomation.StorageUtility Desk      Update-VmfsDatastore
Script     12.4.0.18⦠           VMware.VimAutomation.Vds            Desk      {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitchâ¦}
Script     12.4.0.18⦠           VMware.VimAutomation.Vmc            Desk      {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccountâ¦}
Script     12.2.0.17⦠           VMware.VimAutomation.vROps          Desk      {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinitionâ¦}
Script     12.4.0.18⦠           VMware.VimAutomation.WorkloadManag⦠Desk      {Disable-WMCluster, Enable-WMCluster, Get-WMCluster, Get-WMNamespaceâ¦}
Script     12.1.0.16⦠           VMware.VumAutomation                Desk      {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Complianceâ¦}
0 Kudos
skushwa1
Contributor
Contributor

Case is opened with VMware and team is troubleshooting on this. So far 5 days lapsed from the day case was opened. Awaiting for resolution.

0 Kudos
JoshMancil
Contributor
Contributor

I opened a case as well and have been working with them over past two days. 

no progress at this time. 
my setup use is as such..  i have a Utility server (unix) setup for running SRM scripts during a SRM failover,  original server is working and connecting and doing what it should.
Issue came when we went to upgrade the design building a SRM Script server for each site vs just having one. the new servers are unable to connect to the SRM servers,  connect to VC or ESX hosts no issues. just not to the SRM server.


Error:
Connect-SrmServer: Unable to connect to the remote server: One or more errors occurred. (Srm endpoint is not found on locations: /dr:9007, /vcdr/extapi/sdk:9007 and /drserver/vcdr/extapi/sdk:443. If the port is different from 9007,9007,443, you should specify it)

I am actively still working the case with support and will keep ya updated if we find anything. 

0 Kudos
JoshMancil
Contributor
Contributor

So with working with the SDK engineers for PowerCLI we found the RCA of this error. I can verify once i got the PowerShell core download to 7.2.1 I was able to connect to SRM server.




I've just got an update from engineering, and it appears that the root cause has been identified.
This has been identified as being caused by an XML Serialization-related issue that is observed on Powershell Core 7.2.2 (and later versions). We have a fix for the issue that will go out with the next release of PowerCLI.
A possible workaround for this issue is to downgrade to Powershell Core 7.2.1 until the fix is released officially in a few months.
Please let me know in case you have any queries or concerns regarding this.


 
0 Kudos