Wednesday, October 22, 2014

Errors: BizTalk MQSeries Adapter

Error No1:

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.

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

Error No2:

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

Error No3:

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.".
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:

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

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

Error No5:

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

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

Error No6:

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

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:
Server Application Name: MQSAgent2
The serious nature of this error has caused the process to terminate.
Exception: C06D007E
Address: 0x76FFC42D

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

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:


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.

27.11.2014 11:14:26 - Process(7120.11) User(xxxxxx) Program(amqzlaa0.exe) Host(xxxxxx) Installation(Installation1) VRMF( 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.

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

Error No 8:

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

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.

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

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

Saturday, September 20, 2014

Failed to create the SQL database Source="SSO"

Recently I tried to configure BizTalk 2010 on which Visual Studio 2010 was already installed.
I could not configure SSO and got the following error message in the log file.

Failed to create the SQL database Source="SSO" HelpID=""><Exception Message="(0xC0002A21) An error occurred while attempting to access the SSO database.

It also said to check the eventlog for more details but there was no error in Eventlog.

Finally I traced the issue that it was because of  the  missing folders on the SQL Server machine so SQL Server could not create the databases and log files.
I found it out by using SQL Profiler and activating all types of Events.

I knew of many SSO Errors so tried everything like registering SSOSQL.dll and other fixes but never imagined it could be because of SQL not been configured properly.

Monday, August 25, 2014

BizTalk 2013 R2 database migration from SQL 2012 to 2014

On my Virtual PC which had BizTalk 2013 R2 configured with SQL 2012 as database server I thought of installing SQL 2014 and try using the new features of Column Store and see how it can help run the Integrations faster.
In this post I will show you how I migrated my existing BizTalk databases from SQL 2012 to 2014 which is installed on the machine.

  •  Take Backup of all BizTalk databases from SQL 2012 and Restore it on to SQL 2014.
  •  Create Scripts of all BizTalk SQL Jobs from SQL 2012 and execute it on to SQL 2014.
  •  Create Scripts of all BizTalk SQL Logins from SQL 2012 and execute it on to SQL 2014.
  •  Update the SampleUpdateInfo.xml file found in the following location with info of the current and the new SQL Server. For me current SQL 2012 was on KIWI server and the New SQL 2014 Server is on KIWI\SQL14.
    C:\Program Files (x86)\Microsoft BizTalk Server 2010\Bins32\Schema\Restore
  •  Run the UpdateDatabase.vbs file which is found in the same folder which updates the Server references in the tables on the new SQL Server.
  •  Run the UpdateRegistry.vbs file which is found in the same folder which updates the System Registry key references on the Server.
  •  Finally I went into BizTalk Admin Console to check if the references were updated successfully and yes it did update everything.

Finally I would give credit to the following old Microsoft document which still holds true for  the new versions of BizTalk\SQL Server ;).
How to Restore Your Databases

Wednesday, July 9, 2014

Upgrading bug: BizTalk 2010 to BizTalk 2013 R2

Upgrading has been made easy with newer versions of BizTalk. I recently upgraded the BizTalk software from 2010 version to 2013 R2.
Here are few screenshots....Important is the last screenshot.. :)

Here it talks about Pre-Actions required.
Stop WorldWide Web Publishing Service.
Start Enterprise SIngle SignOn Service.

Since I had selected to install Developer Tools gives me an Error with missing prerequisites.
I installed Visual Studio 2013 and then continued on.

"Buckle your seatbelts....there are no Airbags to save you in this crash ride".
Microsoft will not rollback the databases if the Upgrade fails.
I did ensure that I had a backup of all the databases.

Forgot to stop RuleEngine Update Service.

And Finally the surprise...........

Seems Microsoft forgot to rename the Folder from "BizTalk Server 2010" in Program Files to "BizTalk Server 2013 R2" but product got upgraded successfully.

Hope they will fix this soon ;).

Monday, January 27, 2014

BizTalk 2013 Installation Bug: Enterprise Single Sign-On Error

While Installing BizTalk I received the following Error that Enterprise Single Sign-On should be installed manually.

Well this had not occured while installing previous versions of BizTalk. So I was a little bit curious as to what am I missing on the Server.
So I started installing the redistributable prerequisites manually as this is what BizTalk installation does first.

What I noticed is 
After installing .Net Framework 4.5 from the .cab file I tried to run the BizTalk installation again as normal and selected the .cab file I downloaded.
And it worked fine and BizTalk 2013 was installed successfully with Enterprise Single Sign-On and all other features.
So seems Enterprise Single Sign-On  installation needs .Net Framework 4.5 to be in  place before it can be installed and BizTalk Installation is messing it up somewhere while installing the redistributable prerequisites.

BAM configuration failure in BizTalk 2013

Seems the BizTalk 2013 Installation software has not been tested properly.
I got many errors which I could google and fix it but this one was odd about BAM configuration failed with following error.

ERROR: Encountered error while executing command on SQL Server "".A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)The system cannot find the file specified (Microsoft.BizTalk.Bam.CfgExtHelper.Utility)
[ Error BAMConfigWizExt] 

Solution was to install the latest Cumulative update and try again without Server restart and it worked fine and BAM was configured correctly.
BizTalk Cumulative Update Link

Till now Core Product configuration(SSO,Group,Runtime) was not messed up by Microsoft in all versions (2004 till 2010) I installed/configured. I normally used to install Cumulative update after I am done configuring default BizTalk features or maybe it was a wrong way of doing it  :) .