BizTalk Server Migration to 2016 - biztalk

Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'CSC.Integration.Orchestrations.LegacyBizTalkProcess(71c7729e-22ac-be38-00c0-0b11beaba439)'.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 296a4475-58f6-4fa4-8b90-65fe752e9872
Shape name: e_Logging
ShapeId: 919d78da-57e8-4ae1-bd2f-39859310c6de
Exception thrown from: segment 1, progress 20
Inner exception: The type initializer for 'CSC.AppBlocks.Logging.Logger' threw an exception.
Exception type: TypeInitializationException
Source: CSC.AppBlocks.Logging
Target Site: Void Write(CSC.AppBlocks.Logging.Category, System.String, System.String)
The following is a stack trace that identifies the location where the exception occured
at CSC.AppBlocks.Logging.Logger.Write(Category category, String message, String title)
at CSC
We are working on BizTalk migration to 2016 and in testing the application we are getting above error and we updated all Gacs and for this receive location we are using MSMQ adapter. But it is working in BizTalk server 2010.

Are you sure the DLL that contains the namespace CSC.AppBlocks.Logging is GAC'd?
Are there other DLLs that CSC.AppBlocks.Logging depends on that may not be GAC'd?
Did you restart the host instance after GAC'ing the DLL?
Is your DLL 32-bit only? If so, make sure you change your host instance settings to only run as a 32-bit process.
Is there an inner exception reported in any of the messages? Perhaps in the Event Viewer?

Related

BizTalk - Start 'Rule Engine Update Service' Errors

I'm on a QA environment, and can talk to the BizTalk Admin tomorrow. Apparently, I'm the first person to call a BizRule from an orchestration, and the orchestration is giving error:
Inner exception: The type initializer for 'Microsoft.RuleEngine.RuleEngineCache' threw an exception.
I checked, and the Rules Engine is configured on this machine. But the "Rule Engine Update Service" was not running. I tried to start it, and get this error in the "Services" tool:
"The Rule Engine Update Service service on Local Computer started and
then stopped. Some services stop automatically if they are not in use
by other services or programs."
I checked the event log, and for each time I tried to start it, I see this:
Service could not be started. :
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. System.InvalidCastException: Specified
cast is not valid.
Any ideas what I can do? I have admin privileges on the machine (BizTalk 2013/R2).
Our BizTalk Admin corrected the CacheEntries using RegEdit. The one on the right was the other server in the group that was working.

Unable to launch BizTalk admin console after BizTalk 2013 R2 CU1 install

The dev environment in our organization recently had the BizTalk CU patch installed. The existing version was BizTalk 2013 R2 and CU1 was installed over it.
After the upgrade the BizTalk admin console is not getting launched. The applications are running fine as some of them have been tested, however the following error pops up while trying to expand BizTalk group in the Administrator:
FX:{9A77C670-2FFD-4ab4-8F20-169C08FB8320}
Object reference not set to an instance of an object.
Exception Type : System.Null reference Exception
Exception Stack Trace:
at Microsoft.BizTalk.ExceptionMessageBox.BtsExceptionMessageBox.ReprocessManagementException(Exception exception, Exception newInnerException)
at Microsoft.BizTalk.ExceptionMessageBox.BtsExceptionMessageBox.ReprocessSpecificExceptions(Exception exception, Exception newInnerException)
at Microsoft.BizTalk.ExceptionMessageBox.BtsExceptionMessageBox.ReprocessExceptionRecursive(Exception exception)
at Microsoft.BizTalk.ExceptionMessageBox.BtsExceptionMessageBox..ctor(Exception exception, ExceptionMessageBoxButtons buttons, ExceptionMessageBoxSymbol symbol)
at Microsoft.BizTalk.SnapIn.Framework.FrameworkNotification.Show(Exception exception, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, Control staMarshaller, IWin32Window parent)
at Microsoft.BizTalk.Administration.SnapIn.GroupNode.FullRefresh(Object o, ResultsChangedEventArgs e)
at Microsoft.BizTalk.Administration.SnapIn.GroupNode.OnExpand(AsyncStatus status)
at Microsoft.ManagementConsole.NodeSyncManager.ProcessRequest(NodeRequestInfo info, IRequestStatus requestStatus)
at Microsoft.ManagementConsole.NamespaceSnapInBase.ProcessRequest(Request request)
at Microsoft.ManagementConsole.SnapIn.ProcessRequest(Request request)
at Microsoft.ManagementConsole.Internal.SnapInClient.Microsoft.ManagementConsole.Internal.IMessageClient.ProcessRequest(Request request)
at Microsoft.ManagementConsole.Internal.IMessageClient.ProcessRequest(Request request)
at Microsoft.ManagementConsole.Executive.RequestStatus.BeginRequest(IMessageClient messageClient, RequestInfo requestInfo)
at Microsoft.ManagementConsole.Executive.SnapInRequestOperation.ProcessRequest()
at Microsoft.ManagementConsole.Executive.Operation.OnThreadTransfer(SimpleOperationCallback callback)
Considering that it may be related to DTC, I restarted the DTC and WMI service and got the wirewall settings checked which seems to be fine. I also restarted the BizTalk box but that dint help.
Note -BizTalk and SQL are in different boxes and when I try connecting to the BizTalk group from another machine it does connect works fine from there.
Has anyone faced this issue, can you please highlight what might be a resolution to this?
This specific issue post CU1 update in BizTalk 2013 R2 can be fixed by executing the following command which fixes the potential WMI namespace corruption during the upgrade :
mofcomp "D:\Program Files (x86)\Microsoft BizTalk Server 2013\Bins32\BTSWMISchema.mof".
Please refer this for more details : Null reference exception when trying to open the BTS admin consoleā€¦

SignalR 2 fails on Azure

I deployed an ASP.NET 5 MVC 6 app on Azure, and ran into this problem with SignalR 2:
when starting connection from client, call to
/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B"name"%3A"gameHub"%7D%5D&_=1460028930688
fails with error 500.
The exception behind error 500 is this:
Exception Details:
System.Security.Cryptography.CryptographicException: The data
protection operation was unsuccessful. This may have been caused by
not having the user profile loaded for the current thread's user
context, which may be the case when the thread is impersonating.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[CryptographicException: The data protection operation was
unsuccessful. This may have been caused by not having the user
profile loaded for the current thread's user context, which may be the
case when the thread is impersonating.]
I read and tried solution suggested at SignalR CryptographicException on AzureWebsites, but id didn't work for me.
As I understand, Azure doesn't allow LoadUserProfile.
Any workaround?
I had the same problem and my fix was to add a call to UseAesDataProtectorProvider() before my call to MapSignalR(). Hope this helps someone.

BizTalk 2010 XLang PersistenceException error Persisting State to the Database

I have an odd BizTalk issue that only occurs in the Production environment. It started over the weekend. The error message from Event Viewer is at the end of this post.
I researched this online and all the possible solutions proposed by the gurus did not do the trick. On a lark, I exported the MSI from that Production BizTalk server and installed that MSI on a development machine. That Development BizTalk worked beautifully with the same file against a different SQL Server database (development DB).
Next, I went ahead and uninstalled and deleted that BizTalk application from the Production BizTalk server and re-imported & re-installed the same MSI (that was used on the aforementioned Development BizTalk machine). The same error occurred.
That leads me to ask what is probably a stupid question... would rebooting a production SQL Server (which more or less is verboten unless there are critical upgrades that need to be applied) solve this? The reason I ask this is because if the exact same MSI from the production BizTalk server worked elsewhere, but does not work on that one production BizTalk server.
Any ideas? Without further ado, here's the error message.
xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Xpress.BizTalk.P837.EDI_837P_5010_to_WorkTable_And_4010(dee9b36c-4d44-20a1-01b0-efc184ec3efb)'.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: d768edda-35ba-4bb1-a57d-347cc54ddf49
Shape name: Send 837P 4010
ShapeId: dcb098dc-9c6b-41b0-8511-c9a250de52b2
Exception thrown from: segment 1, progress 94
Inner exception: Exception occurred when persisting state to the database.
Exception type: PersistenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void Commit()
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()
at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)
at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore, XMessage msg)
at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, Context cxt, Segment seg, ActivityFlags flags)
at Xpress.BizTalk.P837.EDI_837P_5010_to_WorkTable_And_4010.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:
A batch item failed persistence Item-ID 433c9f39-f2c7-4ac3-ae29-32b990b20bdd OperationType MAIO_CommitBatch Status -1061151992 ErrorInfo The operation could not be performed because the message on which it was acting was not found in the database. .

