Moving JIRA

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

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

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))

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

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)

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

Hi Nick,

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

Or in the catalina.out?

Best regards,

Peter

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)

nothing noteworthy in atlassian.jira.log

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)
 
 
 

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

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 vote
Joe Wai Tye Atlassian Team Jun 08, 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

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

That means you've no password set!

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.

Joe Wai Tye Atlassian Team Jun 08, 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 :)

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.

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?

No.

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

Joe Wai Tye Atlassian Team Jun 08, 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.

0 vote

>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.

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?

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.

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

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.

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?

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)

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?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

365 views 4 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you