"Unexpected error communicating with the vCenter server" error when using custom HTTP port for vCenter Server
search cancel

"Unexpected error communicating with the vCenter server" error when using custom HTTP port for vCenter Server

book

Article ID: 335946

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Under the Management tab of the vSphere ESX Agent Manager, you see the message:

    This page cannot be displayed

  • In the C:\ProgramData\VMware\VMware VirtualCenter\Logs\eam.log file, you see entries similar to:

    INFO | 2016-08-30 06:12:16,017 | eam-0 | VcConnection.java | 128 | Connecting to vCenter as the com.vmware.vim.eam extension
    INFO | 2016-08-30 06:12:16,017 | eam-0 | VcConnection.java | 224 | Connecting to https://sdkTunnel:8089/sdk/vimService via vCenter proxy http://localhost:80
    ERROR | 2016-08-30 06:12:16,020 | eam-0 | VcConnection.java | 272 | Unexpected error communicating with the vCenter server.
    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.invokeOperation(MethodInvocationHandlerImpl.java:272)
    at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invoke(MethodInvocationHandlerImpl.java:169)
    at com.sun.proxy.$Proxy65.retrieveContent(Unknown Source)
    at com.vmware.eam.vc.VcConnection.connect(VcConnection.java:262)
    at com.vmware.eam.vc.VcConnection.connectAsExtension(VcConnection.java:129)
    at com.vmware.eam.vc.VcListener.login(VcListener.java:343)
    at com.vmware.eam.vc.VcListener.main(VcListener.java:310)
    at com.vmware.eam.vc.VcListener.run(VcListener.java:288)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    WARN | 2016-08-30 06:12:16,020 | eam-0 | VcListener.java | 292 | Trying to recover from error
    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.invokeOperation(MethodInvocationHandlerImpl.java:272)
    at com.vmware.vim.vmomi.client.common.impl.MethodInvocationHandlerImpl.invoke(MethodInvocationHandlerImpl.java:169)
    at com.sun.proxy.$Proxy65.retrieveContent(Unknown Source)
    at com.vmware.eam.vc.VcConnection.connect(VcConnection.java:262)
    at com.vmware.eam.vc.VcConnection.connectAsExtension(VcConnection.java:129)
    at com.vmware.eam.vc.VcListener.login(VcListener.java:343)
    at com.vmware.eam.vc.VcListener.main(VcListener.java:310)
    at com.vmware.eam.vc.VcListener.run(VcListener.java:288)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    INFO | 2016-08-30 06:12:16,021 | eam-0 | VcListener.java | 303 | Retrying in 10 sec.


    Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


Environment

VMware vCenter Server 5.5.x

Cause

This issue occurs when the HTTP port for vCenter Server is changed to a custom port after the deployment.

Resolution

To resolve this issue, update the vc.proxy.port entry in the eam.properties file with the current HTTP port used by vCenter Server.

To update the vc.proxy.port entry in the eam.properties file:
  1. Take a backup of the eam.properties file.

    Note: The default location for the eam.properties file is C:\Program Files\VMware\Infrastructure\tomcat\webapps\eam\WEB-INF.

  2. Open the eam.properties file using a text editor.
  3. Change the value for vc.proxy.port to the current HTTP port used by vCenter Server.

    For example: If vCenter Server uses port 81 for HTTP, update the entry to:

    vc.proxy.port=81

  4. Restart vCenter Server service.


Additional Information

To identify the custom port used by vCenter Server:

  1. Click Start > Run, type regedit, and click OK.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VirtualCenter in the Registry Editor window.
  3. Verify the port value for HttpProxyPort.
vCenter Server のカスタム HTTP ポートを使用すると、「vCenter Server との通信中に予期しないエラーが発生しました (Unexpected error communicating with the vCenter server)」エラーが発生する
对 vCenter Server 使用自定义 HTTP 端口时,显示“与 vCenter Server 通信时发生意外错误”(Unexpected error communicating with the vCenter Server) 错误