Scenario

Trying to install and configure WorkFlow Manager 1.0. At the time of the configuration, it fails with the following error: "Configuration Operation Partially succeeded. Use 'join an existing farm' to complete the configuration". Like this:

 

 

Event Log( Microsoft WorkFlow Admin Log)

 

Log Name: Microsoft-Workflow/Admin, Event ID 702, Source: Microsoft-Workflow

 

System.TimeoutException: Could not successfully create management Service Bus entity 'WF_Management/WFTOPIC' with multiple retries within a timespan of 00:02:05.7114291.. The exception of the last retry is: The token provider service was not avaliable when obtaining a token for 'https://kf-sp.krossfarm.com:9355/WorkflowDefaultNamespace/$STS/Windows/'..  ---> Microsoft.ServiceBus.Messaging.MessagingException: The token provider service was not avaliable when obtaining a token for 'https://.kf-sp.krossfarm.com:9355/WorkflowDefaultNamespace/$STS/Windows/'. ---> Microsoft.ServiceBus.TokenProviderException: The token provider service was not avaliable when obtaining a token for 'https://kf-sp.krossfarm.com:9355/WorkflowDefaultNamespace/$STS/Windows/'. ---> System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
   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.OnBeginGetWebToken(String appliesTo, String action, TimeSpan timeout, AsyncCallback callback, Object state)
   at Microsoft.ServiceBus.TokenProvider.GetWebTokenAsyncResult..ctor(TokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout, AsyncCallback callback, Object state)
   at Microsoft.ServiceBus.TokenProvider.BeginGetWebToken(String appliesTo, String action, Boolean bypassCache, TimeSpan timeout, AsyncCallback callback, Object state)
   at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
   --- End of inner exception stack trace ---
  
Server stack trace:
   at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
   at Microsoft.ServiceBus.Messaging.HttpWebRequestExtensions.AddAuthorizationHeader(HttpWebRequest request, ITokenProvider tokenProvider, Uri baseAddress, String action)
   at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.CreateOrUpdateAsyncResult`1.<GetAsyncSteps>d__7.MoveNext()
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.EnumerateSteps(CurrentThreadType state)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.Start()
  
Exception rethrown at [0]:
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.ServiceBus.NamespaceManager.CreateOrUpdateTopicAsyncResult.CreateDescription(CreateOrUpdateTopicAsyncResult thisPtr, IAsyncResult r)
   at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.EnumerateSteps(CurrentThreadType state)
  
Exception rethrown at [1]:
   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.Workflow.Management.ManagementEntitiesCreator.CreateManagementEntitiesAsyncResult.EndCreateTopic(IAsyncResult result)
   at Microsoft.Workflow.Common.BackoffRetryAsyncResult.IsolateWithRetry(IAsyncResult result)
   --- End of inner exception stack trace ---
   at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.Workflow.Administration.ServiceUpdateManager.CreateManagementEntities(IList`1 namespaceManagerUris, ServiceBusClientCredentialType clientCredentialType, IDictionary`2 arguments, TimeSpan retryTimeout)
   at Microsoft.Workflow.Deployment.Commands.WorkflowServiceConfigHelper.SetWFRuntimeSettings(String resourceDBConnectionString, String config)
   at Microsoft.Workflow.Deployment.Commands.AddWFHost.CallWFRuntimeSettings(Service wfserviceInfo, String unencryptedResourceConnectionString)

 

Issue

 Clearly, the issue is with Service Bus and setup is unable to connect to it. There are a couple of reasons for this error.

  • Service account under which Workflow Manager will run doesn’t have permission on the WF & SB databases.
  • Run As account is not in local admin group.
  • Server has proxy settings in place.
  • Run as Account Is not in proper format.

 

Resolution

  • Make sure the Run As Account has proper permissions. Set that account as DBO on all WF and SB databases.
  • Make sure server has internet access and disable the proxy settings or make sure local address bypass enabled. You can check open IE > Internet Options > Connection Tab > Lan Settings>. Make sure check box is checked  "Bypass proxy server for local addresses".
  •  Make sure firewall is not blocking that access.
  • Enter the Run As account in proper format i.e kfsp@krossfarm.com
  • Add Run As account in local admin group.