Hello !
We have a production server and a test one.
Recently, to prepare the migration to last version of Jira, we made a copy of the production server to replace the test server. I've changed the jira/dbconfig.xml file to specify the test database but it still tries to connect to the production database. Il the log file of the test server, I have this :
com.atlassian.jira.exception.DataAccessException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'jira'@'a.b.c.d' to database 'jira'
In dbconfig.xml, I have this :
<database-type>mysql</database-type>
<schema-name>jiratest</schema-name>
<jdbc-datasource>
<url>jdbc:mysql://my.dbserver.fr:3306/jiratest?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB</url>
Any idea ?
I finally found where was the problem !
Production server is configured to access website by a classical URL instead of :8080 port. When copying the production server to replace the test one, production config has been copied too. I access test server by its IP address but virtual host config and worker-properties config in Apache were prior to dbconfig.xml and that's why test server tried to connect to the production database.
Problem solved ! Now I can try to migrate Jira to the newest version on the test server.
jira.home must be pointing to some other home directory. It can be set by system property, or in jira-application.properties... check both of those.
Or for a quick check make dbconfig.xml invalid by removing some xml tag, and make sure you get an error about that on startup.
The other possibility is that you also have a JNDI name in dbconfig.xml, with the datasource defined in your server.xml, but seems unlikely.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In fact, it's not OK !
I've changed url in jira/dbconfig.xml, in data/jira/dbconfig.xml and in jira/atlassian-jira/WEB-INF/classes/database-defaults/mysql.properties but after restarting Jira, it still shows this ural in administration/system/troubleshooting and support/system informations :
Adresse JNDI de la base de données mysql jdbc:mysql://mydbserver:3306/jira?useUnicode=true&characterEncoding=UTF8&sessionVariables=storage_engine=InnoDB URL de la base de données jdbc:mysql://mydbserver:3306/jira?useUnicode=true&characterEncoding=UTF8&sessionVariables=storage_engine=InnoDB
In witch file is defined JNDI database address ? |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've renamed the two dbconfig.xml files and restarted Jira and Jira started with the JNDI and URL given in my previous message !
So these values are recorded somewhere else but where ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I finally found where was the problem !
Production server is configured to access website by a classical URL instead of :8080 port. When copying the production server to replace the test one, production config has been copied too. I access test server by its IP address but virtual host config and worker-properties config in Apache were prior to dbconfig.xml and that's why test server tried to connect to the production database.
Problem solved ! Now I can try to migrate Jira to the newest version on the test server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've found there are two dbconfig.xml files on the server !
One in jira directory and one in data directory and the real one is the second one !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right, so my answer was basically correct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try restarting the test instance so that the changes in dbconfig.xml is picked up?
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.