Socket allocation problems cause operations to fail with error FFQO0143E

On the Windows operating system, operations such as parsing, building an index, searching, and so on, fail with the error message FFQO0143E (ES_ERR_SOCKET_ADDRESS_IN_USE) because a socket address cannot be allocated.

Symptoms

This error can occur in any session or component of the system. In the following example, the error occurred during an index build because insufficient client sockets were available on the server where Watson Content Analytics is installed:
5/29/07 14:30:03.721 JST [Error] [ES_ERR_SOCKET_ADDRESS_IN_USE] 
[col_2000] [col_2000.indexer.delta]
EXAMPLE1:6612:580:oss:src\trevi\oss\src\Socket.cpp:oss::Socket::connect:581
FFQO0143E The specified address and port number are already in used. 
Server Name: 192.168.100.101. Port Number: 6002.

5/29/07 14:30:03.846 JST [Error] [ES_ERR_CCLSRV_SOCKET_COMM_FAILED]
[col_2000] [col_2000.indexer.delta]
EXAMPLE1:6612:580:oss::ccl:src\trevi\oss\ccl\src\Session.cpp:oss::ccl::
Session::openSession:102
FFQO0253E The socket communication failed.

5/29/07 14:30:04.003 JST [Error] [ES_ERR_CTRL_ACQUIRE_SESSION_READ_LOCK]
[col_2000] [col_2000.indexer.delta]
EXAMPLE1:6612:580:control::configmanager:src\trevi\control\configmanager\src
\CtrlConfigManager.cpp:control::configmanager::CtrlConfigManager::getSession
ReadLock:1207
FFQC0017E The session configuration read lock col_2000.indexer could not
be acquired.

5/29/07 14:30:04.128 JST [Error] [ES_ERR_CTRL_INDEXER_BUILD_THREAD_FAILED]
[col_2000] [col_2000.indexer.delta]
EXAMPLE1:6612:580:control::indexer:src\trevi\control\indexer\src\
BuilderThread.cpp:control::indexer::BuilderThread::run:291
FFQC1417E The index build thread encountered an error.

Causes

By default, Windows does not allow users to set up client connections on ports above 5000. After a socket is closed, the socket connection stays in a TIME_WAIT state for approximately two minutes more (the amount of time depends on the system configuration). After the waiting period ends, the socket is freed and the address can be reused.

Sometimes, a large number of random ports will be opened on the computer because API calls that use the common communication layer (CCL) client involve frequent operations from every session.

If more than 4000 connections (ports 1024 through 5000) are made before the ports are freed (after the TIME_WAIT state ends), then attempts to open a client socket on a port above 5000 will be rejected by the operating system. A message that indicates that the address is already in use might be returned.

Resolving the problem

You can avoid this problem by modifying TCP/IP parameters in the Windows registry:
  1. Back up the Windows registry.
  2. Start the Windows registry editor: In the Windows Start menu, select Run and then enter regedit.
  3. Find the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  4. Right-click the Parameters folder and select New > DWORD Value.
  5. Name the new key MaxUserPort.
  6. Double-click the MaxUserPort key, change the value to 65534, and select Decimal as the base.
  7. Right-click the Parameters folder and select New > DWORD Value.
  8. Name the new key TcpTimedWaitDelay.
  9. Double-click the TcpTimedWaitDelay key, change the value to 30, and select Decimal as the base.
  10. Restart the computer.
For additional information about this problem, see: