A few days ago I wrote a post about these same warning messages from WCF-SAP Adapter: The adapter “WCF-SAP” raised an error message. Details “System.ServiceModel.CommunicationObjectFaultedException: The communication object, Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredInboundChannel cannot be used for communication because it is in the Faulted state.
The adapter “WCF-SAP” raised an error message. Details “Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_INVALID_HANDLE. AdapterErrorMessage=An exception has occurred on the listener while executing RfcWaitForRequest..
The adapter “WCF-SAP” raised an error message. Details “The WCF service host at address “sap://CLIENT=[SAPClientID];LANG=[LANG];@A/[SAPServer]/[SystemID]?ListenerGwServ=[GWServer]&ListenerGwHost=[GwHost]&ListenerProgramId=[ProgID]&RfcSdkTrace=True&AbapDebug=False” has faulted and as a result no more messages can be received on the corresponding receive location. To fix the issue, BizTalk Server will automatically attempt to restart the service host.”
The adapter “WCF-SAP” raised an error message. Details “System.ServiceModel.CommunicationObjectFaultedException: The communication object, Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredInboundChannel`1[System.ServiceModel.Channels.IReplyChannel], cannot be used for communication because it is in the Faulted state.
I told at the time that these are generic error messages and does not provide what is really the problem.
These warnings occur, normally, when BizTalk is trying to connect to a SAP system to receive the IDOC and, again, most of the times these are related with connectivity issue or permissions between BizTalk and SAP.
Normally, the reason for these warnings could be any of the following options:
- There may be a problem with the SAP system.
- Maybe BizTalk Server don’t have the proper authorization to connect with that particular SAP program id
- Check my previous post here
- Also, some times is a configuration problem in the Receive Location in your BizTalk Server
- Sometimes, setting the Receive Timeout to its maximum value: 24.20:31:23.6470000 (24 days), may solve some cases (BizTalk Adapter Pack – SAP Binding ReceiveTimeout by Kent Weare)
There are some options for you to try to find more details about this warnings:
- You can use external tools, like Wireshark, to dig deep into network traffic and inspect individual packets for clues
- You may enable the RfcSdkTrace in the WCF-SAP port configuration to be able to see all the traces.
- Or another useful option is to setup WCF tracing to see the underlying error.
But what I realized today is that sometimes these warnings may occur and none of the assumptions described above fit into the actual problem.
While I was migrating and configuring one BizTalk solution, I forgot to start the incoming IDOC subscriber (in this case an orchestration) which caused my messages to stay Suspended in a Non-resumable way, raising a “no subscribers were found” error
The Messaging engine failed to process a message submitted by adapter:WCF-SAP Source URL: sap://CLIENT=[SAPClientID];LANG=[LANG];@A/[SAPServer]/[SystemID]?ListenerGwServ=[GWServer]&ListenerGwHost=[GwHost]&ListenerProgramId=[ProgID]&RfcSdkTrace=True&AbapDebug=False. Details: The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.
And as you can see in the print screen bellow this error will generate also the appearance of the WCF-SAP warnings in the event viewer… although there is no problem in connectivity between BizTalk and SAP, and all the messages (IDOC) are being received and reached BizTalk
In this particular case the solution is really simple, just create, or set correctly, one subscribe (Orchestration or send port with a filter) for the incoming IDOCs.