Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-71475

Service.bat wrongly sets JRE_HOME variable

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              mrydzewski Mikolaj Rydzewski (Inactive)
              amukkamala Aditya M
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: