Overview
During an update/installation we might have troubles installing the certificate for our BackgroundWorker site. This can happen due to multiple reasons, this article shows you how to confirm that you have this issue and how to fix it.
To confirm that you are in this specific scenario, you might have issues uploading files to the Hubshare File Module (internal server error).
Go to your logs folder (usually found in C:\Logs\)
Open the latest default_webapp-XXXXXXXX.log file (where XXXXXXXX is the date).
If you have one or multiple lines that look like this:
{"date":"2024-01-03T08:45:46.8786608-05:00","level":"ERROR","logger":"WebApp","thread":"103","message":"{\"Content\":\"[HealthCheckBackgroundWorker] Error exception Status(StatusCode=\\\"Unavailable\\\", Detail=\\\"Error starting gRPC call. HttpRequestException: The SSL connection could not be established, see inner exception. IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. SocketException: An existing connection was forcibly closed by the remote host.\\\", DebugException=\\\"System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception…
If this is the case then apply the following solution.
Solution
Go to your latest package folder (or the one you are trying to install). It is by default found in C:\Hubshare\Packages but it can be different if you have changed it during the installation.
Go inside the Automation subfolder and open a PowerShell window as an admin in this specific path.
Run the EnsureWorkerCertificate.ps1 script and press ENTER.
Fill in the InstanceName value, where usually it is "Default" but could be a different name if you chose to have another one during the Hubshare installation.
Press ENTER, and the script should look like this when finished.
You will then need to restart your application pool.
To do this, open the Internet Information Services (IIS) Manager and go to the Application Pools list.
Stop the HubshareDefaultWebApp, and the HubshareDefaultWorker application pools.
When you have done it, start the HubshareDefaultWorker and then the HubshareDefaultWebApp application pools.
The issue should now be resolved.
