I have been installed the Workflow Manager by following the mentioned instructions in Install and Configure Workflow Manager In SharePoint 2013? that had been installed properly,
But when I tried to configure the SharePoint host to use a workflow service via running Register-SPWorkflowService cmdlet, I got the following error!
Register-SPworkflowservice : unable to connect to the remote service
This Issue usually occurs because of using incorrect port (12990) in “WorkflowHostUri” parameter within Register-SPWorkflowService cmdlet that should be the same port that was provided during configuring the Workflow Manager port as shown below.
Keep in mind,
- By default, The port (12290) is for HTTPs and (12291) for HTTP.
- It shouldn’t be like the mentioned example in Microsoft TechNet where it mentioned “12990”, not as default port “12290” as shown below.
I investigated this issue by doing the following:
- Check if the used port in “WorkflowHostUri” parameter within Register-SPWorkflowService is opened via “telnet” command.
- Open Command prompt as administrator.
- Telnet the port as this syntax “telnet ServerIP Port“,
- If it is unable to connect, that mean the provided port is not the same as the port that provided during configuring workflow manager.
If Telnet command was not recognized, you should check ‘telnet’ is not recognized as an internal or external command, operable program or batch file to enable it.
- Now, you should try again to Register-SPWorkflowService using the provided port that set during configuring the Workflow Manager!
- If you didn’t remember the used port, you should run the following cmdlet to get the workflow configuration details.
Get-WFFarm | select httpport,httpsport
- Now, Register your workflow with the shown port based on it is HTTP or HTTPS.
SPSite: Specifies a site collection to configure.
It seems that each site collection needs to be registered with workflow service. But actually it’s not 100% correct, once you have registered a workflow service to any SharePoint site collection within the farm, it will be enabled for all SharePoint web applications / site collections. I am pretty sure from this behavior and that what I got on my farm.
WorkflowHostUri: Specifies a string of the full URI for the Workflow Service.
The provided ports must be the same provided ports in the Configure Ports step as above mentioned by default it’s 12291 for HTTP and 12290 for HTTPS.
Register-SPWorkflowService -SPSite 'https://myhost/mysite' -WorkflowHostUri 'http://workflowhost:12291'
- The workflow should now be registered properly.
In next section, I will demonstrate How to check the Workflow Manager Connectivity Status?
- Open IIS > From left side expand Sites > Workflow Management Site.
- From right side > Click Browse.
- The following page should be shown and that mean the workflow manager has been connected and registered properly.
- Open SharePoint Designer > Workflows > Create Site Workflow > In Platform Type the SharePoint 2013 Workflow should be listed.
- Open Central Administration > Application Management > Application Services > Click on Workflow Service Application Proxy.
See also, How to Install and Configure Workflow Manager In SharePoint 2013?