VMware Cloud Community
nareshunik
Enthusiast
Enthusiast
Jump to solution

not able to connect to vCenter via powercli

Connect-VIServer : 6/7/2012 1:22:15 PM    Connect-VIServer        The request f
ailed with HTTP status 503: Service Unavailable.
At line:1 char:17
+ connect-viserver <<<<  29.64.5.34
    + CategoryInfo          : ObjectNotFound: (:) [Connect-VIServer], ViServer
   ConnectionException
    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_Servi
   ceUnavailable,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

=====================

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Powe
rCLIVersion

PowerCLI Version
----------------
   VMware vSphere PowerCLI 5.0 build 435427
---------------
Snapin Versions
---------------
   VMWare AutoDeploy PowerCLI 5.0 build 575
   VMWare ImageBuilder PowerCLI 5.0 build 575
   VMware License PowerCLI 5.0 build 395016
   VMWare vSphere PowerCLI 5.0 build 435427

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Curious how a KB about  The Storage View tab in vCenter Server does not display anything solved your issue. :smileyconfused:


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

View solution in original post

0 Kudos
13 Replies
MartinAmaro
Expert
Expert
Jump to solution

Can you connect to from the machine using the vSphere client?

Any firewalls preventing the connection?

Have you tried connecting via IP, NetBIOS name and FQDN ?

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful.
0 Kudos
knight5xadvisor
Contributor
Contributor
Jump to solution

From a powercli window, are you able to connect to your vcenter by entering:  connect-viserver -server VCNAME_HERE.  Is the vCenter up and running?  Are you able to connect to it by the client?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Try restarting the VMware Virtual Infrastructure Web Access service on the vCenter.


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

0 Kudos
nareshunik
Enthusiast
Enthusiast
Jump to solution

vCenter server /service are up and running fine. I am able to access the vCenter server using vSphere client.

Only from the powercli i am not able to access.

When i enter the command connect-viserver <vCenter name>, it prompts for the username/password and if i enter it fails with the below error message.

=====================================

WARNING: There were one or more problems with the server certificate:

* The X509 chain could not be built up to the root certificate.

* The certificate's CN name does not match the passed value.

Connect-VIServer : 6/7/2012 2:40:11 PM    Connect-VIServer        Cannot comple
te login due to an incorrect user name or password.
At line:1 char:17
+ connect-viserver <<<<  xxxxxxxxxxxxxxxxx

    + CategoryInfo          : NotSpecified: (:) [Connect-VIServer], InvalidLog
   in
    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_Excep
   tion,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

=================================

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> connect-
viserver -server xxxxxxxxxxxxxxxxxxxxxxx

Connect-VIServer : 6/7/2012 2:41:28 PM    Connect-VIServer        The request f
ailed with HTTP status 503: Service Unavailable.
At line:1 char:17
+ connect-viserver <<<<  -server xxxxxxxxxxxxxxxxxxxx

    + CategoryInfo          : ObjectNotFound: (:) [Connect-VIServer], ViServer
   ConnectionException
    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_Servi
   ceUnavailable,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

0 Kudos
LucD
Leadership
Leadership
Jump to solution

From that 1st error message I would say that the user/password is not correct.

Do you have any 'special' characters in the password ? Try entering the password within single quotes.


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

0 Kudos
nareshunik
Enthusiast
Enthusiast
Jump to solution

I tried with different user account, still same issue. With the same password i am able to login to the vSphere client and vCenter server without any issues.

how about the second error message?

http error?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

I suspect the 2nd message is a consequence of the 1st message.

Did that other account also say that account/password was invalid ?


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

0 Kudos
nareshunik
Enthusiast
Enthusiast
Jump to solution

Yes, even other account says same error message. i tried with 3 different accounts

0 Kudos
knight5xadvisor
Contributor
Contributor
Jump to solution

Try updating your powercli to match the vcenter you are connecting to.

0 Kudos
nareshunik
Enthusiast
Enthusiast
Jump to solution

I have installed the latest powercli version still same error.

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> get-powe
rcliversion

PowerCLI Version
----------------
   VMware vSphere PowerCLI 5.0.1 build 581491
---------------
Snapin Versions
---------------
   VMware AutoDeploy PowerCLI Component 5.0 build 544967
   VMware ImageBuilder PowerCLI Component 5.0 build 544967
   VMware vCloud Director PowerCLI Component 1.5 build 581492
   VMware License PowerCLI Component 5.0 build 544881
   VMware vSphere PowerCLI Component 5.0 build 581435

===============================

Only the vCenter not able to access, able to access the ESXi without any issues.

Connect-VIServer : 6/7/2012 6:33:56 PM    Connect-VIServer        The request f
ailed with HTTP status 503: Service Unavailable.
At line:1 char:17

0 Kudos
MartinAmaro
Expert
Expert
Jump to solution

Are you entering the username as MyDomain\MyUsername  ?

Connect-VIServer xx.xx.xx.xx -User 'Domain'\MyUsername' -Password 'MyPassword'

if you have a special password then you might have to add single quote to the special characters exmaple "pa`$`$word".

As LucD sugguested use the single quotes in the username and password

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful.
LucD
Leadership
Leadership
Jump to solution

Curious how a KB about  The Storage View tab in vCenter Server does not display anything solved your issue. :smileyconfused:


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

0 Kudos