-
Bug
-
Resolution: Fixed
-
High (View bug fix roadmap)
-
8.10.0, 8.11.0, 8.11.1, 8.13.1, 8.13.2
-
8.1
-
10
-
Severity 3 - Minor
-
4
-
Issue Summary
Service.bat wrongly sets JRE_HOME variable value in JIRA 8.11 service.bat if the JRE_HOME variable is not set explicitly.
Steps to Reproduce
Without setting any Environment variable (like JAVA_HOME or JRE_HOME)
1) Install 8.7 first. Install JIRA as windows service.
2) Now download JIRA 8.11. Upgrade the existing JIRA 8.7 to 8.11. Remove the old JIRA 8.7 windows service using service.bat
3) Try installing the jira 8.11 using service.bat. We see the below error
Installing the service 'jira' ... Using CATALINA_HOME: "C:\Program Files\Atlassian\Jira" Using CATALINA_BASE: "C:\Program Files\Atlassian\Jira" Ignoring JAVA_HOME: ""C:\Program Files\OpenJDK\jdk8u212-b04"" Using JRE_HOME: "C:\Users\Administrator\jre" Warning: Neither 'server' nor 'client' jvm.dll was found at JRE_HOME. Using JVM: "auto" **************************************************************************** ******* Wrong JVM version Jira requires 1.8 or 11 to run. ******* **************************************************************************** *** *** Output of java -version command is: The system cannot find the path specified. *** (End of output) *** *** *** If you want JIRA to start using this JVM *** set environment variable 'ignore_jvm_version' to 'true' *** ****************************************************************************
Expected Results
THE JRE HOME is picked from the right location and service is installed.
Actual Results
The below exception is thrown in the command prompt while installing JIRA as a service:
C:\Users\Administrator>"C:\Program Files\Atlassian\Jira\bin\service.bat" install jira Neither the JAVA_HOME nor the JRE_HOME environment variable is defined Service will use the bundled JRE. Failing that, service will try to guess them from the registry. Granting full access for Network Service to the Jira home directory 'C:\Program Files\Atlassian\Application Data\Jira' processed file: C:\Program Files\Atlassian\Application Data\Jira Successfully processed 1 files; Failed processing 0 files Granting read and execute access for Network Service to the Jira installation directory 'C:\Program Files\Atlassian\Jira' processed file: C:\Program Files\Atlassian\Jira Successfully processed 1 files; Failed processing 0 files Granting full access for Network Service to the work, temp and logs subdirectories of Jira installation directory 'C:\Program Files\Atlassian\Jira' processed file: C:\Program Files\Atlassian\Jira/work Successfully processed 1 files; Failed processing 0 files processed file: C:\Program Files\Atlassian\Jira/temp Successfully processed 1 files; Failed processing 0 files processed file: C:\Program Files\Atlassian\Jira/logs Successfully processed 1 files; Failed processing 0 files Granting read and execute access for Network Service for parent directories of the Jira home directory 'C:\Program Files\Atlassian\Application Data\Jira'. They're required to make Java native IO operations work, which are required e.g. when starting up the plugin system. Starting to walk up from: "C:\Program Files\Atlassian\Application Data\Jira\" Checking permissions of C:\Program Files\Atlassian\Application Data\Jira\ [C:\Program Files\Atlassian\Application Data\Jira\] Checking permissions of C:\Program Files\Atlassian\Application Data\ [C:\Program Files\Atlassian\Application Data\Jira\..\] Checking permissions of C:\Program Files\Atlassian\ [C:\Program Files\Atlassian\Application Data\Jira\..\..\] Checking permissions of C:\Program Files\ [C:\Program Files\Atlassian\Application Data\Jira\..\..\..\] Granting read and execute access for Network Service to C:\Program Files\ C:\Program Files\.: Access is denied. Successfully processed 0 files; Failed processing 1 files end Granting read and execute access for Network Service for parent directories of the Jira installation directory 'C:\Program Files\Atlassian\Jira'. They're required to make Java native IO operations work, which are required e.g. when starting up the plugin system. Starting to walk up from: "C:\Program Files\Atlassian\Jira\" Checking permissions of C:\Program Files\Atlassian\Jira\ [C:\Program Files\Atlassian\Jira\] Checking permissions of C:\Program Files\Atlassian\ [C:\Program Files\Atlassian\Jira\..\] Checking permissions of C:\Program Files\ [C:\Program Files\Atlassian\Jira\..\..\] Granting read and execute access for Network Service to C:\Program Files\ C:\Program Files\.: Access is denied. Successfully processed 0 files; Failed processing 1 files end Installing the service 'jira' ... Using CATALINA_HOME: "C:\Program Files\Atlassian\Jira" Using CATALINA_BASE: "C:\Program Files\Atlassian\Jira" Ignoring JAVA_HOME: ""C:\Program Files\OpenJDK\jdk8u212-b04"" Using JRE_HOME: "C:\Users\Administrator\jre" Warning: Neither 'server' nor 'client' jvm.dll was found at JRE_HOME. Using JVM: "auto" **************************************************************************** ******* Wrong JVM version Jira requires 1.8 or 11 to run. ******* **************************************************************************** *** *** Output of java -version command is: The system cannot find the path specified. *** (End of output) *** *** *** If you want JIRA to start using this JVM *** set environment variable 'ignore_jvm_version' to 'true' *** ****************************************************************************
Workaround
ADD JRE_HOME environment variable in the windows server pointing to the root folder of where the JRE is located. Restart the windows server to take this into effect and then try installing jira as windows service using service.bat
Form Name |
---|
This is still an issue with Jira 8.13.2.
I had spacing issues with setting JRE_HOME manually (the batch file didn't like the spaces in "Program Files"), so per Aditya's comment above I updated service.bat with the following: