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

Article translations Article translations
Article ID: 893059 - View products that this article applies to.
Expand all | Collapse all

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 Explicit
    On Error Resume Next
    Dim sComputerName, oWMIService, colRunningServices, oService, colProcessList, objProcess
    If Wscript.Arguments.Count = 0 Then
    	sComputerName = "."
    	Call ServStat
    	Wscript.Quit
    End If
    
    
    
    Sub ServStat
    Set 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 if
    Next
    
    End Sub
    For BizTalk Server 2006, BizTalk Server 2006 R2, BizTalk Server 2009, and BizTalk Server 2010

    Option Explicit

    On Error Resume Next

    Dim sComputerName, oWMIService, colRunningServices, oService, colProcessList, objProcess

    If Wscript.Arguments.Count = 0 Then

            sComputerName = "."

            Call ServStat

            Wscript.Quit

    End If







    Sub ServStat

    Set 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 if

    Next



    End 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.

Properties

Article ID: 893059 - Last Review: January 13, 2011 - Revision: 4.0
APPLIES TO
  • Microsoft BizTalk Adapter for MQSeries, v2.0
Keywords: 
kbclustering kbbtsadapters kbtshoot kbprb KB893059

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