Troubleshoot maintenance errors

2024/1/22 |

Symptoms

You receive an error message when updating CLEAR Engine and Web UI.

Cause

This article describes common causes and solutions to errors during the update of CLEAR Engine and the Web UI.

Resolution

  • During update, an error message indicated that there are scans in progress:

      Unable to perform update because one or more scans are in progress.
    

    You receive this error there are scans in-progress either on the instance being updated or on another instance in the same cluster. This includes scan that has been created but not started yet.

    Follow these steps to identify the scans that are in progress:

    1. On the server hosting the SkyAnalyzer database, open Windows PowerShell as administrator.
    2. Enter the following command to identify scans that are in progress:

       # Replace .\SQLEXPRESS if using a custom SQL Server instance
       $sqlInstance = ".\SQLEXPRESS"
       sqlcmd -S $sqlInstance -d SkyAnalyzer -Q "SELECT [ScanId], [ScanAgent] FROM [Scans] WHERE [IsCompleted] = 0"
      
    3. Scans with a ScanAgent are ongoing. Connect to the instance indicated by the ScanAgent. Wait for the scans to complete or forcibly stop the scans by stopping the CLEAR Engine service.
    4. Scans with an empty ScanAgent have been created but not started yet. Delete these scans by running the following commands in PowerShell:

       # Replace .\SQLEXPRESS if using a custom SQL Server instance
       $sqlInstance = ".\SQLEXPRESS"
       sqlcmd -S $sqlInstance -d SkyAnalyzer -Q "DELETE FROM [Scans] WHERE [ScanId] = '' AND [IsCompleted] = 0"
      

    If there are still scans that are in progress, they have to be manually stopped before update can continue:

    1. Open Windows PowerShell as administrator.
    2. Enter the following command to stop the CLEAR Engine service:

       Stop-Service "CLEAR Engine"
      
    3. Repeat the previous steps on every instance in the cluster.
    4. On the server hosting the SkyAnalyzer database, open Windows PowerShell as administrator.
    5. Enter the following command to manually stop unresponsive scans:

       # Replace .\SQLEXPRESS if using a custom SQL Server instance
       $sqlInstance = ".\SQLEXPRESS"
       sqlcmd -S $sqlInstance -d SkyAnalyzer -Q "UPDATE [Scans] SET [IsCompleted] = 1, [PreAnalysisResult] = -9999950 WHERE [IsCompleted] = 0"
      

    The update is ready to continue as there is no scan in progress.