Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to connect JIRA

Abhijit Dongre June 3, 2019

2019-06-04 11:27:43,678 JIRA-Bootstrap INFO [c.a.j.config.database.SystemDatabaseConfigurationLoader] Reading database configuration from C:\Program Files\Atlassian\Application Data\JIRA\dbconfig.xml
2019-06-04 11:27:44,059 JIRA-Bootstrap ERROR [c.a.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database:
org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: File corrupted in chunk 28589, expected page length =< 192, got 1728392960 [1.4.185/6]" [50000-185]

2 answers

0 votes
Abhijit Dongre June 9, 2019

Hi Dave, I am now succeed to connect JIRA and MySQL, also imported previous data.

But now once I logged into JIRA, it is showing error popup as "Your licenses' user limits are exceeded. Users may not be able to create issues until you have upgraded your licenses or reduced the number of users."

I have deleted user entry from database from tables: cwd_user, cwd_user_attributes, cwd_membership, app_user

But still it is showing same error, kindly refer screenshot

User_Error.png

Abhijit Dongre June 12, 2019

Hi Dave, I have un-installed MySQL and installed 5.6 version and it worked fine, thanks.

0 votes
Dave Bosman [Realdolmen]
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 3, 2019

Hi @Abhijit Dongre 

Is this the first time that you are connecting to the database or is this a an existing setup? 

Could you please give some extra context. What is the current setup (OS, DB)? what did you exactly do before getting this issue? What did you already try to solve this problem? 

Regards

Dave

Abhijit Dongre June 4, 2019

Hi Dave,

kindly find below the details

1. This is not first time I am connecting to DB, it was properly working earlier but due to holidays, installed JIRA server was off for 3 days, but when we try to run again it started to give Database connectivity issue.

2. OS is Windows 10 and database is H2

3. Below steps I tried to resolve it, but still same issue

i. I have deleted files: .jira-home.lock, .bundled-plugins and .osgi-plugins by stopping and restarting Atlassian JIRA service

ii. Deleted Cache folder:  Atlassian\Application Data\JIRA\caches

 

Please refer below screenshot

DB_Error.png

DB_Exception.png

 

Dave Bosman [Realdolmen]
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 4, 2019

Hi @Abhijit Dongre 

I believe the steps you did to resolve it are not the problem. 

But are you using it as a production instance or is it just to evaluate Jira? 

The reason why i ask is because the internal H2 database is not really supported and should only be used for evaluating jira. 

So everything was working before but after a stop - start it does not work anymore. 

About your log entries. 

2019-06-04 11:27:44,059 JIRA-Bootstrap ERROR [c.a.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database:

This one confused me because if i would have to guess, it seems that there is a connection problem. 

But then you have following entry that looks like you have a corrupted database. 

org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: File corrupted in chunk 28589, expected page length =< 192, got 1728392960 [1.4.185/6]" [50000-185]

So knowing what happend now it seems to me that you indeed have a corrupted database. 

If you are using it as a production instance, I presume (hope) you have a backup of the data because this can not be fixed for as far as i know. 

You should install a decent database like MySQL or Postgres. Connect Jira to the new database and import your backup again. 

Regards

Dave

Abhijit Dongre June 5, 2019

Thanks Dave, for your analysis.

I will be grateful to you if you could guide me on below points

1. How to setup MYSQL/Postgres and how to connect it to JIRA

2. Where I can find backup and How to import it,

currently I am see exports under C:\Program Files\Atlassian\Application Data\JIRA\export and there are .zip files which contains activeobjects.xml and entities.xml 

Dave Bosman [Realdolmen]
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 5, 2019

Hi @Abhijit Dongre 

Do a web search for 'install mysql windows 10' and you will find tons of examples on how to install your database. 

Following page will help you with the setup.

https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-mysql-5-6-938846854.html

Once you have the database setup, you can import the zip file in jira with the built in import functionality. 

Regards

Dave

Abhijit Dongre June 6, 2019

Hi Dave, now I am able to connect JIRA with MySQL, but while importing data it is throwing exception as 

SQL Exception while executing the following:DELETE FROM component (Table 'jiradb.component' doesn't exist)

Abhijit Dongre June 6, 2019

JIRA version: Jira 8.1.0

MySQL Version: 5.6

MySQL Connectors: 

mysql-connector-java-5.1.47.jar 

mysql-connector-java-5.1.47-bin.jar

Dave Bosman [Realdolmen]
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 6, 2019

Hi @Abhijit Dongre 

You will need to check your $JIRAHOME/log/atlassian-jira.log for a more detailed error. 

Regards

Dave

Abhijit Dongre June 6, 2019

2019-06-07 10:49:07,880 JiraImportTaskExecutionThread-1 ERROR anonymous 649x21x1 1iwhrv5 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM component (Table 'jiradb.component' doesn't exist))
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM component (Table 'jiradb.component' doesn't exist))
at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:238)
at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.removeByAnd(WrappingOfBizDelegator.java:131)
at com.atlassian.jira.bc.dataimport.DefaultDataImportService.removeAllEntities(DefaultDataImportService.java:1007)
at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:728)
at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:324)
at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.unsafeCall(DataImportAsyncCommand.java:82)
at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:64)
at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:30)
at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:176)
at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:148)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM component (Table 'jiradb.component' doesn't exist))
at org.ofbiz.core.entity.GenericDAO.deleteByAnd(GenericDAO.java:1251)
at org.ofbiz.core.entity.GenericHelperDAO.removeByAnd(GenericHelperDAO.java:236)
at org.ofbiz.core.entity.GenericDelegator.removeByAnd(GenericDelegator.java:1334)
at org.ofbiz.core.entity.GenericDelegator.removeByAnd(GenericDelegator.java:1313)
at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:236)
Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:DELETE FROM component (Table 'jiradb.component' doesn't exist)
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:570)
at org.ofbiz.core.entity.GenericDAO.deleteByAnd(GenericDAO.java:1281)
at org.ofbiz.core.entity.GenericDAO.deleteByAnd(GenericDAO.java:1248)
... 19 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jiradb.component' doesn't exist
... 2 filtered
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2124)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2058)
at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5158)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2043)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
at com.atlassian.jira.ofbiz.sql.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:47)
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:562)
... 21 more

Abhijit Dongre June 6, 2019

2019-06-07 10:49:07,886 JiraImportTaskExecutionThread-1 WARN anonymous 649x21x1 1iwhrv5 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [c.a.j.p.d.dao.impl.CachingOrganizationDaoImpl] onImportCompleted - clearing cache !!
2019-06-07 10:49:07,890 JiraImportTaskExecutionThread-1 INFO anonymous 649x21x1 1iwhrv5 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Importing data is 100% complete...
2019-06-07 10:49:07,890 JiraImportTaskExecutionThread-1 INFO anonymous 649x21x1 1iwhrv5 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [c.a.j.bc.dataimport.DefaultDataImportService] JIRA Data Import has finished.

Dave Bosman [Realdolmen]
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 6, 2019
Abhijit Dongre June 6, 2019

Hi Dave, its already added lower_case_table_names = 1 in my.cnf file

 

also kindly find screenshot of MySQL Db

MySQL_DB.png

Dave Bosman [Realdolmen]
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 6, 2019

Hi @Abhijit Dongre 

I see you use utf8mb4.

This should be utf8

Regards

Dave

Abhijit Dongre June 6, 2019

Hi Dave, when I earlier created database using utf8, then it was throwing error as 'your database doesn't support utf8mb4, so I created new one.

Please guide, shall I execute below command 

ALTER SCHEMA `jiradb` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8mb4_bin;

Suggest an answer

Log in or Sign up to answer