VMware Cloud Community
Prokurator
Enthusiast
Enthusiast

Exception, 'Unexpected status code: 400'

Thanks a lot, that was the problem.

I was a bit confused because vCenter and SSO are on the same host.

Now fighting with


Exception, 'Unexpected status code: 400'

when adding vCenter server. Any ideas?

Reply
0 Kudos
8 Replies
iiliev
VMware Employee
VMware Employee

Could you check if there are error messages and/or exception stack traces in vCO log files?

Reply
0 Kudos
Prokurator
Enthusiast
Enthusiast

from vCO logs:

2014-03-12 12:30:57.385+0100 [VimSessionManager validate sessions timer] ERROR {} [VimSession] login() [domain\user@https://vCenter.fqdn:443/sdk/Main#2371783c] -->

com.vmware.vim.vmomi.client.common.UnexpectedStatusCodeException: Unexpected status code: 400

  at com.vmware.vim.vmomi.client.common.Response$Status.getStatus(Response.java:59)

  at com.vmware.vim.vmomi.client.http.impl.HttpExchange.run(HttpExchange.java:126)

  at com.vmware.vim.vmomi.client.http.impl.HttpProtocolBindingImpl.send(HttpProtocolBindingImpl.java:98)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.sendCall(MethodInvocationHandlerImpl.java:533)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.executeCall(MethodInvocationHandlerImpl.java:514)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.completeCall(MethodInvocationHandlerImpl.java:302)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invokeFetch(MethodInvocationHandlerImpl.java:294)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invoke(MethodInvocationHandlerImpl.java:165)

  at com.sun.proxy.$Proxy237.getContent(Unknown Source)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.getServiceInstanceContent(VlsiHelper.java:234)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.login(VlsiHelper.java:182)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.loginWithUsername(VlsiHelper.java:222)

  at com.vmware.vmo.plugin.vi4.VimSession._login(VimSession.java:409)

  at com.vmware.vmo.plugin.vi4.VimSession.login(VimSession.java:378)

  at com.vmware.vmo.plugin.vi4.VimSession.getServiceContent(VimSession.java:582)

  at com.vmware.vmo.plugin.vi4.VimSession.getRootFolder(VimSession.java:1848)

  at com.vmware.vmo.plugin.vi4.VimHost.checkUsable(VimHost.java:589)

  at com.vmware.vmo.plugin.vi4.VimSession.pingSession(VimSession.java:2309)

  at com.vmware.vmo.plugin.vi4.VimSessionManager$1.run(VimSessionManager.java:47)

  at java.util.TimerThread.mainLoop(Unknown Source)

  at java.util.TimerThread.run(Unknown Source)

2014-03-12 12:30:57.387+0100 [VimSessionManager validate sessions timer] WARN  {} [VimSession] vCenter.fqdn not usable

2014-03-12 12:30:57.405+0100 [VimSessionManager validate sessions timer] ERROR {} [VimSession] login() [user2@domain@https://vCenter.fqdn:443/sdk/Main#7b158e9d] -->

com.vmware.vim.vmomi.client.common.UnexpectedStatusCodeException: Unexpected status code: 400

  at com.vmware.vim.vmomi.client.common.Response$Status.getStatus(Response.java:59)

  at com.vmware.vim.vmomi.client.http.impl.HttpExchange.run(HttpExchange.java:126)

  at com.vmware.vim.vmomi.client.http.impl.HttpProtocolBindingImpl.send(HttpProtocolBindingImpl.java:98)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.sendCall(MethodInvocationHandlerImpl.java:533)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.executeCall(MethodInvocationHandlerImpl.java:514)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.completeCall(MethodInvocationHandlerImpl.java:302)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invokeFetch(MethodInvocationHandlerImpl.java:294)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invoke(MethodInvocationHandlerImpl.java:165)

  at com.sun.proxy.$Proxy237.getContent(Unknown Source)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.getServiceInstanceContent(VlsiHelper.java:234)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.loginBySamlToken(VlsiHelper.java:205)

  at com.vmware.vmo.plugin.vi4.VimSession._login(VimSession.java:401)

  at com.vmware.vmo.plugin.vi4.VimSession.login(VimSession.java:378)

  at com.vmware.vmo.plugin.vi4.VimSession.getServiceContent(VimSession.java:582)

  at com.vmware.vmo.plugin.vi4.VimSession.getRootFolder(VimSession.java:1848)

  at com.vmware.vmo.plugin.vi4.VimHost.checkUsable(VimHost.java:589)

  at com.vmware.vmo.plugin.vi4.VimSession.pingSession(VimSession.java:2309)

  at com.vmware.vmo.plugin.vi4.VimSessionManager$1.run(VimSessionManager.java:47)

  at java.util.TimerThread.mainLoop(Unknown Source)

  at java.util.TimerThread.run(Unknown Source)

2014-03-12 12:30:57.406+0100 [VimSessionManager validate sessions timer] WARN  {} [VimSession] vCenter.fqdn not usable

2014-03-12 12:30:57.413+0100 [VimSessionManager validate sessions timer] ERROR {} [VimSession] login() [domain\user@https://vCenter.IP:443/sdk/Main#1fe4ba5d] -->

com.vmware.vim.vmomi.client.common.UnexpectedStatusCodeException: Unexpected status code: 400

  at com.vmware.vim.vmomi.client.common.Response$Status.getStatus(Response.java:59)

  at com.vmware.vim.vmomi.client.http.impl.HttpExchange.run(HttpExchange.java:126)

  at com.vmware.vim.vmomi.client.http.impl.HttpProtocolBindingImpl.send(HttpProtocolBindingImpl.java:98)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.sendCall(MethodInvocationHandlerImpl.java:533)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl$CallExecutor.executeCall(MethodInvocationHandlerImpl.java:514)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.completeCall(MethodInvocationHandlerImpl.java:302)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invokeFetch(MethodInvocationHandlerImpl.java:294)

  at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invoke(MethodInvocationHandlerImpl.java:165)

  at com.sun.proxy.$Proxy237.getContent(Unknown Source)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.getServiceInstanceContent(VlsiHelper.java:234)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.login(VlsiHelper.java:182)

  at com.vmware.vmo.plugin.vi4.config.VlsiHelper.loginWithUsername(VlsiHelper.java:222)

  at com.vmware.vmo.plugin.vi4.VimSession._login(VimSession.java:409)

  at com.vmware.vmo.plugin.vi4.VimSession.login(VimSession.java:378)

  at com.vmware.vmo.plugin.vi4.VimSession.getServiceContent(VimSession.java:582)

  at com.vmware.vmo.plugin.vi4.VimSession.getRootFolder(VimSession.java:1848)

  at com.vmware.vmo.plugin.vi4.VimHost.checkUsable(VimHost.java:589)

  at com.vmware.vmo.plugin.vi4.VimSession.pingSession(VimSession.java:2309)

  at com.vmware.vmo.plugin.vi4.VimSessionManager$1.run(VimSessionManager.java:47)

  at java.util.TimerThread.mainLoop(Unknown Source)

  at java.util.TimerThread.run(Unknown Source)

2014-03-12 12:30:57.415+0100 [VimSessionManager validate sessions timer] WARN  {} [VimSession] vCenter.IP not usable

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

So there seems to be issues when accessing vCenter server machine.

From the machine where the vCO is installed, could you try to ping the VC (by IP and by hostname)? Also, try to open VC managed object browser (at https://[vc-ip]/mob) and check if you can navigate over managed objects.

Reply
0 Kudos
Prokurator
Enthusiast
Enthusiast

Can ping both - via name and via IP. In both directions.

Also can navigate over managed objects.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

This type of error message ('... not usable') is printed by vCO VC plug-in when the plug-in cannot ping the VC or cannot retrieve VC root folder.

A few more questions:

* What strategy do you choose when adding vCenter host - 'session per user' or 'share a unique session' ?

* On the same page, there is a link 'Connection test'. Could you click on it and check if connection test succeeds for the user name/password you use?

* How do you enter the user name - domain\username or username@domain? Could you check both variants?

Reply
0 Kudos
Prokurator
Enthusiast
Enthusiast

I tried both strategies - same result: 'Unexpected status code: 400'.

Both variants of user + domain - connection test: Test Result: Connection successful, apply changes - 'Unexpected status code: 400'.


Any other ideas?

Reply
0 Kudos
Prokurator
Enthusiast
Enthusiast

Updated vSphere to 5.5 Update 1, deployed the new version of the appliance (5.5.1.0 Build 1617225) - still have the same problem:

Exception, 'Unexpected status code: 400'


although connection test is successfull.


Any ideas?

Reply
0 Kudos
Prokurator
Enthusiast
Enthusiast

The problem was that HTTP is not using the default port 80.

Could solve it with the help of this KB, although it is for the version 5.1:

VMware KB: vCenter Orchestrator 5.1 login to vCenter Server fails with the error: Unexpected status ...

Reply
0 Kudos