Service Bus Gateway service struck in starting State after installing security updates on SharePoint Servers

 Problem background

When you install updates on SharePoint Servers, things may get chaotic sometimes. In my case, when I installed security updates for SharePoint Servers, SharePoint 2013 workflows stopped working. First, I checked all service bus services. I figured out that Service bus Gateway was stuck in starting state.


When I tried to manually start it, below error popped up:





After checking logs in ULS viewer and Event Viewer, I found below messages:

Service cannot be started. Microsoft.ServiceBus.Commands.Common.Exceptions.HostNotConfiguredException: Entry for host XYZAPPServer is not present in Service Bus farm management database. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception: The network path was not found
   --- End of inner exception stack trace ---
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.Connect(ServerInfo ser...
"

As service bus services was not running, all workflows stopped working.

In order to resolve this issue, I tried blow steps:
Step1:
From Workflow Configuration Wizard, I selected, "Leave Workflow Manager Farm".


Step2: 
Then, rejoined the farm.
After joining existing WF farm, below error occurred in configuration wizard.


Error message: 
“Starting Service bus gateway on
machine <servername> failed: timeout has expired and the operation has
not been completed”

Solution

Service bus gateway on machine was failing due to Security update for Service Bus 1.1 (kb2972621) which was installed during installation of updates on SharePoint Servers.

This issue is noticed when you are running ServiceBus1.1 with Framework 4.6. Recently there is an update released for SB1.1 to work with .Net Framework 4.6. Download and install the update  to resolve the issue.


Step1: 
Uninstall both above mentioned updates.

Step2:
Install Update for Service Bus Server 1.1 (KB3086798) 

Step3:
After that, Join Existing Workflow Farm Manager and complete and the configuration wizard.

Step4:
Register WFM to SharePoint.
Open SharePoint Management Shell and run below command.

Register-SPWorkflowService –SPSite https://yourSite/ –WorkflowHostUri https://SampleServer:12290/ -AllowOAuthhttp -force.

That's it!


Please let me know if you have any questions or comments about this process.


References:













Comments

Popular posts from this blog

SharePoint 2013: How to replace expired WorkFlow Manager Certificates - Solution for Service bus error

How to Change SharePoint 2013 Farm Account Password