Search or sort function in vCenter Server reports the error: The operation has timed out
search cancel

Search or sort function in vCenter Server reports the error: The operation has timed out

book

Article ID: 305621

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • The search or sort function in vCenter Server reports the error:

    The operation has timed out
  • In the vws.log file, you see entries similar to:

    [2011-07-28 16:05:52,405 pool-7-thread-6 ERROR com.vmware.vim.query.impl.RemoteQueryOperation] Connection failed to remote service.
    java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:755)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
    at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
    at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine
    MultiThreadedHttpConnectionManager.java:1413)
    at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
    at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at com.vmware.vim.query.impl.RemoteOperation.executeMethod(RemoteOperation.java:101)
    at com.vmware.vim.query.impl.RemoteQueryOperation.executeInt(RemoteQueryOperation.java:66)
    at com.vmware.vim.query.impl.RemoteOperation.execute(RemoteOperation.java:45)
    at com.vmware.vim.query.impl.EngineRemoteImpl.runRemoteQuery(EngineRemoteImpl.java:240)
    at com.vmware.vim.query.impl.EngineRemoteImpl.executeQuery(EngineRemoteImpl.java:179)
    at com.vmware.vim.query.impl.EngineMainImpl$QueryTask.run(EngineMainImpl.java:214)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    [2011-07-28 16:05:52,405 pool-7-thread-6 ERROR com.vmware.vim.query.impl.EngineRemoteImpl] Executing query on remote service failed.
    com.vmware.vim.query.exception.RemoteOperationException: java.net.SocketTimeoutException: Read timed out


Environment

VMware vCenter Server 4.1.x

Cause

This issue may occur if the connection times out while querying a large vCenter Server inventory.

Resolution

To resolve this issue, increase the timeout value for the remote query service by completing these steps:
  1. Open the queryservice.xml file located at C:\Program Files\VMware\Infrastructure\tomcat\webapps\vws\WEB-INF using a text editor.
  2. Locate this section within the file:

    <bean name="queryservice" class="com.vmware.vim.query.impl.XhiveServiceImpl" </FONT>

    init-method="init" lazy-init="true">

    <property name="dbName" value="VcCache"/>

    <property name="maxQueries" value="20"/>

    <property name="configuration">

    <bean class="com.vmware.vim.query.Configuration">

    </bean>

    </property>

    </bean>

  3. Add the maxRemoteTimeout property and set it to an appropriate value.

    For example:

    <bean name="queryservice" class="com.vmware.vim.query.impl.XhiveServiceImpl" </FONT>

    init-method="init" lazy-init="true">

    <property name="dbName" value="VcCache"/>

    <property name="maxQueries" value="20"/>

    <property name="configuration">

    <bean class="com.vmware.vim.query.Configuration">

    <property name="maxRemoteTimeout" value="960000"/>

    </bean>

    </property>

    </bean>


  4. Restart the VirtualCenter Management Webservices service. For more information, see Stopping, starting, or restarting vCenter services (1003895).

Notes:

  • The value <property name="maxRemoteTimeout" value="960000"/> , is equal to 16 minutes
  • After restarting VirtualCenter Management Webservices service, wait for five minutes and then retry the search function in vCenter Server.
  • If running vCenter in Linked Mode, be sure to perform this on all Linked Mode vCenter instances.


Additional Information



How to stop, start, or restart vCenter Server services