Article - CS365539

"(twx_foundation::database line 65) had an error: Mixlib::ShellOut::ShellCommandFailed" is present within the foundation log after a failed upgrade of ThingWorx Platform

Modified: 13-Aug-2024   


Applies To

  • ThingWorx Platform 9.0 to 9.3 SP5
  • Microsoft SQL Server
  • PostgreSQL

Description

  • Unable to upgrade ThingWorx Platform using the Installer
  • Cannot update ThingWorx Platform using the Upgrade Utility
  • Using the installer to update ThingWorx Platform fails
  • MS SQL Upgrade of ThingWorx Platform fails due to a script failure within the Installer
  • foundation log file shows
    FATAL: Mixlib::ShellOut::ShellCommandFailed

     
  • Following the Installer Upgrade Help Center to upgrade ThingWorx Platform but it is failing
  • Cannot upgrade Microsoft SQL Server version of ThingWorx Platform using the installer
  • Installed ThingWorx Platform under Program Files (x86) and cannot complete upgrade
    • ThingWorx Platform instances installed in directory locations without spaces work as expected
  • Seeing the following error within the <ThingWorxFoundation>/installer/logs/foundation-<date>.log file after a failed ThingWorx Platform upgrade
INFO: Processing execute[<ThingWorx Install Location>/thingworx/update/update_mssql.ps1] action run (twx_foundation::database line 65)
INFO: Running queued delayed notifications before re-raising exception
ERROR: Running exception handlers
ERROR: Exception handlers complete
FATAL: Stacktrace dumped to <ThingWorx Install Location>/installer/foundation/local-mode-cache/cache/chef-stacktrace.out
FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[<ThingWorx Install Location>/thingworx/update/update_mssql.ps1] (twx_foundation::database line 65) had an error: Mixlib::ShellOut::ShellCommandFailed: Command execution failed. STDOUT/STDERR suppressed for sensitive resource
  • Or in case of PostgreSQL database
  * execute[C:\PROGRA~2\THINGW~1/thingworx/update/update_postgres.ps1] action  INFO: Processing execute[C:\PROGRA~2\THINGW~1/thingworx/update/update_postgres.ps1] action run (twx_foundation::database line 65)

    
    ================================================================================
    [31mError executing action `run` on resource 'execute[C:\PROGRA~2\THINGW~1/thingworx/update/update_postgres.ps1]'
    ================================================================================
    
    Mixlib::ShellOut::ShellCommandFailed

  • With sensitive flag in <ThingWorxFoundation>\installer\foundation\cookbooks\twx_foundation\recipes\database.rb set to false the following message is also logged in <ThingWorxFoundation>/installer/logs/foundation-<date>.log
    • ---- Begin output of powershell  G:\Program Files (x86)\ThingWorxFoundation/thingworx/update/update_mssql.ps1 -h <host> -p 1433 -d Thingworx_Redo -u Twadmin --update_all -y < nul ----
      STDOUT:
      STDERR: x86 : The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
      
      spelling of the name, or if a path was included, verify that the path is correct and try again.
      
      At line:1 char:19

       
This is a printer-friendly version of Article 365539 and may be out of date. For the latest version click CS365539