Suspended orchestration service instance re-throwing the same unexpected exception after Resume

I am getting below error, when i am trying to resume Suspended(resumable) orchestration instance.
Scenario: Request went thourgh DB2 Static solicit - Response port, and it got failed because of access permission denied. I can see two instances suspended in the admin console one is related to port and another one is related to orchestration. After fixing the credentials, suspended port instance got resumed but the orchestration one is keep on failing.
Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Orchestration name'.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: ca927086-465d-40e8-93fe-c3a0e4c161f7
Shape name:
ShapeId:
Exception thrown from: segment -1, progress -1
Inner exception: An error occurred while processing the message, refer to the details section for more information
Message ID: {96B72521-9833-48EF-BB2F-4A2E2265D697}
Instance ID: {F6FBC912-C9DC-489C-87F3-103FA1273FDC}
Error Description: The user does not have the authority to access the host resource. Check your authentication credentials or contact your system administrator. SQLSTATE: HY000, SQLCODE: -1000
Exception type: XlangSoapException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32, Microsoft.XLANGs.Core.Context)
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope env, Int32 operationId, Context ctx)
at Microsoft.XLANGs.Core.Subscription.Receive(Segment s, Context ctx, Envelope& env, Boolean topOnly)
at Microsoft.XLANGs.Core.PortBase.GetMessageIdForSubscription(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
at Microsoft.XLANGs.Core.PortBase.GetMessageId(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
at (StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Any thoughts how to fix this?
Creating the above scenario using samples:
Go to BizTalk
samples/orchestrations/consumeWebservice
folder, install the
ConsumeWebService application and
publish POWebservice to IIS.
Change IIS Directory security
permissions for POWebservice, remove
anonymous or any other access.
Now drop the message you will see
suspended messages because of HTTP
status 401: Access Denied, then give
access to POWebservice either
anonymous or Windows.
Then resume
the suspended instances, one will
get disappear but
another(orchestration) one wont.
The orchestration will continue to fail with the exception because when it was suspended, the last persistence point was the receipt of the exception. This means that the orchestration will re-start (when resumed) and re-throw the exception.
Here's at article discussing some points at which orchestration state is persisted to the database: http://blogs.msdn.com/b/sanket/archive/2006/11/12/understanding-persistence-points-in-biztalk-orchestration.aspx
You can manipulate this to some extent in your orchestration design, as Richard Seroter discusses here, but generally you would do better to use failed message routing, enabling you to handle the failed messages, and terminate the failed orchestration instance.
Please correct me if I'm wrong, but is this not just normal biztalk behavior? I am not 100% sure so please let me know if this is wrong:
The outbound messaging instance was suspended because the credentials the port was using to connect to to the DB were wrong.
This caused the orchestrations making these calls to also suspend.
The suspended message instance was resumed and was processed correctly because the problem was fixed. So the call was made to the DB.
However, the orchestration instance may not be able to resume because when resumed it found itself at the most recent persistence point and the original error which was delivered back from the send port is still available to the orchestration, causing it to re-suspend.
In the error message, it actually says "If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception."
If you want to handle this sort of thing you could make the call to the database atomic. That way the orchestration will not persist itself at the point of making the DB call. If the orchestration then suspends it will resume at a point before the DB call is made, and will make the DB call as normal, which should succeed this time because you have fixed the original issue.
The only problem with this is if your DB call cannot be executed more than once with the same data without bad things happenning (is not idempotent).
I am not 100% on the above explaination. Please point out if my understanding is incorrect.
this scenario not treated by Microsoft Biztalk = Middleware FAIL.
you have to solve this at the orchestration design stage up front...
http://seroter.wordpress.com/2007/01/02/orchestration-handling-of-suspended-messages/

Resources