Service Bus Message Broker Stuck on Starting

Service Bus message broker failed to start in SharePoint 2019 Workflow Manager

In this post, we’re will fix the Service Bus Message Broker Stuck on Starting issue that you may face in SharePoint 2019 / 2016 Workflow Manager farm.

Service Bus Message Broker failed to start: Timeout has expired and the operation has not been completed.

Service Bus Message Broker Stuck on Starting

Service Bus Message Broker failed to start

You might also like to read Install and Configure Workflow Manager SharePoint 2016 / 2019 Step by Step.


What’s Service Bus?

Service Bus is a messaging service that works as a broker to guarantee messaging delivery between the workflow manager and SharePoint.

The Service Bus has three databases:

  • Farm Management Database.
  • Gateway Database.
  • Message Container Database.

What’s Service Bus Message Broker?

Service Bus Message Broker is a windows service that provides storage and processing for Service Bus messages.


Why did Service Bus Message Broker stuck on Starting status?

The main root causes of “Service Bus Message Broker Stuck on Starting” issue are:

  1. One of the Service Bus Port is blocked.
  2. One of the Service Bus Port is used by another web application or program.
  3. TLS is not enabled in the Server Registry.

Solving: Service Bus Message Broker Stuck on Starting

To solve this issue “Service Bus Message Broker failed to start” or “Service Bus Message Broker Stuck on Starting“, you should do the following:

  1. Enable TLS in Registry.
  2. Make sure that there is no communication and security issue.
  3. Make sure that the Service Bus ports are opened and not blocked by a Firewall or Antivirus program.
  4. Make sure that the Service Bus ports are not used with another service or application.

1) Enable TLS 1.2 in Registry

During installing and configuring workflow Manager, you may get the below Timeout issue specifically at this configuration step “Add host to service bus farm“.

Starting Service Bus Message Broker on machine failed: Timeout has expired and the operation has not been completed.

In such cases, if your farm forced to use TLS, so you must manually enable it to ensure communications between SharePoint Server and Workflow Manager.

To enable TLS protocol version 1.2. on Workflow Manager Windows Server Registery, you should do the following:

  1. Download and Install Security Update for Windows Server 2012 (KB2868725) to disable RC4.

In case, you are using Windows Server 2016 or later, you should disable RC4 by changing the Enabled key value to 0 at below Register Paths

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128]
“Enabled”=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128]
“Enabled”=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128]
“Enabled”=dword:00000000

Read more at completely disable RC4
  1. Open the Register Editor, navigate to the below path.
Adjust regedit setting
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319
  1. Add a new DOWRS “SchUseStrongCrypto” with 1 value.
Enable TLS for workflow manager
  1. Repeat the above steps for each workflow manager server.
  2. You must restart your server to reflect your register changes.

Enable TLS 1.0 in Registry

In case ,you are using TLS 1.0, so you should enable it by doing the following:

  1. Open Register Editor.
  2. Go to the following Path.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client
  1. Set the Enabled key value to 1.
  2. Repeat the same steps for this server path.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server
Enable TLS protocol for SharePoint workflow manager
  1. Restart your server to reflect your register changes.
  2. Reopen Workflow Manager configuration wizard that should be completed successfully now.
Workflow Manager configuration wizard

2) Check Service Bus ports Status

In case, the above steps don’t solve this issue, and you still getting “Starting Service Bus Message Broker on machine failed: Timeout has expired and the operation has not been completed.“. So in this case, you should check Service Bus ports Status.

What’re the default Service Bus ports?

  • HTTPS Port: 9355.
  • TCP Port: 9354.
  • Message Broker Port: 9356.
  • Internal Communication Port Range: 9000-9003.

What’re the currently assigned Service Bus Ports?

If you changed the default Service Bus ports during configuring Workflow Manager, and you don’t remember what’re the assigned service bus ports that you have set, so you can get which ports used for Service Bus as I mentioned at Getting SharePoint Workflow Manager Ports.

Workflow Manager Get Service Bus Ports

