Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to install jira-software: error message "You have specified a database that is not empty"

I'm unable to install jira-software due to the error message "You have specified a database that is not empty, please specify an empty database."

 

I've tried a complete fresh install after deleting the directories /opt/atlassian/jira/ and /var/atlassian with a new database.

 

The server is running Ubuntu Linux 20.04

jira-software 8.13.0

MySQL 8.0.21

MySQL connector 8.0.21

2 answers

1 accepted

2 votes
Answer accepted
Andy Heinzer Atlassian Team Oct 28, 2020

Hi Daniel,

I can see that you are trying to install Jira server with a MySQL database.  The error message would appear to indicate that the database selected might not be setup correctly for Jira to use.

I would want to make sure that you are following our version specific guide for both setting up MySQL and Jira over in Connecting Jira applications to MySQL 8.0.  There are a couple of different ways in which that dbconfig.xml file can be properly filled out.  My preferred method is to use the Jira Config tool to do this, after Jira has been installed, but before Jira has been started.

This is a setup utility that is also using Java.  It has both a terminal interface for headless machines and a gui for other environments.  But the thing I like best about this utility is that once you have your connection details filled out, there is also a 'Test Connection' button you can use to try to confirm that this other utility can also connect to your database as expected.  Saving the changes here and then starting/restarting Jira will still launch the setup wizard for Jira, but at least this way you do not have to try to configure the database in the setup wizard.

Try these steps, if you're still running into problems here, I'd be interested to see any screenshots of errors you might get, or even any log entries you might find in the $JIRAINSTALL/logs/catalina.out file.  These should help provide us additional clues here if we run into problems.

Andy

Thank you Andy, that's where I think I was heading, but I it would have taken some more steps for me to get there.  So I'm glad you've jumped ahead to give us a better and faster answer.

Thankyou, 

 

Using "config.sh" via the command line seemed to do the trick.

I am having an issue where the web setup interface incorrectly failed on DB setup telling me my database was not empty. I opened a mysql shell to the database (Mysql 8, Jira Software 8.16.0, mysql connector 8.0.23) and checked the database with the following output:

mysql> use jira_software 
Database changed
mysql> show tables;
Empty set (0.00 sec)

So after searching around for a bit online I found this thread. I tried doing a fresh install and used config.sh to configure the database before starting Jira and now Jira is unusable and showing the following error in the log output:

2021-04-16 10:24:52,825+0100 JIRA-Bootstrap INFO [c.a.j.config.database.SystemDatabaseConfigurationLoader] Reading database configuration from /opt/atlassian/application-data/jira/dbconfig.xml 2021-04-16 10:24:52,855+0100 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Trying to get encrypted password from xml and decrypt it 2021-04-16 10:24:52,857+0100 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Database password decryption not performed. 16-Apr-2021 10:24:52.881 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 4110 ms 2021-04-16 10:24:53,404+0100 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger] Running Jira startup checks. 2021-04-16 10:24:53,404+0100 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger] Jira pre-database startup checks completed successfully. 2021-04-16 10:24:56,152+0100 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigurationManagerImpl] The database is configured. Now running Database Checklist Launcher 2021-04-16 10:24:56,154+0100 JIRA-Bootstrap INFO [c.a.jira.startup.DatabaseChecklistLauncher] Jira database startup checks completed successfully. 2021-04-16 10:24:56,155+0100 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigurationManagerImpl] The database is configured. Now running Post database-configuration launchers 2021-04-16 10:24:57,820+0100 JIRA-Bootstrap INFO [c.a.j.config.database.SystemDatabaseConfigurationLoader] Reading database configuration from /opt/atlassian/application-data/jira/dbconfig.xml 2021-04-16 10:24:57,822+0100 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Trying to get encrypted password from xml and decrypt it 2021-04-16 10:24:57,822+0100 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Database password decryption not performed. 2021-04-16 10:24:58,145+0100 JIRA-Bootstrap ERROR [c.a.jira.startup.ComponentContainerLauncher] A fatal error occurred during initialisation. JIRA has been locked. com.opensymphony.module.propertyset.PropertyImplementationException: Unable to load values for CacheKey[entityName=jira.properties,entityId=1] at com.atlassian.jira.propertyset.CachingOfBizPropertyEntryStore.propEx(CachingOfBizPropertyEntryStore.java:374) at com.atlassian.jira.propertyset.CachingOfBizPropertyEntryStore.resolve(CachingOfBizPropertyEntryStore.java:128) at com.atlassian.jira.propertyset.CachingOfBizPropertyEntryStore.getEntry(CachingOfBizPropertyEntryStore.java:151) at com.atlassian.jira.propertyset.CachingOfBizPropertySet.get(CachingOfBizPropertySet.java:189) 

