Problems with creating a JIRA staging server

Michael Schwaller August 16, 2016

I was attempting to follow JIRA's documentation for creating a staging server (https://confluence.atlassian.com/adminjiraserver071/establishing-staging-server-environments-for-jira-applications-802592273.html).

My current JIRA version is 7.1.1 running on linux against an Oracle 12c database with service desk installed.

I followed the documentation where I copied the "install" directory and the "home" directories over to a new server and created a copy of my production Oracle DB.  I don't know if it makes a difference, but I copied the directories while my server was up and running.  I updated my jira.home property in the jira-application.properties file since my new server location was different.  I also updated my dbconfig.xml to point to my copied database instance.  I decided to uncomment the "DISABLE_NOTIFICATIONS" to essentially disable mail server processing on my staging server.

I started my new JIRA server up and it appears many of the paths still point to my current production server (JAVA_HOME, CATALINA_BASE, CATALINA_HOME, temp directory, etc) even though I am connected to a copied version of the production DB.  I see the JAVA_HOME parameter had been set in the setenv.sh file, so I have to manually update that environment variable.  Otherwise I don't see any other references to my production directories.

I don't think I have caused any production issues or data corruption but has anyone else experienced this?  Am I missing any configuration changes other than the base URL which I updated once the server was up and running?  Thanks for your help!

2 answers

0 votes
Michael Schwaller September 19, 2016

I ended up updating my JAVA_HOME environment variable in my setenv.sh file.  I also found a JIRA issue explaining about jira.path.attachments not getting updated when migrating from one machine to another - https://jira.atlassian.com/browse/JRA-29693

With my first change, my server is now running with my java jre from my current machine (with the copied install directory) and it looks like the old host references were only for jira.path.attachments and jira.path.backup.  I believe this works now although confusing with old host references.

Jonas - Thanks for your help.  I have to check with our DBAs about replacing text after exporting an Oracle database.

0 votes
Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2016

Also check server.xml, if you use a rewrite proxy in front of your production instance there will be a hostname there too. On the new server i would also fill the /etc/hosts with all the old hostnames in case something is trying to chatter with production it's always better if they get looped to localhost. Make sure to include short and FQDN in the list. If added to the physical ip or to the localhost makes no real difference, traffic will stay on the box.

Once thing never covered in any guide on creating a clone server is that hostnames are hardcoded in so many pages in the database. With a mysql jira/confluence instance i normally dump the database to a file, and then sed replace all hostnames (for ANY associated application server, like bamboo, confluence, fisheye, crucible, stash, basically the same hostnames i would add to localhost in etc/hosts), then reimport the database.

I never worked with Oracle databases but i assume you have a similar text/csv export/import functionality?

Hope this helps.

Suggest an answer

Log in or Sign up to answer