Then make sure that all assigned ports are not blocked as mentioned at Workflow Manager Port is blocked.


Service Bus Message Broker Stuck on Starting

What we have earlier mentioned in the above section is related to the “Starting Service Bus Message Broker on machine failed” that you may face during configuring SharePoint 2019 / 2016 Workflow Manager.

In this section, we will try to investigate and solve the “Service Bus Message Broker Stuck on Starting” issue that you may face after configuring and running Workflow Manager and suddenly it was not working as expected! by doing the following:

Steps

  1. Check the status of Workflow Manager and Service Bus Services.
  2. Force Stopping Service Bus Message Broker.
  3. Make sure that the Service Bus Port is not used by another web application.
  4. Make sure that the Service Bus Port is not blocked by Windows Firewall.
  5. Install Service Bus update for .Net Framework 4.6.
  6. Rejoin the server to the Workflow Manager Farm.

1) Workflow Manager and Service Bus Services.

You should first make sure that the below services are up and running:

  • Service Bus Gateway.
  • Windows Fabric Host Service.
  • Workflow Manager Backend.
  • Service Bus Resource Provider.
Service Bus Message Broker | workflow manager services

Also, make sure that the Windows Fabric Host Service is up and running with an account that has sufficient privilege.

start windows fabric host service

It’s also strongly recommended to read Workflow Manager Health Checklist.

2) Force Stopping Service Bus Message Broker

If the above services up and running, so you should try to force stopping Service Bus Message Broker by doing the following:

  1. Open Task Manager.
  2. Go to the Services tab.
  3. Search for “Service Bus Message Broker“.
  4. Right-click on the “Service Bus Message Broker” service name, select “Go to details”.
Force Stopping Service Bus Message Broker
  1. Again, right-click on “Microsoft Service Bus Message Broker.exe”, select “End Process Tree”.
Restart Service Bus Message Broker
  1. The “Service Bus Message Broker” status should be “Stopped” now.
Service Bus Message Broker is stopped

The “Service Bus Message Broker” service may be not stopped from the first time, so repeat the above steps until get the service status “Stopped“.

  1. Once the service is stopped, try to start it again!
Start Service Bus Message Broker
  1. If the “Service Bus Message Broker stuck on Starting” status again that means it’s a Service Bus Ports Blocking issue.
Service Bus Message Broker Stuck on Starting

3) Service Bus Port is used by another web application

In this step, you should first get the current assigned Service Bus Ports as mentioned at Workflow Manager: Get Service Bus Ports. After getting the assigned Service Bus Ports, you should make sure that

  • The assigned Service Bus ports are opened.
  • The assigned Service Bus ports are not used with other web applications.

Check the Service Bus Ports Status

  1. Make sure that the “telnet” cmdlet is recognized as mentioned at ‘telnet’ is not recognized as an internal or external command, operable program or batch file.
  2. Run the “telnet” cmdlet to make sure that the assigned ports are opened.
telnet workflow Manager ServerIP Port
telnet port is opened and Connection success

You might also like to read how to Exit Telnet Session

List all Web Applications and their bindings information

In some cases, maybe one of the assigned Service Bus ports is used by another web application on your server.

To list all Web Applications and its bindings information, you should do the following:

  • Open CMD as an Administrator.
  • Run the below cmdlets one by one.
cd c:\Windows\system32\inetsrv
appcmd list sites
Which web application use specific port

For each entry, check if there is a running web application using one of the assigned Service Bus ports, and If you have found any use for the reserved ports, try to stop it, then stop and restart the “Service Bus Message Broker” service that should be started properly now!

Stop Web Site in IIS

4) Service Bus Port blocked by Windows Firewall

If the assigned service bus ports are not used by any web application that possibility means it’s a Windows firewall issue or anti-virus blocking issue. In this case, just for testing, try to stop the Windows firewall then “Restart Service Bus Message Broker” service.

