Al_
Enthusiast
Enthusiast

Connect-VIServer fails with "There was no endpoint listening"

Jump to solution

Get-VICredentialStoreItem -File C:\Users\*******\AppData\Roaming\VMware\credstore\vicredentials.xml | %{
Connect-VIServer -Server $_.host -User $_.User -Password $_.Password
}

Connect-VIServer : 11/24/2020 12:00:39 PM Connect-VIServer Could not resolve the requested VC server.
Additional Information: There was no endpoint listening at https://****-user/sdk that could accept the message. This is often caused by an incorrect address or SOAP action. See
InnerException, if present, for more details.
At line:2 char:1
+ Connect-VIServer -Server $_.host -User $_.User -Password $_.Password
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Connect-VIServer], ViServerConnectionException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_NameResolutionFailure,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

 

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

That -user suffix on the URI shouldn't be there.
Are you sure your VICredentialStoreItem has the correct Host property.
If you do a Connect-VIServer with the VCSA FDQN on the Server parameter, does that work?


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

View solution in original post

0 Kudos
11 Replies
LucD
Leadership
Leadership

Are you using an FQDN or an IP for the Server parameter?
Is the station from which you run this located in a different AD domain than the one in which the VCSA is sitting?
Does the VCSA certificate contain the IP and FQDN?
Did you set the PowerCLI configuration setting InvalidCertificateAction to Ignore?


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

0 Kudos
Al_
Enthusiast
Enthusiast

Hi LucD, 

I've tried FQDN and IP for the Server parameter
The VM is a member of the same AD as the VCSAs
Certificate appears to contain FQDN only, not IP
InvalidCertificateAction is set to Ignore
 
This was working until today. I changed the VICredentialStoreItems from IP to FQDN to test; same result. When I paste the url from the error (There was no endpoint listening at https://****vcenter***-user/sdk that could accept the message) into a browser, it fails with "This site can't be reached".
0 Kudos
LucD
Leadership
Leadership

Can you still connect to the VCSA with the Web Client?
Which PowerCLI version are you using?


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

0 Kudos
Al_
Enthusiast
Enthusiast

Yes, we can hit the VCSA with the web client, but not with the "-user/sdk" suffix. 

Name Version
---- -------
VMware.Vim 7.0.0.15939650
VMware.VimAutomation.Cis.Core 12.0.0.15939657
VMware.VimAutomation.Common 12.0.0.15939652
VMware.VimAutomation.Core 12.0.0.15939655
VMware.VimAutomation.Sdk 12.0.0.15939651

0 Kudos
Al_
Enthusiast
Enthusiast

PowerCLI Version
----------------
VMware PowerCLI 12.0.0 build 15947286
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.0 build 15939652
VMware Cis Core PowerCLI Component PowerCLI Component 12.0 build 15939657
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.0 build 15939655

PowerCLI Version
----------------
VMware PowerCLI 12.0.0 build 15947286
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.0 build 15939652
VMware Cis Core PowerCLI Component PowerCLI Component 12.0 build 15939657
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.0 build 15939655

0 Kudos
LucD
Leadership
Leadership

That -user suffix on the URI shouldn't be there.
Are you sure your VICredentialStoreItem has the correct Host property.
If you do a Connect-VIServer with the VCSA FDQN on the Server parameter, does that work?


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

View solution in original post

0 Kudos
Al_
Enthusiast
Enthusiast

Connect-VIServer with the VCSA FDQN on the Server parameter fails with  "Invalid URI: The hostname could not be parsed".

0 Kudos
Al_
Enthusiast
Enthusiast

VICredentialStoreItems were created with this command:

New-VICredentialStoreItem -Host x.x.x.x-User ****\***** -Password **********

We have tried both IP and FQDN after -Host. Current entries are FQDN

0 Kudos
LucD
Leadership
Leadership

Why did you add the -User suffix on the Host parameter?


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

0 Kudos
Al_
Enthusiast
Enthusiast

Perhaps it's missing a space after -Host,? I'll retry...

0 Kudos
Al_
Enthusiast
Enthusiast

Yes, that was the issue. The VICredentialStoreItems were incorrectly added missing a space between the -Host and -User parameters. Correct format results in successful connection to vCenters. Thanks!

0 Kudos