Microsoft CRM 3.0 setup error and TCP/IP ephemeral ports

Wake Me Up Before You Go Go...

Although most installations of CRM 3.0 succeed with the minimum of fuss, some do go a bit awry. Fabio, one of my colleagues in Brazil, came across the following installation error message:

CRM Setup Error Microsoft.Crm.Setup.Server.ProvisionBusinessAction

"Action Microsoft.Crm.Setup.Server.ProvisionBusinessAction failed.Exception from HRESULT: 0x80044151"

In addition, Mike, one of our UK CRM partners, also came across a similar issue related to timeouts.

After support calls, the following information solved the problem for both of them, and all was goodness again.

  1. Open the registry by running regedit.exe.
  2. Navigate to HKLM\Software\Microsoft\MSCRM.
    Right click, select New. Create a new Reg DWORD value called OLEDBTimeout.
    Right click and modify to change the value to 0x240.
  3. Navigate to HKLM\System\CurrentControlSet\Services\Tcpip\Parameters
    Right click, select New. Create a new Reg DWORD value called MaxUserPort.
    Right click and modify to change the value to 0xfffe.
  4. Navigate to HKLM\System\CurrentControlSet\Services\Tcpip\Parameters
    Right click, select New. Create a new Reg DWORD value called TcpTimedWaitDelay.
    Right click and modify to change the value to 0x2.

The registry settings control what is called an “ephemeral port” in TCP/IP and Windows Server starts out with a default of 5000. These ports are recycled every four minutes and returned to the pool for an application to use. The way that the ports are related to Microsoft CRM is that for every call CRM makes, it uses a port. In high volume cases with good hardware, the potential exists where CRM can use up all the available ports before they have a chance to be recycled by the server. As a result, the network connection is being dropped and an exception is thrown by CRM.

For more information, I would recommend reading the following article:

This posting is provided "AS IS" with no warranties, and confers no rights.