Wednesday, October 22, 2014

Errors: BizTalk MQSeries Adapter

Error No1:























Error:
Unable to load file C:\Program Files (x86)\Microsoft BizTalk Server 2013\MQSAgent.dll
Process Name: dllhost.exe
Comsvcs.dll file version: ENU 2001.12.8530.16385 shp during component registration. File does not exist.

Solution:
 This is not that dangerous Error. So dont waste much time on it.


Error No2:























Error:
The adapter "MQSeries" raised an error message. Details "The ProgID MQSAgent2.MQSAgent was not recognized by the system. Please try reinstalling.".
Solution:
MQSAgent2 is not installed.  Run the installation of MQSeries Agent from BizTalk installation.

Error No3:











Error:
The adapter "MQSeries" raised an error message. Details "The adapter has encountered an 'Access Denied' error while attempting to contact the COM+ object on the MQSeries server. Ensure the BizTalk account is added to the Role on the MQSAgent COM+ application.".
Solution:
The IBM MQ service is stopped or the User account does not have access to the IBM MQ Queue or the BizTalk service account does not have access to MQSAgent2.
Add the BizTalk Account to the creator role on the MQSAgent2 Com+ Service component.

Error No4:






















Error:
When we click the dropdown of Queue Manager we get this error "QueryQueueManagers".

Solution:
This is not that serious error. Just type in the Queue name manually and click Ok.


Error No5:




























Error:
The Adapter is not installed or configured correctly on the server localhost.

Solution: 
The MQSAgent2 is not installed/configured correctly.
Install the MQSeries Agent from the BizTalk installation software setup.exe.

Error No6:

























Error:
Faulting application name: dllhost.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc6b7
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x53159a86
Exception code: 0xc06d007e
Fault offset: 0x0000c42d
Faulting process id: 0x1930
Faulting application start time: 0x01cfe9fe626a902f
Faulting application path: C:\Windows\SysWOW64\dllhost.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: a01bddd5-55f1-11e4-b5d9-005056bc0ee6
Faulting package full name: %14

Faulting package-relative application ID: %15


















Error:
The system has called a custom component and that component has failed and generated an exception. This indicates a problem with the custom component. Notify the developer of this component that a failure has occurred and provide them with the information below.
Server Application ID: {C691D827-19A0-42E2-B5E8-2892401481F5}
Server Application Instance ID:
{A704A9B9-7982-4319-AF54-33CACC90E65C}
Server Application Name: MQSAgent2
The serious nature of this error has caused the process to terminate.
Exception: C06D007E
Address: 0x76FFC42D

Reason:
Dll Crash Error every 3 seconds after activating Receive location. This error occurs if you manually executed MQSConfigWiz.exe the from the BizTalk installation folder.
You should always execute it via BizTalk Setup.exe and activate "MQSeries Agent".

Solution:
Uninstall all IBM products(MQ Server, MQ Client or MQ Fix pack if any).
Repair BizTalk (dont worry you wont loose you applications/Configuration).
Install IBM MQ Server.
Install MQSeries Agent(very important) from BizTalk setup.exe.
Configure accounts properly.
Try again by acitvating the Receive location.

Error No7:
















or













Error: 
Error encountered as BizTalk attempts to retrive a message from MQSeries, description = Error encountered on Queue.Get Queue name = TestQ Reason code = 2354. hresult = 0XC0C1100C. This error will also be reported on the BizTalk server.

or
27.11.2014 11:14:26 - Process(7120.11) User(xxxxxx) Program(amqzlaa0.exe) Host(xxxxxx) Installation(Installation1) VRMF(7.1.0.3) QMgr(TestQM)
Domain controller unavailable.
WebSphere MQ was unable to contact the domain controller to obtain information for user 'network service@NT AUTHORITY'.
Ensure that a domain controller for the domain on which user 'network service@NT AUTHORITY' is defined is available. Alternatively, if you are using a computer which is not currently connected to the network and have logged on using a domain user ID, you may wish to log  on using a local user ID instead.

Solution:
Set Transaction Support=False in the BizTalk MQ Series Receive location properties.

Error No 8:

















Error:
Entity 'username@domain' has insufficient authority to access object  QueueManager.

Reason:
I got this error when I tried to create a new Queue Manager after installing MQ Server. We are missing rights on the MQ Server. I was surprised as I used the same user to install MQ Server.

Solution:
Add the user to the local mqm group which gets created automatically after installing MQ Server.

Tuesday, October 21, 2014

Using MQSeries Adapter in BizTalk 2013

