AAI Windows upgrade to 24.2 or 24.3 may fail with error "webswing-server.war (Access is denied)"
search cancel

AAI Windows upgrade to 24.2 or 24.3 may fail with error "webswing-server.war (Access is denied)"

book

Article ID: 416640

calendar_today

Updated On:

Products

Automation Analytics & Intelligence

Issue/Introduction

When upgrading AAI on Windows from 24.x to 24.2.x or 24.3.x the upgrade may fail the error below in the <Upgrade Dir>\install\upgrade.log
 
Exception in thread "main"<Upgrade Dir>\AAI_Upgrader.Windows_24_3_0-hf.1.build.251015210622\install\build.xml:434: Failed to copy <Upgrade Dir>AAI_Upgrader.Windows_24_3_0-hf.1.build.251015210622\files\config\webswing-server.war to <Install Dir>\config\webswing-server.war due to <Install Dir>\config\webswing-server.war (Access is denied) and I couldn't delete the corrupt <Install Dir>\config\webswing-server.war
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:637)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:430)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.termalabs.upgrade.main.UpgradeCli.main(UpgradeCli.java:194)
Caused by: java.io.FileNotFoundException: <Install Dir>\config\webswing-server.war (Access is denied)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:184)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:631)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:330)
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:626)
... 7 more
--- Nested Exception ---
java.io.FileNotFoundException: <Install Dir>\config\webswing-server.war (Access is denied)
at java.base/java.io.FileOutputStream.open0(Native Method)

 

Environment

Windows only

AAI upgrades from 24.x to 24.2.x/24.4

Cause

This will occur if the webswing process for the web based configuration tool is running when you attempt the upgrade. 

Resolution

How to Prevent the Issue

To prevent this error from occurring, shut down the webswing process used by the AAI web-based configuration tool before upgrading.

  1. Open a command prompt.

  2. Navigate to your configuration directory by running: cd <Install Dir>\config

  3. Stop the webswing process by running: webswing.bat stop

  4. Proceed with the upgrade.

 

Workarounds (If the error has already occurred)

Option A: Standard Reboot

  1. Reboot the Windows server.

  2. Attempt the upgrade again (the error should be resolved).

Option B: Disable Service (If Option A fails)

  1. Open Windows Services and set the Automation Analytics & Intelligence service to Disabled.

  2. Reboot the Windows server.

  3. Attempt the upgrade again.