How to Use AdoptOpenJDK 11.0.4 with Jira Server 8.4.1

Jeffrey Gullett September 20, 2019

The supported platforms page for Jira 8.4 (https://confluence.atlassian.com/adminjiraserver/supported-platforms-938846830.html) indicates that AdoptOpenJDK 11 is supported.  However, I can't seem to get the Jira service to start on Windows using version 11.0.4 of the JDK.  I have run C:\Program Files\Atlassian\JIRA\bin\tomcat8w.exe //ES//JIRASoftwareNNNNNNNNNNNN, and configured the Java Virtual Machine setting to be C:\Program Files\AdoptOpenJDK\jdk-11.0.4.11-hotspot\bin\server\jvm.dll.  However, when I try to start the service, it crashes.  In the commons-daemon log file, I am getting the following entries:

[info]  Starting service...
[error] The system cannot find the file specified.
[error] Failed to start Java
[error] ServiceStart returned 4
[info] Run service finished.

Am I missing something?  How can I make Jira run using AdoptOpenJDK 11.0.4? 

1 answer

1 accepted

0 votes
Answer accepted
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2019

@Jeffrey GullettWhat I would recommend is,

  • Install AdoptJDK 11 on machine,
  • Set JAVA_HOME environment variable and point it to AdoptJDK 11 installation location.
  • Simply start Jira with <JIRA_INSTALLATION>/bin/start-jira.bat executable script.
Jeffrey Gullett September 23, 2019

Unfortunately, that suggestion will run the Jira service using the JDK delivered with Jira, which at present is some version of Java 8.  My question is how to run using Java 11, which your answer doesn't address.  To rephrase the question, how can I download the atlassian-jira-software-8.4.1.zip archive, extract it, and get it running on a Windows machine with AdoptOpenJDK 11.0.4 (which is listed under supported platforms) as the only available version of Java?

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2019

@Jeffrey Gullett  once you set JAVA_HOME environment variable, Jira will automatically pickup up that up, and will not use internal Java shipped with it.

Jeffrey Gullett September 23, 2019

There are multiple observations I have made that would indicate the statement (paraphrased) "Setting the JAVA_HOME environment variable prevents Jira from using the bundled version of Java" is false.  They are:

1) If setting JAVA_HOME forced Jira to "not use internal Java shipped with it", then I should be able to delete the JRE directory installed with Jira, and Jira should run without issue.  That isn't the observed behavior.  Deleting the JRE directory within the Jira installation prevents Jira from starting up, even with JAVA_HOME set appropriately.

2) I generated self-signed certificates to secure our Jira/Bitbucket instances.  I have installed these certificates into the AdoptOpenJDK 11 trust store.  When I don't delete the JRE directory, and start Jira with JAVA_HOME pointing to the AdoptOpenJDK 11 installation directory, I get a bunch of certificate errors (specifically with application links between Bitbucket and Jira).  My assertion is that these errors are the result of Tomcat using the bundled JRE, which hasn't been setup to trust my self-signed certificates.  If I run the tomcat8w.exe command indicated in my original post using AdoptOpenJDK 8, Jira starts up and all application links work correctly.

3) Running the "tomcat8w.exe //ES//JIRASoftwareNNNNNNNNNNNN" command from the Jira installation reports that the configured JRE is something like "..\..\jre\bin\server\jvm.dll" (I can't see the actual value this was set to by the installer, because I have since changed it to point to an AdoptOpenJDK 8 path based on JAVA_HOME.  However, I know with certainty that this path was hard-coded to some relative path to the JRE bundled with Jira).

So, to summarize the observed behavior (note that * indicates any value)...

Jira Observed Behavior.png

All of these observations support my assertion that tomcat is run using the bundled JRE, regardless of what JAVA_HOME is set to, unless you additionally run the tomcat8w.exe modification indicated in my original post.  If there is evidence to suggest otherwise, please present it here.

One final note... in the README.txt delivered with the zipped version of Jira (atlassian-jira-software-8.4.1.zip), the first step reads "Install Oracle's Java Development Kid (JDK) or Java Runtime Environment (JRE) 8, or AdoptOpenJDK 8."  It's possible this file simply didn't get updated when they added Java 11 support, but it seems equally possible given my observations that Java 11 isn't yet fully supported.

I hope that I am wrong, and that it is possible to setup Jira with Java 11, but so far it looks like Java 11 is only partially supported.  Thanks.

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2019

Let check this on some VM and come back to you.

Jeffrey Gullett September 24, 2019

I opened a support request with Atlassian, and they figured out that it was because I failed to follow the instructions in the giant yellow box if attempting to use Java 9+: https://confluence.atlassian.com/jirakb/how-to-use-a-jdk-or-jre-exclusively-on-jira-765594330.html.  When configuring tomcat with Java 9+, you have to change the JVM options in addition to changing the JVM path.

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2019

That is greate @Jeffrey Gullett 

Tim_Menke January 29, 2020

The supported platforms page for 8.5 claim that they only support up to version 11.0.2.  Is this outdated information since you're using 11.0.4 on 8.4?   I'm planning to upgrade to 8.5 Enterprise release in the near future so I'm researching using AdoptOpenJDK which brought me here.

Thanks!

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 29, 2020

@Tim_MenkeThe information that "we support AdoptJDK version upto 11.0.2" is only visible for Jira version '8.5', probably because this is enterprise version.

If you check supported platform for Jira 8.4 or 8.6, you will find that no specifications are mentioned about minor version of AdoptJDK.

Tim_Menke January 30, 2020

But Enterprise versions are supposed to support all security updates right?   If I can't upgrade past 11.0.2, then I'm exposed to a large number of vulnerabilities, am I not?

Why would I use an Enterprise release if this is the case?

Suggest an answer

Log in or Sign up to answer