Recently I wanted to Integrate BizTalk 2013 with a queue on IBM MQ Server 7.1.
The only blog which helped me a bit was from Steve Melan. Steve tried to help me fix the issues over Teamviewer but the system gave such wierd errors like dll crashing with not much error info.
I managed to fix it after working on a single dll crash error for 3 days.
Thanks Steve for writing so much on MQ Server and BizTalk Integration which atleast gives some insight of whats going on inside the hood but he missed writing a simple how to document which a new beginner( in IBM world) like me  can follow blindly. That what I asked for first when I got in touch with him...so my life could be made easy.
I am writing this post so that it can help others and contact me if you have any issues.
I will defintly try to help you out as Steve tried to help me out on short notice over phone/Teamviewer/Skype meetings.

Scenario:
Server details:
Windows 2008 R2 SP1
BizTalk 2013 with CU2.
BizTalk is configured with remote SQL Server 2008 R2 SP2.

Plan is to install IBM Webshpere MQ on BizTalk Server so BizTalk will send messages to Local IBM MQ Server which will transfer messages to remote IBM MQ Server queue on Linux Server.
There are 2 ways to Integrate BizTalk with IBM MQ Server.
1. Using Inbulit MQSeries Adapter.
2. MQSC BizTalk Adapter from Host Integration Server Installation.

I integrated it using the Inbulit BizTalk MQSeries Adapter.
So here is what was installed to make it work
1.Installed BizTalk 2013.
2.Configured BizTalk 2013.
3. Installed IBM MQ Server 7.1.0.3 on BizTalk Server.
4. Installed MQSeries Agent from the BizTalk installation.
5. Configured Receive location to pick messages from queue using MQseries Adapter.

1. Installed BizTalk 2013.
MQSeries Adapter gets installed by default with installation of BizTalk 2013.
When I installed BizTalk 2013 I could not figure out as to why MQSeries agent is grayed out.
It was missing some prerequisites....but no clue as to what it was.
It is very important that we are able to configure MQSeries Agent.
When you install MQSeries Agent it installs MQS Agent2 Com+ service in Component Services via which the MQSeries Adapter communicates with IBM MQ Server.
Image from MSDN link below





















Structure of the MQSeries Adapter
So now you understand how important it is to configure MQSeries Agent....we do not need the MQ Client on the BizTalk Server.
When it was grayed out I tried directly installing MQSeries Agent  by executing the file MQSConfigWiz.exe from BizTalk installation source folder.
It creates the component but you will get wierd errors like dll crashing.






















3. Install IBM MQ Server on BizTalk Server.
I installed a trial version of MQ Server 7.1 which was downloaded from IBM website.
IBM MQ Server 7.1.0

Important document if you get Access Denied Error which I am sure you will get.
IBM MQ on Windows




















Network Configuration:
Select No if its a standalone machine(BizTalk Server) without any domain controllers.
Select yes if your BizTalk Server is in a environment where you have network and domian controllers. Normally it is yes as we always have BizTalk  Server in network domain.



































Click on Launch IBM Websphere MQ Installer. It is just click next process...same as we install Microsoft products.























If you are trying on a local pc with no domain select "No". I selected yes to show you what is next.


























Important here is to type in the correct Domian Username.
I entered the same username under which the BizTalk Host was configured to run under.


















I could not identify first if its a MQ client or Server which was installed... but if you look at comments "IBM websphere MQ for windows".

Next I added a test message to the queue.













4. Now we will install the MQSeries Agent. If it is still grayed out means you did not install MQ Server correctly or you are missing some prerequistes :) . Nobody knows the exact set of prerequisites needed. Google will not help much here.
 This is where I was stuck at and nothing helped...I had MQ Client and MQ Fix pack all on the server....So I uninstalled everything from IBM and only installed IBM MQ Server 7.1.






















I entered the same username under which the BizTalk Host was configured to run under.























Once configured successfully it will create a MQSAgent2 in Component Services.
This MQSAgent2 Com+ service acts as a bridge between the MQSeries Adapter and IBM MQ Server. It should always be started.
To edit the configuration you should uncheck "Disable Changes" in Properties->Advanced .
Microsoft MQSAgent link
I did not do any changes to MQSAgent2.
























Once the receive location is configured it will pick the messages from the queue.






















It looks so simple right?...It took me 1 week to make this simple thing work :) 
The BizTalk host account should have full access to the Queue.

In the next post I will focus on all the Errors I received and how to fix them.
MQSeries Errors
Finally thanks to  our fellow BizTalker Steve Melan for the moral support he gave me when I saw wierd errors like dllhost.exe crashing with not much error info/RPC failing etc.