Moving JIRA

NickW June 8, 2014

Hi All

I am moving our instance of JIRA to a more powerful machine. To do so I am currently installing the same software set up we currently use so that I can then copy the HOME and Install directories over.

The bit I am puzzling over is creating a new JIRA db on the new machine into which the db can be imported. For which i will use something like:

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on JIRADB.* TO 'jiradbuser'@'localhost' IDENTIFIED BY 'password';

flush privileges;

The bit I am wondering about is do "jiradbuser" and "password" have to match that when the original db was set up? If so is there anyway i can retrieve this as at the moment I cannot remember/locate them.

I looked at

https://confluence.atlassian.com/display/JIRAKB/JIRA+Unable+to+Update+MySQL

Which seems to imply they can be found in

<jira-install>/conf/server.xml

But I cannot see the information there.

Thanks for you help

Nick


3 answers

1 accepted

0 votes
Answer accepted
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2014

Hi Nick,

Just a question: Why don't you simply install a new JIRA instance and use the restore backup option to import all data? It would simply be the following steps:

  1. Install the same version of JIRA with the same plugins as in your old instance on the new server (using the new MYSQL Database)
  2. Make a backup of the full Old JIRA Instance
  3. Restore the backup into the new JIRA Instance
  4. Copy over the data folder if needed from the old JIRA home directory to the new JIRA home directory.
  5. Go home and have a beer to celebrate :)

Best regards,

Peter

NickW June 23, 2014

Hi Peter

I thought thats what I have done..

1. Exported data

2. Installed MYSQL on new machine; created new empty database

3. Installed JIRA

4. Connected JIRA and imported the exported data

5. Over wrote new JIRA install and home directories with previous from spource machine

6. Try to connect and then get issue (described above)

HTTP Status 500 - com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (Access denied for user 'jiradbuser'@'localhost' (using password: NO))

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2014

Go to you myssql and execute the following commands:

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on JIRADB.* TO 'jiradbuser'@'*' IDENTIFIED BY 'password';

flush privileges;

then update your dbconfig.xml to use the password.

restart JIRA, try again.

I thought you exported the database using the mysql tools, not the Jira tools.

Best regards,

Peter

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2014

You said earlier that the import timed out, which could explain some of the problems you're getting.

Not the "unable to establish connection" message - that's happening before you hit any potentially damaged data.

As Peter says, you really should be using the database's own tools to get a full clean copy and import that (unless you're changing database or upgrading really old Jiras)

NickW June 23, 2014

Hi Peter

Many thanks.. I no longer get the error previously mentioned... now I get nothing. it looks like the connection is made.. the browser tab has the JIRA mini icon but no web page is displayed.

The config tool says the db connects succesfully

I double checked the dbconfig.xml file... that has the password

tried rebooting.. no change

Beginning to think I need to start over....

Nick

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2014

Hi Nick,

Is there any mention of an error in your atlassian-jira.log file?

Or in the catalina.out?

Best regards,

Peter

NickW June 23, 2014
The Catalina logs shows:
 
Jun 24, 2014 1:50:57 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [jiratags] and URI [/WEB-INF/tld/atlassian-jira-tags.tld]
java.net.MalformedURLException
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
	at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:515)
	at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:328)
	at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:243)
	at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:540)

NickW June 23, 2014

nothing noteworthy in atlassian.jira.log

NickW June 23, 2014

Hi Peter

I just used MySQLWOrkbench to do an export and then import. That all seemed to go OK

on using a browser I am seeing:

HTTP Status 500 - /views/setup-db.jsp (line: 1, column: 38) File "/WEB-INF/tld/webwork.tld" not found

type Exception report

message /views/setup-db.jsp (line: 1, column: 38) File "/WEB-INF/tld/webwork.tld" not found

description The server encountered an internal error (/views/setup-db.jsp (line: 1, column: 38) File "/WEB-INF/tld/webwork.tld" not found) that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: /views/setup-db.jsp (line: 1, column: 38) File "/WEB-INF/tld/webwork.tld" not found
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:133)
	org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:166)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
 
 
 
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2014

Did you also copy the install directory or is this a newly installed JIRA instance?

You seem to be missing some files in your installation directory.

Find those files (webwork.tld) and place them in the correct location, the try again.

Best regards,

Peter

NickW June 24, 2014

Hi Peter

Finally success. Very odd those files were missing... cant explain that.

So final solution was to recopy the INSTALL and HOME dirs

and export and import the databases using MySQL Workbench

Now to do some validation. Thanks to all those that helped out.

Nick

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 8, 2014

>mmm now thats very odd and I suspect not good practice.

Well you should take that up with who did it! I'd never recommend it either!

>In someways my original question stands.. do the username & password I set here HAVE to match those that were set in the original database.

Yes, if you want to use the same database unchanged

>If not then I can create this new DB with user and password to anything.

If you import the whole database including all its settings, then you'll inherit username/password. Absolutley no reason you can't simply change it and use what you like.

NickW June 22, 2014

