Article - CS366565

"STDERR: Cannot create a file when that file already exists." is seen when attempting to upgrade ThingWorx Platform via the Installer

Modified: 20-Jun-2025   


Applies To

  • ThingWorx Platform 9.0 to 9.7

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 a script failure within the Installer
  • foundation log file shows STDERR: Cannot create a file when that file already exists.
  • Following the Installer Upgrade Help Center to upgrade ThingWorx Platform but it is failing
  • Cannot upgrade Microsoft SQL version of ThingWorx Platform using the installer
  • bitrock_installer_<id>.log located in <User>\AppData\Temp shows the following:
    • Configuring ThingWorx-Foundation service ...
      Executing sc
      Error running sc create ThingWorx-Foundation binpath= ""C:\Program Files" :
      Executing abort action : ccif_start_pre component
      The installation either failed or the user has aborted [0] it.
      Main Installer : True
      Cleanup Installer Directory : true
      Clearing  Tmp Directory

      Clearing  system temporary and functions_files
      Clearing installer directory
      Cannot delete file C:/Program Files (x86)/ThingWorxFoundation/installer/backup
      Exiting with code 1
  • Seeing the following error within the <ThingWorx Install>/installer/logs/foundation-<date>.log file after a failed ThingWorx Platform upgrade
    • ERROR: Running exception handlers
      ERROR: Exception handlers complete
      FATAL: Stacktrace dumped to c:/program files (x86)/thingworxfoundation/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[tomcat shell scripts permissions] (tomcat::install line 71) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
      ---- Begin output of mklink /D "C:\Program Files (x86)\ThingWorxFoundation\tomcat\current" "apache-tomcat-9.0.56" ----
      STDOUT:
      STDERR: Cannot create a file when that file already exists.
      ---- End output of mklink /D "C:\Program Files (x86)\ThingWorxFoundation\tomcat\current" "apache-tomcat-9.0.56" ----
      Ran mklink /D "C:\Program Files (x86)\ThingWorxFoundation\tomcat\current" "apache-tomcat-9.0.56" returned 1
This is a printer-friendly version of Article 366565 and may be out of date. For the latest version click CS366565