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 failed to start
- 1 Service Bus Message Broker failed to start
- 2 What’s Service Bus?
- 3 Why did Service Bus Message Broker stuck on Starting status?
- 4 Solving: Service Bus Message Broker Stuck on Starting
Service Bus Message Broker Stuck on Starting
- 5.1 1) Workflow Manager and Service Bus Services.
- 5.2 2) Force Stopping Service Bus Message Broker
- 5.3 3) Service Bus Port is used by another web application
- 5.4 4) Service Bus Port blocked by Windows Firewall
- 5.5 5) Install Service Bus update for .Net Framework 4.6
- 5.6 6) Rejoin the server to the Workflow Manager Farm
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:
- One of the Service Bus Port is blocked.
- One of the Service Bus Port is used by another web application or program.
- 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:
- Enable TLS in Registry.
- Make sure that there is no communication and security issue.
- Make sure that the Service Bus ports are opened and not blocked by a Firewall or Antivirus program.
- 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:
- 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 56/128]Read more at completely disable RC4
- Open the Register Editor, navigate to the below path.
- Add a new DOWRS “SchUseStrongCrypto” with 1 value.
- Repeat the above steps for each workflow manager server.
- 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:
- Open Register Editor.
- Go to the following Path.
- Set the Enabled key value to 1.
- Repeat the same steps for this server path.
- Restart your server to reflect your register changes.
- Reopen Workflow Manager configuration wizard that should be completed successfully now.
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.
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:
- Check the status of Workflow Manager and Service Bus Services.
- Force Stopping Service Bus Message Broker.
- Make sure that the Service Bus Port is not used by another web application.
- Make sure that the Service Bus Port is not blocked by Windows Firewall.
- Install Service Bus update for .Net Framework 4.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.
Also, make sure that the Windows Fabric Host Service is up and running with an account that has sufficient privilege.
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:
- Open Task Manager.
- Go to the Services tab.
- Search for “Service Bus Message Broker“.
- Right-click on the “Service Bus Message Broker” service name, select “Go to details”.
- Again, right-click on “Microsoft Service Bus Message Broker.exe”, select “End Process Tree”.
- The “Service Bus Message Broker” status should be “Stopped” now.
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“.
- Once the service is stopped, try to start it again!
- If the “Service Bus Message Broker stuck on Starting” status again that means it’s a Service Bus Ports Blocking issue.
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
- 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.
- Run the “telnet” cmdlet to make sure that the assigned ports are opened.
telnet workflow Manager ServerIP Port
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
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!
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.
- 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.
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.
- Run the Workflow Manager Configuration as Administrator.
- Click on “Leave Workflow Manager Farm“.
- Wait for a moment, until the Workflow Manager removes the current computer from the Workflow Manager Farm.
- Close the wizard and reopen it again.
- Click on “Join an existing workflow Manager Farm” to join the current server to the current SharePoint Workflow Manager farm again.
- 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
- If the wizard completed successfully, that means, the “Service Bus Message Broker” service is started properly, and the issue has been solved.
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.
- Workflow Manager.
- SharePoint 2019.
- SharePoint 2016.
- SharePoint 2013.
You might also like to read
- Install and Configure Workflow Manager SharePoint 2016 / 2019 Step by Step
- Workflow Manager: HTTP 403 Forbidden.
- How to Check SQL Server Instance Connectivity from the application server to the database server for a specific user?
Have a Question?
If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.