none
Why does resume suspended workflow in AppFabric give errors?

    Question

  • I'm running a couple of WF 4 services with Windows Server AppFabric. Sometimes an unhandled exception occurs in a workflow and it gets abandonded (if action on unhandled exception is set to "abandon"), or suspended (if action is set to "abandon and suspend").

    In the case of "abandon", the workflow is still "Running (active)" after the exception, and I expect AppFabric WorkflowManagementService to automatically continue the workflow from its last persisted point.

    In the case of "abandon and suspend", I excpet to be able to manually resume the workflow via the AppFabric Dashboard.

    In either case, this does not happen, but I get various error and warning messages in AppFabric Dashboard and Windows Event Viewer (Windows -> Application Server-System Services -> Admin):

    Error:

    Failed to invoke service management endpoint at 'net.pipe://jon-hp/Afis.Workflow/ServiceManagement.svc' to activate service '/Afis.Workflow/ATP.xamlx'.\rException: 'The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.'

    Error:

    Failed to Resume instance d626005a-63bd-4ab1-8192-62616755015c via control endpoint net.pipe://jon-hp/Afis.Workflow/ATP.xamlx/System.ServiceModel.Activities_IWorkflowInstanceManagement.\rException: System.TimeoutException: The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. Inner Exception: System.TimeoutException: The pipe connection was aborted because an asynchronous read from the pipe did not complete within the allotted timeout of 00:00:59.9989999. The time allotted to this operation may have been a portion of a longer timeout. Inner Exception: System.IO.PipeException: The operation cannot be completed because the pipe was closed. This may have been caused by the application on the other end of the pipe exiting..

    Warning (periodically every 20 minutes)

    WMS was not able to activate any of the hosts - backing off. Store name 'defaultSqlPersistenceStore' ('Root).

    Net.pipe is enabled for my web site and applications, and I can see the management endpoints listed in IIS Manager -> Endpoints -> Remove filter (System.ServiceModel.Activities.IWorkflowInstanceManagement).

    My application endpoints are running net.tcp with transport security and Windows authentication.

    This thread seems to be related, but I didn't manage to solve my problem from it:http://social.msdn.microsoft.com/Forums/en/dublin/thread/e1705e89-34cc-4526-b11e-9d67d66c403d

    (This post is cross-posted to Stacknbsp;http://stackoverflow.com/questions/10122679/why-do-resume-suspended-workflow-in-appfabric-give-errors)

    Thursday, April 12, 2012 12:06 PM

All replies

  • There could be a few items that need to be checked

    1)

    Ensure Net.pipe is enabled.

    Ensure that persistance store (either in web.config, or the global store via Appfabric configuration tool) is configured correctly with the right permissions.This means that the App fabric related windows services (Appfabric Event Collection service, App Fabric workflow management service ) are running using accounts with AS_Admin membership.

    Ensure that Workflow web app pool identity also has rights to the persistance store.

    For more security details see http://msdn.microsoft.com/en-us/library/ff817046.aspx 

    2)  Turn WCF tracing on and it will provide you with additional info to troubleshoot

    3) In the trace  logs,  check if the incoming WorkflowInstanceManagement is transacted

    for instance the action on the incoming message would be

    http://schemas.datacontract.org/2008/10/WorkflowServices/IWorkflowInstanceManagement/TransactedUnsuspend

    If no transaction is used it would simply be

    http://schemas.datacontract.org/2008/10/WorkflowServices/IWorkflowInstanceManagement/Unsuspend

    4) if transacted operations are used and it is a distributed transaction ( for instance workflow and sql server (persistence store) are on different machines), check Windows firewall rules to ensure  MSDTC is in the exception list


     <system.diagnostics>
        <sources>
         
          <source name="System.ServiceModel" switchValue="Information"  propagateActivity="false">
            <listeners>
                     <add name="DefaultListener">
                <filter type="" />
              </add>
                  </listeners>
          </source>
          <source name="CardSpace" switchValue="Warning" >
            <listeners>
              <add name="DefaultListener" />
            </listeners>
          </source>
          <source name="System.IO.Log" switchValue="Warning" >
            <listeners>
              <add name="DefaultListener"  />
            </listeners>
          </source>
          <source name="System.Runtime.Serialization" switchValue="Warning" >
            <listeners>
              <add name="DefaultListener" />
            </listeners>
          </source>
          <source name="System.IdentityModel" switchValue="Warning" >
            <listeners>
              <add name="DefaultListener" />
            </listeners>
          </source>
         </sources>
        <sharedListeners>
          
          <add name="DefaultListener"
            type="System.Diagnostics.XmlWriterTraceListener"
            initializeData="wcftrace.svclog" />
             </sharedListeners>
     
        <trace autoflush="true" indentsize="4">
        </trace>
      </system.diagnostics>




    • Edited by A.ELan Wednesday, May 09, 2012 3:39 AM
    Friday, May 04, 2012 7:40 AM