Hi All sorry for the quiet period... Only just back on trying to move JIRA

OK: So I backed up the HOME and INSTALL Directories after exporting the data.

I transferred these to the new machine and imported the data. (first concern is that I got a server timed out message after 35 mins. When I started a browser things seemed to be there...

Anyway I then pressed on with copying over the HOME and INSTALL Directories.

The JIRA service seems to start OK (using services.msc on windows)

But when I fire up the browser I now get:

HTTP Status 500 - com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (Access denied for user 'jiradbuser'@'localhost' (using password: NO))

Then I remembered the original db didnt have a password and on this one I had set one. So I edited the dbconfig to reflect this.

Again restarting the service and opening a browser I get the same message... I am sure this is linked to what you wrote nic.. but I am at a loss

Any offers?

Vijay Khacharia
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.
June 22, 2014

Can you try connection to DB using username and password using configuration utility? Here are steps from documentation.

JIRA configuration tool

  1. Run the JIRA configuration tool as follows:
  2. Navigate to the Database tab and set Database type to MySQL.
  3. Fill out the fields, as described in the Database connection fieldssection below.
  4. Test your connection and save.
  5. Restart JIRA.
NickW June 22, 2014

Thanks Vijay.. I had forgotten that tool. Just tried it and the toold says 'connection successful'

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 22, 2014

That shows you can now get into the database using whatever credentials you used for that test.

Next step would be to try reconnecting the Jira instance.

However, my next question is why you're trying to use xml? If you're not changing database type, or trying to upgrade an old version of Jira, you really should just take a copy of the old data and connect Jira to it.

NickW June 23, 2014

Hi Nic,

Perhaps I am being dense. I read what you wrote nic but I dont understand it. I mean I just looked on the JIRA website about how to move servers and tried to do what it said.. namely copy and replace the installation and home dirs after importing the exported data. When you write:

"you really should just take a copy of the old data and connect Jira to it."

what do you mean?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2014

Jira is made up of several components (I won't bore you with details of these), one of which is the data that represents your issues, projects, most of the configuration and so-on.

This data lives in a database, which is completely separate to Jira

If you want to "move" a Jira installation, you can pick up all the other components and move them to a new place, and point them at the old database. You don't need to touch the database at all if you are simply moving the appliction to a new server.

There is often a slight complication - if you are running the database server on the same server as Jira and you decide to move that as well, then you've got the additional task of moving the database stuff, but again, if you're just moving it, you don't need to do anything other than make the database work as it did before.

You only need the export/import if you are changing the underlying database (e.g. Oracle -> MySQL) or upgrading older versions of Jira (newer versions from 4.something, it's recommended to use the automatic upgrade function)

NickW June 23, 2014

Thanks Nic...I am moving both the database and JIRA server to a new VM... that is why I have moved JIRA... but I thought I had to set up MySQL again and that included doing an export and import of the data into the newly setup database.

You wrote: then you've got the additional task of moving the database stuff, but again, if you're just moving it, you don't need to do anything other than make the database work as it did before.

Are you saying I can do a fresh install of MYSQL and then overwrite it with the old installation?

0 votes
Theinvisibleman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2014

Hey there Nick,

You should be able to find the username and password used to connect to your DB inside the 'dbconfig.xml' file which is in your JIRA Home directory

NickW June 8, 2014

Hi Joe,

Thanks for the quick reply. in dbconfig.xml I see:

<username>jiradbuser</username>

<password></password>

Does this mean no password Or is it obfuscated?

Nick

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 8, 2014

That means you've no password set!

NickW June 8, 2014

Thanks Nic

mmm now thats very odd and I suspect not good practice.

In someways my original question stands.. do the username & password I set here HAVE to match those that were set in the original database. If not then I can create this new DB with user and password to anything.

Theinvisibleman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2014

Hmm, I don't think that it has to be the same. The username and password is just to create the connection to the database server, I believe. As long as the instance is connected to the database properly, it should work fine.

...Of course, always have a backup in hand :)

NickW June 8, 2014

Just had a thought..... or doesnt it mater its the same key and its just the total number of licences in use e.g. for a 500 licence.. having 2 server with 250 users on each would work.

NickW June 8, 2014
OK. Pressing on with setting the new system up.. will award Karma when completed ;-) What happens about licencing when I reach the 'specify your licence key'section of the setup? I mean if I go to my atlassian account and specify a new server ID and generate a key my assumption is that the production environment will no longer work. I want to be able to get the new site up and data transferred before I kill the old server. Am I missing something obvious? Can you get a temporary licence when there is work in progress?
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 8, 2014

No.

The licences is X users on a single server. For two servers, you need two licences.

Theinvisibleman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2014

Indeed, a license is only meant for a single server/instance. If you are running more than one, then you would need a license for each one.

What I can suggest would be, generate a dev or eval license. For now, use the dev/eval license in your newly set up instance. Once everything is confirmed to work fine in the new instance (and all of your users have moved to the new instance), switch the production license into the new instance.

Suggest an answer

Log in or Sign up to answer