That means Jira can't connect to your database because the settings are incorrect - it looks like there is a database there, but the encrypted password is wrong in the settings file.

Hi Nic,

In this instance would the settings file be dbconfig.xml?

 

I can see the file has been created by config.sh but the password string is simply the password in plaintext.

Andy Heinzer Atlassian Team Apr 16, 2021

The $JIRAHOME/dbconfig.xml file will contain the settings that Jira is trying to use to connect to that database.  So yes, it could be a configuration there. 

But this kind of error could also be caused by the sql user/permissions that was setup here (that Jira is trying to use to connect to that database).  The Connecting to MySQL documentation explains what SQL commands we expect you to have to run to setup the database in a manner that Jira will be able to read/write/create tables/etc.

Also if you did a fresh install, don't forget that you need to copy the mysql jdbc .jar file back into the $JIRAINSTALL/lib/ directory before you run the config.sh, or else Jira can't really connect to that database type.  Check this again, and when you are in the config tool, there should be an option for you to Test Connection to the database.  Try that and see what output it comes back with.  This should give us another clue if Jira is able to connect to that database.

Andy

>  The Connecting to MySQL documentation explains what SQL commands we expect you to have to run to setup the database in a manner that Jira will be able to read/write/create tables/etc.

This db host already has one perfectly working JIRA servicedesk instance running on it.

 

> Also if you did a fresh install, don't forget that you need to copy the mysql jdbc .jar file back into the $JIRAINSTALL/lib/

 

Yes, I did that.

 

> Test Connection to the database

 

I did that too and it worked.

 

However starting JIRA still fails.

Andy Heinzer Atlassian Team Apr 19, 2021

Is it possible that you are connecting this new Jira installation to an existing database that is use by another Jira application that is currently running?  That would explain the setup wizard's error in regards to your database not being empty and could explain the startup problem here.  When Jira is started, there tends to be a flag of sorts in the database that goes up to prevent other sites from corrupting the database with two different servers trying to write to the same database.  Data Center deployments have a differing means to get around this, but if sounds like this might be the case.

Creating a new database with a unique name should help avoid this problem.  If you're still seeing this problem, then try starting Jira again and then look into the $JIRAINSTALL/logs/catalina.out file.  This is another log file that tends to capture some more detailed information about the startup that might not always be in the $JiraHome/log/atlassian-jira.log file.

Here are the dbconfig.xml files for comparison. Above is the config for our servicedesk instance which works, and was installed first. Below is the Software instance I'm trying to get working. They're identical except for the database name:

 

2021-04-20T08_57_07,912014961+01_00.png

 

Both databases are running in a single mysql 8 instance and use the same login credentials.

Andy Heinzer Atlassian Team Apr 21, 2021

It doesn't look like the problem is in the dbconfig file itself, at least from what I can see.  Which would then suggest that the problem lies in the way the database is configured. There is another thread with a very similar error message to this over in https://community.atlassian.com/t5/Jira-Core-questions/Error-when-installing-Jira/qaq-p/1114909

The solution in that case was to recreate the database because it had been created with an unsupported collation.  Perhaps the same problem exists here as well.

We've solved it. The problem apparently arises because db user account could access more than one database. We created separate db user accounts for each database and now JIRA starts and can complete the installation as expected.

0 votes

This usually means what it has says - the installer expects an empty database and you have pointed it to one that has data in it.

I'd log into the database and do a "show tables" type thing to see what might be there.  Does that list no tables, tables related to Atlassian stuff or unrelated tables?

The database set to be used by Jira returns "empty set", not sure if this is some kind of bug or if I have an incorrect setting somewhere

I don't know what "returns empty set" means, you've not told us what you are doing to get that.

The problem here really is that there are tables in the target database and Jira won't try to insert itself into a database that is already there for something else.

Maybe should have been clearer, when logging into MySQL, using the database selected by Jira and carrying out the command "show tables", MySQL returns  "empty set" stating that there are no tables in the database.

Ok, I suspect your Jira is not looking at that database then.

Check the content of <jira home>/dbconfig.xml says what you expect it to.

So I suspected that at one point, I tried dropping the database and retrying the connection and got the anticipated "database does not exist" message.

The <jira home>/dbconfig.xml file does not exist, I didn't think this got created until the database has been setup?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Why everyone using Jira must be GDPR-compliant

Did you know that penalties up to 4 % of the yearly company turnover are possible in case of GDPR violations? GDPR regulations are currently mainly relevant for companies in the EU, but countries lik...

46 views 0 0
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you