Upgrade JIRA using window installer fails to remove previous installation directory

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptom 1

When attempting to upgrade JIRA it fails with the error "Error while attempting to remove the previous installation directory. Some files may be in use. Please close all related programs and try again."


Symptom 2

No errors display but stuck in the "uninstalling previous version" process and have waited for more than a hour. This is a known issue from JRASERVER-71842 - Getting issue details... STATUS

Diagnosis

  • No errors are present in the atlassian-jira.log as the error is thrown from the installer.
  • Whenever performing the installation in a Windows environment, Jira should record the logs in the install4j folder below:
<INSTALL-FOLDER>\.install4j\installation.log
<INSTALL-FOLDER>\.install4j\files.log
<INSTALL-FOLDER>\.install4j\error.log

(info) Check the logs above if returned errors that cause upgrade failures or delays.

Cause

This is known to be caused by any of the following:

  • Cause 1 : The JIRA installer either does not have the appropriate permissions to those directories. We have an improvement request raised for this under JRA-63068 - Getting issue details... STATUS
  • Cause 2 : The service has not stopped in time for the backup operation to begin.
  • Cause 3 : Some other application or process is accessing the JIRA files and has locked them.
  • Cause 4 : This message also appears when there is no space left on the disk.
  • Cause 5 : JIRA installer is not shutting down the window service properly.
  • Cause 6 : The existing JIRA installation folder alone contains more than 10 GB file size.

Resolution

  • Resolution for Cause 1: Ensure that the user executing the installer has the appropriate permissions to the JIRA directory.
    • In a Unix system, you can run the following command in the JIRA home/installation directory to identify any files/directory which are owned by a different user

      find . ! -user <username>
  • Resolution for Cause 2: Stop the JIRA service prior to executing the upgrade.
  • Resolution for Cause 3: Check that no applications are accessing those files during the upgrade process. In Windows, this can be done with the Process Explorer using Find as in the below example:















  • Resolution for Cause 4: Increase JIRA home directory disk space
  • Resolution for Cause 5: Shut down window services before proceeding with the installer upgrade.
  • Resolution for Cause 6: Please ensure the existing Jira installation directory size is less than 1 GB. You can move or backup a large folder (such as logs folder) inside the JIRA installation folder to another place.





Last modified on Jul 25, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.