Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Recovered JIRA 7.11.0 onto new Ubuntu 20.04, how to find JVM version?

_derep May 11, 2020

Jira 7.11.0
Ubuntu 20.04

We have JIRA installed on a local server in our office. Last week the server went down and it was a HDD failure.

We were able to back up the Jira /opt folder and the application data stored in /var, we also backed up the MySQL database. With all the data backed up the HDD was scrubbed clean, remapped the sectors and we went about recreating the server. Before the break we had been running on Ubuntu 16.04. We decided to update to 20.04.

With the server operational we copied back the /opt folder and the /var folder and reimported the MySQL database.

We then needed Java on the server and we have gone about this 2 different ways, neither has worked.

Attempt 1

Following the installation instructions here, we attempted to install Server JRE 8: https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_server_jre.html#CACJHCDD

I downloaded the server-jre-8u251-linux-x64.tar.gz file, rsynced it to the server, unpacked the tarball and installed according to the instructions.

Running `./startup.sh` revealed no success, just an error message. View error message below. Following the instructions here we tried setting the JAVA_HOME variable: https://confluence.atlassian.com/adminjiraserver/installing-java-938846828.html

Setting the /etc/environment did not work so we set the global /etc/profile. This did not work.

At some point shortly after, probably due to a PICNIC error, the entire server was corrupted and we had to start from fresh.

Attempt 2

Following the installation instructions here, we installed Java through the apt packages: https://linuxize.com/post/install-java-on-ubuntu-20-04/

sudo apt update
sudo apt install openjdk-8-jdk

Running the command `java -version` did output a javaversion (see below).

Following the instructions we set the JAVA_HOME variable in /etc/environment and running `echo $JAVA_HOME` did indeed show the right path (below).

However, neither restarting shell, rebooting the server or anything would get any other message other than a failure when running `./startup.sh`.

Shell outputs

root@server:/opt/atlassian/jira/bin# ./startup.sh
.....
.... .NMMMD. ...
.8MMM. $MMN,..~MMMO.
.?MMM. .MMM?.

OMMMMZ. .,NMMMN~
.IMMMMMM. .NMMMN. .MMMMMN,
,MMMMMM$..3MD..ZMMMMMM.
=NMMMMMM,. .,MMMMMMD.
.MMMMMMMM8MMMMMMM,
.ONMMMMMMMMMMZ.
,NMMMMMMM8.
.:,.$MMMMMMM
.IMMMM..NMMMMMD.
.8MMMMM: :NMMMMN.
.MMMMMM. .MMMMM~.
.MMMMMN .MMMMM?.

Atlassian JIRA
Version : 7.11.0

If you encounter issues starting or stopping JIRA, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide


Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
Using CATALINA_BASE: /opt/atlassian/jira
Using CATALINA_HOME: /opt/atlassian/jira
Using CATALINA_TMPDIR: /opt/atlassian/jira/temp
Using JRE_HOME: /opt/atlassian/jira/jre/
Using CLASSPATH: /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/atlassian/jira/work/catalina.pid
*************************************************************************************************************************************
********** Wrong JVM version! You are running with .. but JIRA requires at least 1.8 to run. **********
*************************************************************************************************************************************



root@server:/opt/atlassian/jira/bin# java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)



root@server:/opt/atlassian/jira/bin# echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64

In the cataline.out log file there is only a warning about SSL certificate which can be ignored as will be sorted once Jira is running:

root@server:/opt/atlassian/jira/bin# tail -3 /opt/atlassian/jira/logs/catalina.out 
Wed May 06 12:43:34 BST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Wed May 06 12:43:34 BST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Wed May 06 12:43:34 BST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

 

Question

So, the question is, how do I get this to work? Our JIRA is used to manage 2 projects, one of which has a history of 8 years worth of jobs. We do not have an exported list of jobs to reimport into a fresh install, but if there is a way of getting the jobs onto a fresh install I'm all ears. To my understanding though I believe I need to get JIRA 7.11.0 working with the old data before updating to the latest version of JIRA?

 

