Tag Archives: Workflow Manager 1.0

FIXED – Workflow Manager Backend – Error 1067 / HTTP 500

Recently I came across Workflow errors and resolved by manually executing TSQL to update Workflow Resource and Workflow Instance tables.  Wild but true.  The SQL files can be found on the C:\ drive of the Workflow Manager server.  After running SQL, the windows service promptly started.

Details below on the error symptom and resolution.  Cheers!  shades_smile

Error Symptoms

  1. Windows Service.  Error 1067 – The process terminated unexpectedly.
  2. HTTP 500 – Internal Server Error Occurred when opening http://workflow:12291 or https://workflow:12290 in a web browser
  3. Register-SPWorkflowService : An internal error occured. For more details, please see the server logs. Client ActivityId :3033487b-7c53-4f17-ae08-8516c2ec0bef.

Resolution

  1. RDP to Workflow Manager
  2. Open “C:\Program Files\Workflow Manager\1.0\Workflow\” folder
  3. Open file “wfServerUpgradePolicy.config” and look for <wfupgrade targetVersion=”1.3.0.0”>
  4. Open SQL and execute “SELECT * FROM [StoreVersionTable]” on [WFResourceManagementDB]
  5. Compare CONFIG file to to SQL table versions
    1. They mismatch.  This the root cause of errors above.
  6. Open “C:\Program Files\Workflow Manager\1.0\Workflow\” folder
  7. Execute SQL scripts to update
    1. WorkflowServiceInstanceManagementDBUpgradeScript.sql
    2. WorkflowServiceResourceManagementDBUpgradeScript.sql
  8. Register-SPWorkflowService -SPSite http://sharepoint -WorkflowHostUri http://workflowserver:12291 -AllowOAuthHttp -Force
  9. Test to verify

Error Screenshots

image

image

image

Resolution Screenshots

image

image

image

image

image

image

image

image

enter image description here

Reference

FIXED – Workflow Endpoint Not Found Exception: Unable to connect to the remote service

Recently I noticed the below error when viewing Workflow status on SharePoint Server 2013.   Root cause turned out to be a missing IIS binding for both HTTP: 12291 and HTTPS: 12290.   After adding the additional IIS binding the status page was able to render again.  Cheers!

shades_smile

Error

Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type ‘System.Web.HttpUnhandledException’ was thrown. —> Microsoft.Workflow.Client.WorkflowEndpointNotFoundException: Unable to connect to the remote service at http://sharepointwf:12291/SharePoint/default/c1740af1-82ad-4026-beb5-c6eddaea7d88/4d2c8da0-a0da-41c1-8387-96260df02a62/$Workflows/$Instances/4d10f51f-2e21-4ff7-aa3c-ceadde059a14. See InnerException for more details. Client ActivityId : 69ee049e-ffb2-209a-6826-71aedbaa6db7. —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:12291   
  at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)   
  at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)     –
— End of inner exception stack trace —   
  at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)

Screenshots

image

image

image

image

Configuring Workflow Manager 1.0 on SharePoint 2013 (screenshots)

During my first attempt to enable Workflow Manager 1.0 on a local VM I ran into the following error:

—> System.InvalidOperationException: Program C:\Program Files\Windows Fabric\bin\Fabric\Fabric.Code.1.0\FabricDeployer.exe exited with error: Windows Fabric deployment failed.DeploymentValidator: warning: The Fabric Data Collection Agent is disabled for this deployment.
None of the declared nodes is for the current machine.

The steps I took to resolve were:

  1. Start \ Programs \ Workflow Manager 1.0 \ Workflow Manager Configuration \ Remove from Farm     (not to be confused with SharePoint “farm”)
  2. Drop SQL databases for Workflow Manager.   (SbGatewayDatabase, SbManagementDB, SBMessageContainer01, WFInstanceManagementDB, WFManagementDB, WFResourceManagementDB)
  3. Start \ Programs \ Workflow Manager 1.0 \ Workflow Manager Configuration \ Configure Workflow Manager with Default Settings (Recommended)
  4. Two things I did differently on the next pass: 
    1. I used the SQL alias “SPSQL” instead of the FQDN machine names.   I’m using that for SharePoint and prefer SQL aliases for management flexibility.
    2. I formatted the user name as “DEMO\SPFARM” instead of “SPFARM@DEMO” (default text value).   That seems to make more sense for AD login credentials and I didn’t understand why the default was more of an email syntax.
    3. I commented out all of the HOSTS file entries.  While this may not be related, I wanted to simplify the connections as much as possible.   I had “127.0.0.1” entries for the local machine to ensure connectivity even as a change VM host network settings, but removed while running the WF configuration wizard.
  5. Ran the wizard just like before and it completed successfully this time.

 

Now I can continue the steps outlined at http://technet.microsoft.com/en-us/library/jj658588(v=office.15) and run the PowerShell cmdlet Register-SPWorkflowService

 

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

 

 

=========================================================================

Configuration for Workflow Manager
Management Database SQL Instance    SP15.demo.com
Enable SSL connection with SQL Server instance    False
Authentication    Windows Authentication
Management Database Name    WFManagementDB
Instance Management Database SQL Instance    SP15.demo.com
Enable SSL connection with SQL Server instance    False
Authentication    Windows Authentication
Instance Management Database Name    WFInstanceManagementDB
Resource Management Database SQL Instance    SP15.demo.com
Enable SSL connection with SQL Server instance    False
Authentication    Windows Authentication
Resource Management Database Name    WFResourceManagementDB
RunAs Account    spfarm@DEMO
RunAs Password    ***********
Certificate Generation Key    ***********
Workflow Manager Outbound Signing Certificate    Auto-generated
Service SSL Certificate    Auto-generated
Encryption Certificate    Auto-generated
Workflow Manager Management Port    12290
HTTP Port    Disabled
Enable firewall rules on this computer    True
Administrators Group    BUILTIN\Administrators
Configuration for Service Bus
Management Database SQL Instance    SP15.demo.com
Enable SSL connection with SQL Server instance    False
Authentication    Windows Authentication
Management Database Name    SbManagementDB
Gateway Database SQL Instance    SP15.demo.com
Enable SSL connection with SQL Server instance    False
Authentication    Windows Authentication
Gateway Database Name    SbGatewayDatabase
Message Container SQL Instance    SP15.demo.com
Enable SSL connection with SQL Server instance    False
Authentication    Windows Authentication
Message Container Database Name    SBMessageContainer01
RunAs Account    spfarm@DEMO
RunAs Password    ***********
Certificate Generation Key    ***********
Farm Certificate    Auto-generated
Encryption Certificate    Auto-generated
HTTPS Port    9355
TCP Port    9354
Message Broker Port    9356
Internal Communication Port Range    9000 – 9004
Enable firewall rules on this computer    True
Administrators Group    BUILTIN\Administrators

 

=========================================================================

# To be run in Workflow Manager PowerShell console that has both Workflow Manager and Service Bus installed.
# Create new SB Farm
$SBCertificateAutoGenerationKey = ConvertTo-SecureString -AsPlainText -Force -String '***** Replace with Service Bus Certificate Auto-generation key ******' -Verbose;
New-SBFarm -SBFarmDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=SbManagementDB;Integrated Security=True;Encrypt=False' -InternalPortRangeStart 9000 -TcpPort 9354 -MessageBrokerPort 9356 -RunAsAccount 'spfarm@DEMO' -AdminGroup 'BUILTIN\Administrators' -GatewayDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=SbGatewayDatabase;Integrated Security=True;Encrypt=False' -CertificateAutoGenerationKey $SBCertificateAutoGenerationKey -MessageContainerDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=SBMessageContainer01;Integrated Security=True;Encrypt=False' -Verbose;
# To be run in Workflow Manager PowerShell console that has both Workflow Manager and Service Bus installed.
# Create new WF Farm 
$WFCertAutoGenerationKey = ConvertTo-SecureString -AsPlainText -Force -String '***** Replace with Workflow Manager Certificate Auto-generation key ******' -Verbose;
New-WFFarm -WFFarmDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=WFManagementDB;Integrated Security=True;Encrypt=False' -RunAsAccount 'spfarm@DEMO' -AdminGroup 'BUILTIN\Administrators' -HttpsPort 12290 -HttpPort 12291 -InstanceDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=WFInstanceManagementDB;Integrated Security=True;Encrypt=False' -ResourceDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=WFResourceManagementDB;Integrated Security=True;Encrypt=False' -CertificateAutoGenerationKey $WFCertAutoGenerationKey -Verbose;
# Add SB Host $SBRunAsPassword = ConvertTo-SecureString -AsPlainText -Force -String '***** Replace with RunAs Password for Service Bus ******' -Verbose;
Add-SBHost -SBFarmDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=SbManagementDB;Integrated Security=True;Encrypt=False' -RunAsPassword $SBRunAsPassword -EnableFirewallRules $true -CertificateAutoGenerationKey $SBCertificateAutoGenerationKey -Verbose;
Try {
	# Create new SB Namespace New-SBNamespace -Name 'WorkflowDefaultNamespace' -AddressingScheme 'Path' -ManageUsers 'spfarm@DEMO','spfarm@DEMO' -Verbose;
	Start-Sleep -s 90
} Catch [system.InvalidOperationException] { } 
# Get SB Client Configuration 
$SBClientConfiguration = Get-SBClientConfiguration -Namespaces 'WorkflowDefaultNamespace' -Verbose;
# Add WF Host $WFRunAsPassword = ConvertTo-SecureString -AsPlainText -Force -String '***** Replace with RunAs Password for Workflow Manager ******' -Verbose;
Add-WFHost -WFFarmDBConnectionString 'Data Source=SP15.demo.com;Initial Catalog=WFManagementDB;Integrated Security=True;Encrypt=False' -RunAsPassword $WFRunAsPassword -EnableFirewallRules $true -SBClientConfiguration $SBClientConfiguration -CertificateAutoGenerationKey $WFCertAutoGenerationKey -Verbose;

=========================================================================

Configuration operation partially succeeded.  Use ‘Join an Existing farm’ to complete the configuration.

[Error] [3/27/2013 9:53:08 AM]: System.Management.Automation.CmdletInvocationException: Program C:\Program Files\Windows Fabric\bin\Fabric\Fabric.Code.1.0\FabricDeployer.exe exited with error: Windows Fabric deployment failed.DeploymentValidator: warning: The Fabric Data Collection Agent is disabled for this deployment.
None of the declared nodes is for the current machine.

—> System.InvalidOperationException: Program C:\Program Files\Windows Fabric\bin\Fabric\Fabric.Code.1.0\FabricDeployer.exe exited with error: Windows Fabric deployment failed.DeploymentValidator: warning: The Fabric Data Collection Agent is disabled for this deployment.
None of the declared nodes is for the current machine.

 

   at Microsoft.ServiceBus.Commands.Common.ProcessHelper.RunCommandInProcess(String exeName, String arguments, String errorString)
   at Microsoft.ServiceBus.Commands.AddSBHost.ProcessRecordImplementation()
   at Microsoft.ServiceBus.Commands.ServiceBusBaseCmdlet.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
   — End of inner exception stack trace —
   at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Workflow.Deployment.ConfigWizard.CommandletHelper.InvokePowershell(Command command, Action`3 updateProgress)
   at Microsoft.Workflow.Deployment.ConfigWizard.ProgressPageViewModel.AddSBNode(FarmCreationModel model, Boolean isFirstCommand)

=========================================================================

Starting
Validating input and configuration parameters.
Installing auto-generated certificate.
Granting ‘Log on as Service’ privilege to the run as account.
Windows Fabric configuration started.
Running Windows Fabric deployment.
Program C:\Program Files\Windows Fabric\bin\Fabric\Fabric.Code.1.0\FabricDeployer.exe exited with error: Windows Fabric deployment failed.DeploymentValidator: warning: The Fabric Data Collection Agent is disabled for this deployment.
None of the declared nodes is for the current machine.

Return to Top ▲Return to Top ▲