search cancel

Unable to Upgrade Spectrum to 22.2 on Windows due to MySQL Error: "Script Install-Tools/CUS/mysql.cus has failed"

book

Article ID: 256660

calendar_today

Updated On:

Products

DX NetOps CA Spectrum

Issue/Introduction

When upgrading Spectrum from 21.2.8 to 22.2 on Windows Server, an error is generated:

Script Install-Tools/CUS/mysql.cus has failed

Errors occurred during the execution of
the custom scripts noted above. Please
refer to the appropriate install.log
file for specific information on the
error. These errors must be resolved
before installing any Service Packs or
hot fixes.

****************************************

** Error during running of custom scripts

The mysql service is starting........
The mysql service could not be started.

More help is available by typing NET HELPMSG 3523.

**^G Error during net start msyql

However, the upgrade is successfully completed as both MySQL and Spectrum itself are running as the new versions.

Environment

DX NetOps Spectrum Release : 22.2

Cause

The following is the section in the install script that  tries to start up MySQL:

$SYSTEMROOT/system32/net start mysql >> $LOGFILE 2>&1
check_return "net start msyql"

It will wait up till the net start return result, as it's not using any wait constraint here. 

So the issue is that the Windows OS is not returning the Service's status result quickly enough. The following Microsoft KB expands on this issue: 

Microsoft KB : A slow service does not start due to time-out error in Windows

 

Resolution

Implement the steps in the KB to possibly resolve this. Further, you can change the install script so that it waits for a response from Windows Services when querying the state of MySQL. So can you do the following:

  1. Before starting the upgrade, go to the mysql.cus location  in file explorer:
    SPECROOT/Install-Tools/CUS/

  2. After starting upgrading, in "Exctracting files" screen latest mysql.cus copies to above path.


    Please observe that mysql.cus timestamp changes after copying.

  3. Once latest mysql.cus copied, open the file mysql.cus in notepad++ and change line no 114 from "sleep 5" to below two lines:

    sleep 60
    $SYSTEMROOT/system32/sc query mysql >> $LOGFILE 2>&1


  4. After changing the above, save the file.