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

new DB creation even if the database exists (jira-core container vs MySQL host) Edited

I'm new to containers and maybe I lack some impostant knowledges.
My goal was to create a jira-core container with my customizations (my plugins, some configuration files etc.) and to use it connected to a MySQL server running on the host, with already stored issues (i.e. already used with a normal jira-core instance).
I succeeded in connecting the customized container (FROM atlassian/jira-core:7.13.2-jdk8) to the server (after some failed attemps) sharing the dbconfig.xml file (through a VOLUME [${JIRA_HOME}]) and modifing the url string in it.

When the jira container started the 1st time in the log there were traces like these:

[...]
JIRA-Bootstrap WARN [o.o.c.entity.jdbc.DatabaseUtil] Entity "Action" has no table in the database
JIRA-Bootstrap ERROR [o.o.c.entity.jdbc.DatabaseUtil] Could not create table "jira_docker01.jiraaction"
JIRA-Bootstrap ERROR [o.o.c.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE jira_docker01.jiraaction (ID DECIMAL(18,0) NOT NULL, issueid DECIMAL(18,0), AUTHOR VARCHAR(255), actiontype VARCHAR(255), actionlevel VARCHAR(255), rolelevel DECIMAL(18,0), actionbody LONGTEXT, CREATED DATETIME, UPDATEAUTHOR VARCHAR(255), UPDATED DATETIME, actionnum DECIMAL(18,0), CONSTRAINT PK_jiraaction PRIMARY KEY (ID))
Error was: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jiraaction' already exists
JIRA-Bootstrap WARN [o.o.c.entity.jdbc.DatabaseUtil] Entity "Application" has no table in the database
JIRA-Bootstrap ERROR [o.o.c.entity.jdbc.DatabaseUtil] Could not create table "jira_docker01.cwd_application"
JIRA-Bootstrap ERROR [o.o.c.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
CREATE TABLE jira_docker01.cwd_application (ID DECIMAL(18,0) NOT NULL, application_name VARCHAR(255), lower_application_name VARCHAR(255), created_date DATETIME, updated_date DATETIME, active DECIMAL(9,0), description VARCHAR(255), application_type VARCHAR(255), credential VARCHAR(255), CONSTRAINT PK_cwd_application PRIMARY KEY (ID))
Error was: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cwd_application' already exists
[...]

However the connection was ok and the running container had my all old issues.
My question is: why the installation process tries to create the tables in the DB if in dbconfig.xml I configured an existing one ?

I hope I've been clear enough in writing the question.
Thanks.

1 answer

0 votes

The setup in your home directory does not match the data that is in the existing database.  Your new Jira is still in a state where it expects to be given an empty database so that it can go through the setup routine.

If you are trying to create a new Jira install and connect it to a pre-existing database, what you need to do several steps (apologies if you did do this, but I couldn't see all the steps called out in your question)

Download a Jira install of exactly the same version as the existing database was from

  • Create a new empty database
  • Install Jira, pointed at the empty database, running through to the point where you can log in as the admin and be asked to start creating projects and users etc
  • Stop it
  • Change the dbconfig file so it points at the old database
  • Restart it
  • Log in using an admin user from the old Jira
  • Run a full re-index

I'll try a new docker build following your steps and I'll let you know, but I don't understand why I should start/stop and then change dbconfig.xml and restart.

My steps were:

  • Create a new database (let's call it mydbcpy) where I copied my actual development database (let's call it mydborig)
  • Build a docker image with VOLUME command to share /var/atlassian/application-data/jira where I store my plugins (in plugins/installed-plugins) and my dbconfig.xml file pointed to the newly copied database
  • Start the docker
  • Run the full re-index

At this point the behaviour I was expecting that Jira starts and, according the dbconfig.xml, it begins to use the mydbcpy database. Jira detects it but it tries to create the tables and just after doing this, it uses it and all datas in it.

You need to do this because your installation does not match your database.

Your steps are wrong because you have created a new Jira that is missing all the config it needs and then pointed it at a load of data it is not expecting to see. 

A plain Jira install that has not yet run through the initial set up is missing a whole load of stuff it needs before it can be used.  You've not done any of that, you've just expected it work without any setup. 

It's a bit like putting me in front of a partly done oil painting and expecting me to finish it without teaching me how to paint first, not least the bit about going to get the paint and brushes I'll need.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

326 views 9 7
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