The BizTalk Server Adapter for MQSeries version 2.0 no longer retrieves messages from a clustered MQSeries queue manager when the queue manager fails over to a different cluster node

This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
You may configure the Microsoft BizTalk Server Adapter for MQSeries version 2.0 to receive messages from a clustered MQSeries queue manager. If the queue manager fails over to a different cluster node, the BizTalk Server Adapter for MQSeries no longer retrieves messages from the clustered MQSeries queue. When this behavior occurs, the following event is logged in the Application event log:

Event Type: Error
Event Source: BizTalk Server 2004
Event Category: BizTalk Server 2004
Event ID: 9508
Date: Date
Time: Time
User: N/A
Computer: ComputerName
Description: Program cannot connect to the queue manager. The connection attempt to queue manager 'QueueManagerName' failed with reason code 2059. Ensure that the queue manager is available and operational.

Workaround
To work around this issue, create a scheduled task on both nodes. To do this, follow these steps:
  1. Save the following code in a file, and name the file Shutdownmqadapter.vbs. You can save the file in any disk other than the quorum disk.

    For BizTalk Server 2004
    Option ExplicitOn Error Resume NextDim sComputerName, oWMIService, colRunningServices, oService, colProcessList, objProcessIf Wscript.Arguments.Count = 0 Then	sComputerName = "."	Call ServStat	Wscript.QuitEnd IfSub ServStatSet oWMIService  = GetObject("winmgmts:" _	& "{impersonationLevel=impersonate}!\\" & sComputerName& "\root\cimv2")Set colRunningServices = oWMIService.ExecQuery _	("Select * from Win32_Service where DisplayName='Distributed Transaction Coordinator'")For Each oService in colRunningServices	'Wscript.Echo oService.DisplayName  & VbTab & oService.State	if (oService.State="Stopped") Then		'Wscript.Echo "Stopped"		' find the dllhost		Set colProcessList = oWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE Name = 'DLLHOST.EXE'")		For Each objProcess in colProcessList			if inStr(objProcess.CommandLine, "6D06157A-730B-4CB3-BD11-D48AC6B8A4BB")>0 then				'Wscript.Echo objProcess.ProcessId				Dim objShell				Set objShell = CreateObject("WScript.Shell")				objShell.Run "cmd /k kill -f " & objProcess.ProcessId & "& exit"				WScript.Quit 			end if		Next	end ifNextEnd Sub
    For BizTalk Server 2006, BizTalk Server 2006 R2, BizTalk Server 2009, and BizTalk Server 2010

    Option ExplicitOn Error Resume NextDim sComputerName, oWMIService, colRunningServices, oService, colProcessList, objProcessIf Wscript.Arguments.Count = 0 Then        sComputerName = "."        Call ServStat        Wscript.QuitEnd IfSub ServStatSet oWMIService  = GetObject("winmgmts:" _        & "{impersonationLevel=impersonate}!\\" & sComputerName& "\root\cimv2")Set colRunningServices = oWMIService.ExecQuery _        ("Select * from Win32_Service where DisplayName='Distributed Transaction Coordinator'")For Each oService in colRunningServices        'Wscript.Echo oService.DisplayName  & VbTab & oService.State        if (oService.State="Stopped") Then               'Wscript.Echo "Stopped"               ' find the dllhost                Set colProcessList = oWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE Name = 'DLLHOST.EXE'")               For Each objProcess in colProcessList                       if inStr(objProcess.CommandLine, "C691D827-19A0-42E2-B5E8-2892401481F5")>0 then                               'Wscript.Echo objProcess.ProcessId                               Dim objShell                               Set objShell = CreateObject("WScript.Shell")                               objShell.Run "cmd /k kill -f " & objProcess.ProcessId & "& exit"                               WScript.Quit                        end if               Next        end ifNextEnd Sub
  2. In Control Panel, open Scheduled Task, and then click Add Scheduled Task to create a new scheduled task to run Shutdownmqagent.vbs daily. The schedule should be set to start at midnight and to repeat every 1 minute for 24 hours.
More information
The product documentation about clustering the MQSAgent application is incorrect. Even if the MQSeries server is clustered on a Microsoft Cluster Service, you do not need to cluster the MQSAgent application.
eBiz BTS BTS2004 MSDTC Clus MSCS
Properties

Article ID: 893059 - Last Review: 01/17/2015 09:56:48 - Revision: 5.0

  • Microsoft BizTalk Adapter for MQSeries, v2.0
  • kbnosurvey kbarchive kbclustering kbbtsadapters kbtshoot kbprb KB893059
Feedback