none
Configuring Workflow Manager for SharePoint 2013

    Question

  • I have gone through the configurations of Workflow and SharePoint to use the new Workflow Manager 1.0 several times now, and keep getting the below errors.

    My environment is set up with 2 servers, 1 SP Web Applicatin and 1 SQL. Workflow is installed on the SQL server. These errors are from the SQL Server. 

    Event ID 22

    Service Bus exception swallowed at location ServiceBusNamespaceListener.GetSessionAndStateWithRetryAsyncResult.HandleException. Microsoft.ServiceBus.Messaging.MessagingException: The token provider service was not avaliable when obtaining a token for 'https://srv22.domain.com:9355/WorkflowDefaultNamespace/$STS/Windows/'. ---> Microsoft.ServiceBus.TokenProviderException: The token provider service was not avaliable when obtaining a token for 'https://srv22.domain.com:9355/WorkflowDefaultNamespace/$STS/Windows/'. ---> System.Net.WebException: The remote server returned an error: (502) Bad Gateway.
       at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
       at System.Net.HttpWebRequest.GetRequestStream()
       at Microsoft.ServiceBus.TokenProviderHelper.GetWindowsAccessTokenCore(IEnumerator`1 stsUris, Func`2 uriBuilder, String requestToken, TimeSpan timeout, DateTime& expiresIn)
       --- End of inner exception stack trace ---
       at Microsoft.ServiceBus.TokenProviderHelper.ThrowException(Uri requestUri, WebException exception)
       at Microsoft.ServiceBus.TokenProviderHelper.GetWindowsAccessTokenCore(IEnumerator`1 stsUris, Func`2 uriBuilder, String requestToken, TimeSpan timeout, DateTime& expiresIn)
       at Microsoft.ServiceBus.WindowsTokenProvider.OnBeginGetToken(String appliesTo, String action, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.TokenProvider.GetTokenAsyncResult..ctor(TokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.TokenProvider.BeginGetToken(String appliesTo, String action, Boolean bypassCache, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingToken(ITokenProvider tokenProvider, Uri baseAddress, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
       --- End of inner exception stack trace ---
    
    Server stack trace: 
       at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingToken(ITokenProvider tokenProvider, Uri baseAddress, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageCreator.GetAuthorizationHeader(String action)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageCreator.CreateWcfMessageInternal(String action, Object body, Boolean includeToken)
       at Microsoft.ServiceBus.Messaging.Sbmp.AcceptMessageSessionForNamespaceAsyncResult..ctor(SbmpMessagingFactory messagingFactory, ReceiveMode receiveMode, Int32 prefetchCount, CreateControlLinkSettings controlLinkSettings, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessagingFactory.OnBeginAcceptMessageSession(ReceiveMode receiveMode, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.Messaging.MessagingFactory.AcceptMessageSessionAsyncResult.<GetAsyncSteps>b__29(AcceptMessageSessionAsyncResult thisPtr, TimeSpan t, AsyncCallback c, Object s)
       at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.EnumerateSteps(CurrentThreadType state)
    
    Exception rethrown at [0]: 
       at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at Microsoft.Workflow.Dispatcher.ServiceBusNamespaceListener.GetSessionAndStateWithRetryAsyncResult.EndAsyncResult(IAsyncResult result)
       at Microsoft.Workflow.Common.BackoffRetryAsyncResult.IsolateWithRetry(IAsyncResult result)

    Event ID 370

    The Workflow Manager cannot contact Service Bus service after retrying for '12' minutes. Please verify if the Service Bus service is up and running. The Workflow Manager failed at location 'ServiceBusNamespaceListener.GetSessionAndStateWithRetryAsyncResult.HandleException' due to exception: Microsoft.ServiceBus.Messaging.MessagingException: The token provider service was not avaliable when obtaining a token for 'https://srv22.domain.com:9355/WorkflowDefaultNamespace/$STS/Windows/'. ---> Microsoft.ServiceBus.TokenProviderException: The token provider service was not avaliable when obtaining a token for 'https://srv22.domain.com:9355/WorkflowDefaultNamespace/$STS/Windows/'. ---> System.Net.WebException: The remote server returned an error: (502) Bad Gateway.
       at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
       at System.Net.HttpWebRequest.GetRequestStream()
       at Microsoft.ServiceBus.TokenProviderHelper.GetWindowsAccessTokenCore(IEnumerator`1 stsUris, Func`2 uriBuilder, String requestToken, TimeSpan timeout, DateTime& expiresIn)
       --- End of inner exception stack trace ---
       at Microsoft.ServiceBus.TokenProviderHelper.ThrowException(Uri requestUri, WebException exception)
       at Microsoft.ServiceBus.TokenProviderHelper.GetWindowsAccessTokenCore(IEnumerator`1 stsUris, Func`2 uriBuilder, String requestToken, TimeSpan timeout, DateTime& expiresIn)
       at Microsoft.ServiceBus.WindowsTokenProvider.OnBeginGetToken(String appliesTo, String action, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.TokenProvider.GetTokenAsyncResult..ctor(TokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.TokenProvider.BeginGetToken(String appliesTo, String action, Boolean bypassCache, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingToken(ITokenProvider tokenProvider, Uri baseAddress, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
       --- End of inner exception stack trace ---
    
    Server stack trace: 
       at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingToken(ITokenProvider tokenProvider, Uri baseAddress, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageCreator.GetAuthorizationHeader(String action)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageCreator.CreateWcfMessageInternal(String action, Object body, Boolean includeToken)
       at Microsoft.ServiceBus.Messaging.Sbmp.AcceptMessageSessionForNamespaceAsyncResult..ctor(SbmpMessagingFactory messagingFactory, ReceiveMode receiveMode, Int32 prefetchCount, CreateControlLinkSettings controlLinkSettings, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessagingFactory.OnBeginAcceptMessageSession(ReceiveMode receiveMode, TimeSpan timeout, AsyncCallback callback, Object state)
       at Microsoft.ServiceBus.Messaging.MessagingFactory.AcceptMessageSessionAsyncResult.<GetAsyncSteps>b__29(AcceptMessageSessionAsyncResult thisPtr, TimeSpan t, AsyncCallback c, Object s)
       at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.EnumerateSteps(CurrentThreadType state)
    
    Exception rethrown at [0]: 
       at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at Microsoft.Workflow.Dispatcher.ServiceBusNamespaceListener.GetSessionAndStateWithRetryAsyncResult.EndAsyncResult(IAsyncResult result)
       at Microsoft.Workflow.Common.BackoffRetryAsyncResult.IsolateWithRetry(IAsyncResult result).

    The error messages suggested to me that the issue was being caused by our proxy server. I have removed the proxy server from the equation by removing the proxy settings. 

    I then also tried to navigate to the url in the error messages. When i navigate to https://srv22.domain.com:9355/WorkflowDefaultNamespace/$STS/Windows/ i get a 400 Bad Request. When i change the address to https://srv22.domain.com:9355/WorkflowDefaultNamespace/$sts/Windows/ ($sts in Lower Case rather than Upper Case) i get a response from the Workflow server. 

    I have searched high and low for a solution to this, and cannot find one, can anybody shed any light on the situation.

    Thanks in advance

    Paul

    Friday, March 07, 2014 11:40 AM

All replies