Stop Windows Firewall
  • If it’s started properly, so you should check this blocking issue with your System Administrator to whitelist all assigned Service Bus ports in the inbound connections.
  • If there is no issue in the windows firewall, so you should try also to disable antivirus or any protection tools that may block ports connectivity. then work with your anti-virus team to whitelist all assigned Service Bus ports.

We have also explained the Workflow Manager Blocking issue in details at Workflow Manager Port Range is blocked


5) Install Service Bus update for .Net Framework 4.6

If you have followed the above investigation steps, and still the Service Bus message broker failed to start. so, the issue may be related to .Net Framework 4.6 that has been installed after you have configured SharePoint Workflow Manager.

Note: Installing .Net Framework 4.6 may affect the Service Bus services behavior where it may be not started or not respond with the client requests as expected

  • In this case, you should update Service Bus for Windows Server 1.1 for .NET Framework 4.6 by downloading and installing the Service Bus update for .NET Framework 4.6.
  • Try to start Service Bus Message Broker service that should be started properly now.
Service Bus Message Broker failed to start

You might also like to check SharePoint 2013 setup unable to proceed: This Product Requires Microsoft .Net Framework.


6) Rejoin the server to the Workflow Manager Farm

The last option that you currently have is rejoining the current server to the workflow farm.

Note: Removing a server from a Workflow Manager farm and rejoining it again using the Wizard doesn’t have a direct effect on the running workflow instances. but it will not be accessible and maybe not working properly till rejoining the same server and republish the current workflows again.

Steps

  1. Run the Workflow Manager Configuration as Administrator.
Run Workflow Manager Configuration
  1. Click on “Leave Workflow Manager Farm“.
Leave-Workflow-Manager-Farm
  1. Wait for a moment, until the Workflow Manager removes the current computer from the Workflow Manager Farm.
Remove current Computer from the workflow manager farm
  1. Close the wizard and reopen it again.
  2. Click on “Join an existing workflow Manager Farm” to join the current server to the current SharePoint Workflow Manager farm again.
Join and Existing workflow manager farm
  1. If you getting any blocking port issue as shown below, so you should again follow the detailed steps at Workflow Manager Port Range is blocked to solve the workflow Manager Blocking issue
Port number specified for internal communication Port Range is blocked
  1. If the wizard completed successfully, that means, the “Service Bus Message Broker” service is started properly, and the issue has been solved.
Unable to start Service Bus Message Broker service

Conclusion

Facing “Starting Service Bus Message Broker on machine failed” or “Service Bus Message Broker Stuck on Starting” issues usually occur because of communication and security settings that conflict with installing to configuring Workflow Manager Farm for SharePoint 2019 and 2016.

In this post, we have listed all root cause and solutions to over come such issue.

Applies To
  • Workflow Manager.
  • SharePoint 2019.
  • SharePoint 2016.
  • SharePoint 2013.
You might also like to read
Have a Question?

If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.

4 thoughts on “Service Bus Message Broker Stuck on Starting”

  1. I had the same problem when installing on Windows server 2022 but the error (Application Event Log) was about System.Threading.ThreadPoolWorkQueue.Dispatch in the .NET Runtime.

    The solution is to disable Windows Firewall when joining the host to the workflow farm. When the installation is complete you can enable the firewall.
    Hope this helps. Jean Marie

  2. Brave Consulting

    I got sharepoint 2013, and just noticed that the workflow certs expired. I changed the server time back before the expiration date. I got workflow components on only one server. I inherited the farm from someone else who left the company with leaving any documentation.

    then I noticed the service bus message broker was stuck. if I followed your steps, when rejoining the farm, I need certificate generation key which I do not know.

    I checked no web app is using any workflow ports; I can telnet all other ports but not the MessageBrokerPort : 9356 one. The network guy says this port was not blocked – which I believe because before the cert expired the workflow worked.

    THis is really weird. Could you please advise?

    Thanks,

  3. Pingback: Workflow Manager: Get Service Bus Ports | SPGeeks

  4. Pingback: Workflow Manager: Port is blocked | SPGeeks

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top