Message Queuing cannot send messages to a target queue after the IP address changes

Article translations Article translations
Article ID: 833512 - View products that this article applies to.
Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Expand all | Collapse all

On This Page

SYMPTOMS

Microsoft Message Queuing (also known as MSMQ) cannot successfully send messages to a target queue if both of the following conditions are true:
  • The IP address of the receiving computer has changed.
  • A different computer has assumed the IP address that was previously owned by the receiving computer.

CAUSE

This problem occurs because the sender does not retry name resolution.

RESOLUTION

Microsoft Windows 2000

Security update information

To resolve this problem, apply the security update that is discussed in the following Microsoft Knowledge Base article:
892944 MS05-017: Vulnerability in MSMQ could allow code execution
Registry information
You must make changes to the registry after you apply this security update. For more information, see the "" section.

Microsoft Windows XP

Service pack information

To resolve this problem, obtain the latest service pack for Windows XP. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
322389 How to obtain the latest Windows XP service pack
Registry information
You must make changes to the registry after you apply this service pack. For more information, see the "" section.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Prerequisites
No prerequisites are required.
Restart requirement
You must restart the computer after you apply this hotfix.
Registry information
You must make changes to the registry after you apply this hotfix. For more information, see the "" section.
File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
   Date         Time   Version     Size     File name
   -------------------------------------------------------------------------------
   15-Dec-2003  17:31  5.1.0.1041   67,456  Mqac.sys
   15-Dec-2003  20:37  5.1.0.1041  130,048  Mqad.dll
   15-Dec-2003  20:37  5.1.0.1041   14,848  Mqise.dll
   15-Dec-2003  20:37  5.1.0.1041  608,256  Mqqm.dll
   15-Dec-2003  20:37  5.1.0.1041  165,888  Mqrt.dll
   15-Dec-2003  20:37  5.1.0.1041   88,576  Mqsec.dll
   15-Dec-2003  17:31  5.1.0.1041   98,816  Mqtgsvc.exe
   15-Dec-2003  20:37  5.1.0.1041  467,456  Mqutil.dll
   15-Dec-2003  19:01  5.4.1.0     429,336  Windowsxp-kb833512-x86-enu-symbols.exe
   15-Dec-2003  19:01  5.4.1.0     799,000  Windowsxp-kb833512-x86-enu.exe

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

This problem was corrected in Windows XP Service Pack 2.

This problem was corrected in Windows Server 2003 Service Pack 1.

MORE INFORMATION

In this scenario, there is one sender and two receivers (Receiver A and Receiver B). Receiver A connects to a network by using a virtual private network (VPN) connection. The sender sends messages successfully. Receiver A disconnects from the network. Receiver B connects to the network and obtains the IP address that was previously used by Receiver A. Receiver A may also reconnect and obtain a new IP address. The sender continues to send messages that are intended for Receiver A to the IP address that is now being used by Receiver B. The sender does not retry name resolution because the previous result was cached. Receiver B rejects the messages, but the sender continues to send messages to Receiver B. You must restart the Message Queuing service on the sender's computer to resolve the problem.

Registry changes

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

In addition to applying the appropriate update, you must set registry parameters on the receiver and on the sender. The following registry change is required on the receiver side so that the receiver will release a session if it receives a message for a non-local queue. This change means that the receiver will not return a session acknowledgement and the sender will close the session a short time later. It is standard on the sender side to close a session if an acknowledgement is not received in a specified time-out period. The sender then tries to reestablish a session. Follow these steps, and then quit Registry Editor:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\Software\Microsoft\MSMQ\Parameters
  3. On the Edit menu, point to New, and then click REG_DWORD.
  4. Type CloseSessionOnNonLocal, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. Type 1, and then click OK.
You must make the following registry change to force the sender to ignore its address cache and to always perform name resolution before it establishes a session. Follow these steps, and then quit Registry Editor:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\Software\Microsoft\MSMQ\Parameters
  3. On the Edit menu, point to New, and then click REG_DWORD.
  4. Type ForceNameResolutionDirect, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. Type 1, and then click OK.
This fix also adds logging for the name resolution code. This change is enabled by adding the following registry value. Follow these steps, and then quit Registry Editor:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\Software\Microsoft\MSMQ\Parameters\Debug
  3. On the Edit menu, point to New, and then click REG_DWORD.
  4. Type QMLogging, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. Type 0x20, and then click OK.
Note The QMLogging value is specific to Windows 2000. The CloseSessionOnNonLocal and ForceNameResolutionDirect values are for Windows 2000 and for Windows Server 2003.

The following registry parameters are also required to flush the DNS and NetBIOS name resolution caches. Otherwise, an IP in the cache may be owned by a different computer:
  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netbt\Parameters\CacheTimeout = (DWORD) 0
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters\MaxCacheEntryTtlLimit = (DWORD) 1
Note The MaxCacheEntryTtlLimit registry key is specific to Windows 2000. In Windows Server 2003, this registry key is called MaxCacheTtl. For more information about the MaxCacheTtl registry key, click the following article number to view the article in the Microsoft Knowledge Base:
318803 How to disable client-side DNS caching in Windows XP and Windows Server 2003
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 833512 - Last Review: April 15, 2008 - Revision: 10.1
APPLIES TO
  • Microsoft Message Queuing 3.0
  • Microsoft Message Queuing 2.0
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows XP Professional
Keywords: 
kbautohotfix kbhotfixserver kbtshoot kbwinxpsp2fix kbwin2000presp5fix kbbug kbfix kbwinxppresp2fix kbqfe KB833512

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com