Much thanks for your help!

1 answer

1 accepted

0 votes
Answer accepted
_derep May 13, 2020

We eventually found the answer.

Step 1

Delete Jira and everything to do with it. Delete Java and everything to do with it. You want to start from a fresh install perspective. If you edited the /etc/environment file to add $JAVA_HOME, delete that line.

Step 2

If you have the latest version of MySQL (8.0) installed on your Ubuntu 20.04 server, because why wouldn't you, it's been out for over 2 years and 5.7 isn't even available, delete it.

Then following this answer, install MySQL 5.7 onto Ubuntu 20.04:

https://askubuntu.com/a/1232993/629125

Test you have MySQL 5.7 installed, if successful, continue.

Side note: Jira really need to get to speed and support MySQL 8.0. It's been out for over 2 years and installing 5.7 meant looking into package repo's for an old version of Ubuntu. So far it is merely "under consideration" which is not good enough: https://jira.atlassian.com/browse/JRASERVER-67359

Step 3

Import your backed up Jira database. Create the relevant user and correct password with access to that database. Ensure the username and password are the same as before. As per this link, grant the relevant privileges to that MySQL user:

https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-mysql-5-7-966063305.html

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on <JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>';
flush privileges;

Still following the guide in the link above, set the correct parameters in your mysqld.cnf file. The guide says to edit my.cnf, but I chose to edit the following:

nano /etc/mysql/mysql.conf.d/mysqld.cnf

Add the following lines under the [mysqld] section:

#changes per request from JIRA to enable MySQL access
default-storage-engine=INNODB
character_set_server=utf8mb4
innodb_default_row_format=DYNAMIC
innodb_large_prefix=ON
innodb_file_format=Barracuda
innodb_log_file_size=2G

If it exists (didn't for me) remove the following line:

sql_mode = NO_AUTO_VALUE_ON_ZERO

Restart the mysql service.

Step 4

Install Jira 7.11.0. On the following link, click 'Older Versions', find 7.11.0 and download the Linux 64 bit installer.

https://www.atlassian.com/software/jira/download

By your preferred method, transfer the downloaded file method to your server. For me:

rsync -avz -e 'ssh -p <port_number>' atlassian-jira-core-7.11.0-x64.bin me@192.168.1.110:/home/me

 Step 5

Log into server and find where you sent the file. As per instructions found here, https://confluence.atlassian.com/adminjiraserver/installing-jira-applications-on-linux-938846841.html, make the file executable:

chmod a+x atlassian-jira-core-7.11.0-x64.bin

 Then execute the file:

sudo ./atlassian-jira-core-7.11.0-x64.bin

Install Jira the way you want. If you don't install into /opt make a note of where you installed it for the next step. At the end allow it to run Jira to make sure it's installed correctly. If you see a success message do not do anything else, immediately shutdown jira:

cd /opt/atlassian/jira/bin
./shutdown.sh

Step 6

Download the latest JBDC connector driver: https://dev.mysql.com/downloads/connector/j/5.1.html

Unpack the .tar file on your computer and you will end up with a .jar driver file.

mysql-connector-java-5.1.49.jar

Transfer that file to your server as in step 4 above. Then move it to the /lib directory for wherever you installed Jira. To do that cd into the directory you sent the file, then:

mv mysql-connector-java-5.1.49.jar /opt/atlassian/jira/lib/

Step 7

Using rsync, copy the old contents of var into the newly created one during install.

rsync -avz atlassian_temp/ /var/atlassian/

This will copy over all the important files including your dbconfig.xml file which will enable login through MySQL to your already existing database.

Step 8

Start the Jira service and open Jira in a browser. Your old installation will load up with your old job history.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.11.0
TAGS
AUG Leaders

Atlassian Community Events