Register-SPworkflowservice unable to connect to the remote service In Workflow Manager

In this article, I will solve the below SharePoint Workflow Manager Issue

Register-SPworkflowservice : unable to connect to the remote service


Scenario

I have installed the SharePoint 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 by running  Register-SPWorkflowService cmdlet, I got the below error!

Register-SPworkflowservice : unable to connect to the remote service

Register-SPworkflowservice : unable to connect to the remote service


Cause

The “Register-SPworkflowservice : unable to connect to the remote service” Issue usually occurs because of using incorrect port (12990) at”WorkflowHostUri” parameter in Register-SPWorkflowService cmdlet.

  • This Port must be opened on all Workflow Manager Servers.
  • This port should be the same port that has been provided during configuring the Workflow Manager port as shown below.

Configure WF Ports

Note: By default, The port (12290) is for HTTPs and (12291) for HTTP.

The port mentioned in Microsoft TechNet example is not correct, it is mentioned “12990”, not as the default port “12290” as shown below.

Register-SPworkflowservice cmdlet


Solution

I have investigated this issue by doing the following:

Check if the used port at “WorkflowHostUri” parameter in Register-SPWorkflowService is opened via “telnet” command.

  • Open Command prompt as administrator.

Run Command Prompt As Administrator

  • Telnet the port (telnet  ServerIP  Port),  If it is unable to connect, that means
    • The provided port is not the same as the port that provided during configuring workflow manager.
    • Or it’s the correct port but it is not opened, so you should ask your network Admin to open it on all Workflow Manager Servers within the farm.

check port connectivity via telnet command

If Telnet command is not recognized, you should check ‘telnet’ is not recognized as an internal or external command, operable program or batch file to enable it.


Get the SharePoint Workflow Manager details using PowerShell

Make sure that the provided port is the correct one that has been used during configuring the Workflow Manager!

If you didn’t remember the used port, run the below cmdlet to get the workflow configuration details.

Get-WFFarm | select httpport,httpsport

Get-WFFarm

Run again the “Register-SPworkflowservice” with the shown port based on your configuration (HTTP or HTTPS).


Register SharePoint Workflow Service

Register-SPWorkflowService -SPSite 'https://myhost/mysite' -WorkflowHostUri 'http://workflowhost:12291'

The workflow should now be registered properly.

Register SharePoint Workflow Service

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.


Check the SharePoint Workflow Manager Connectivity Status

Check SharePoint Workflow Manager Connectivity Status Using IIS

  • Open IIS > From left side expand Sites > Workflow Management Site.

IIS workflow Manager site

  • From right side > Click Browse.

browse workflow Manager URL

  • The below page should be shown and that means the workflow manager is connected and registered properly.

Check SharePoint Workflow Manager Connectivity Status


Check SharePoint Workflow Manager Connectivity Status Using SharePoint Designer

  • Open SharePoint Designer > Workflows > Create Site Workflow > In Platform Type the SharePoint 2013 Workflow should be listed.

Workflow Manager is shown in SharePoint designer


Check SharePoint Workflow Manager Connectivity Status Using Central Administration

  • Open Central Administration > Application Management > Application Services > Click on Workflow Service Application Proxy.

Workflow Service application proxy

  • The Workflow would be Connected as shown below:Workflow service status is connected

Applies To
  • SharePoint 2016.
  • SharePoint 2016.
  • SharePoint 2016.
  • SharePoint Workflow Manager.
See also
Advertisements

2 thoughts on “Register-SPworkflowservice unable to connect to the remote service In Workflow Manager

    1. Hi dear,

      No, it’s not an error in Microsoft article, but as above mentioned, you should use the same provided port during configuring The Workflow Manager.Meanwhile, I prefer if Microsoft mentions the default value in their articles

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s