Article - CS398758

ThingWorx upgrade fails with error "Error executing action `run` on resource 'execute[upgrade path installer running db scripts: "XXXX/thingworx/update/update_postgres.sh"]

Modified: 20-Aug-2024   


Applies To

  • ThingWorx Platform 9.0 to 9.6

Description

  • ThingWorx upgrade fails with following error in foundation-xxxx.log
- execute the ruby block Retrieve DB passowrd
  * execute[upgrade path installer running db scripts: "/XXXX/ThingWorxFoundation/thingworx/update/update_postgres.sh"] action run[2023-08-09T21:17:18+05:30] INFO: Processing execute[upgrade path installer running db scripts: "/XXXX/ThingWorxFoundation/thingworx/update/update_postgres.sh"] action run (twx_foundation::database line 76)

    
    ================================================================================
    Error executing action `run` on resource 'execute[upgrade path installer running db scripts: "/XXXX/ThingWorxFoundation/thingworx/update/update_postgres.sh"]'
    ================================================================================
    
    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Command execution failed. STDOUT/STDERR suppressed for sensitive resource
  • ThingWorxFoundation_upgrade.log or bitrock_xxx.log reports below message:
Script stderr:
 child process exited abnormally

Error running cinc-client -z --config "/XXXX/ThingWorxFoundation/installer/foundation/knife.rb" -j "/XXXX/ThingWorxFoundation/installer/foundation.json" -L "/XXXX/ThingWorxFoundation/installer/logs/foundation-ZZZZ.log": child process exited abnormally
  • ThingWorx installer UI reports below error:
Error: The upgrade was not successful.  The installer attempted to roll back changes to your file system, but database changes could not be rolled back.  You may need to restore your database from your manual backup.  Before running the upgrade installer again, check the installer logs to see why this upgrade attempt failed.
  • Installer calls powershell command background in Windows environment and gets an error:
powershell .\update_postgres.ps1 -h 192.168.11.3 -p 5432 -d thingworx -s public -u twadmin --update_all -y
 
update_postgres.ps1 : The term 'update_postgres.ps1' 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:1
+ update_postgres.ps1 -h 192.168.11.3 -p 5432 -d thingworx -s public -u ...
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (update_postgres.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
This is a printer-friendly version of Article 398758 and may be out of date. For the latest version click CS398758