History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3084
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Steve Luo
Reporter: Piotr Jedrys
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Database failed , Unable to get connection from database url

Created: 23/Nov/17 11:57 AM   Updated: 24/Nov/17 02:16 PM
Component/s: None
Affects Version/s: 7.0.28
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Linux


 Description  « Hide
Recently we got this error with database:

2017-11-23 09:49:07,644 [pool-1-thread-127811] INFO com.pmease.quickbuild.DefaultBuildEngine - Collecting statistics 'JUnit Report'...
2017-11-23 09:49:07,648 [pool-1-thread-127811] INFO com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction - Start generating report 'stats'.
2017-11-23 09:49:07,791 [pool-1-thread-127811] INFO com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction - Finished generating report 'stats' successfully.
2017-11-23 09:49:07,792 [pool-1-thread-127811] INFO com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction - Start generating report 'tests_trends'.
2017-11-23 09:49:07,947 [pool-1-thread-127811] INFO com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction - Finished generating report 'tests_trends' successfully.
2017-11-23 09:49:07,949 [pool-1-thread-127811] INFO com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction - Start generating report 'stats'.
2017-11-23 09:49:08,100 [pool-1-thread-127811] INFO com.pmease.quickbuild.plugin.report.engine.contribution.publisher.StatisticsReportPublisher - Finished collecting statistics data for report 'JUnit Re
port' [configuration: 78163, build: 10030122]
2017-11-23 09:49:08,139 [pool-1-thread-127868] WARN com.pmease.quickbuild.DefaultBuildEngine - Build request for 'root/greenfield/dev/nested-configs-main/1-CI-1' is ignored as there is an identical requ
est in queue.
2017-11-23 09:49:08,162 [pool-1-thread-127811] ERROR com.pmease.quickbuild.DefaultBuildEngine - Error processing build request.
 com.pmease.quickbuild.plugin.report.engine.exception.DatabaseException: Open database [/opt/quickbuild/storage/builds/b122/10030122/reports/junit/Linux unit tests] failed. Database status [No active connections].
        at com.pmease.quickbuild.plugin.report.engine.datastore.DbStore.open(DbStore.java:355)
        at com.pmease.quickbuild.plugin.report.engine.metadata.ReportCategory.loadReport(ReportCategory.java:343)
        at com.pmease.quickbuild.plugin.report.engine.metadata.ReportCategory.loadReport(ReportCategory.java:362)
        at com.pmease.quickbuild.plugin.report.engine.generator.statistics.StatisticsGenerator.loadSourceReport(StatisticsGenerator.java:51)
        at com.pmease.quickbuild.plugin.report.engine.generator.statistics.StatisticsGenerator.doExecute(StatisticsGenerator.java:45)
        at com.pmease.quickbuild.plugin.report.engine.generator.GenerateAction.execute(GenerateAction.java:42)
        at com.pmease.quickbuild.plugin.report.engine.generator.DefaultGenerator.generate(DefaultGenerator.java:37)
        at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.StatisticsReportPublisher.doPublish(StatisticsReportPublisher.java:133)
        at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.StatisticsReportPublisher.collectStatistics(StatisticsReportPublisher.java:111)
        at com.pmease.quickbuild.DefaultBuildEngine.process(DefaultBuildEngine.java:477)
        at com.pmease.quickbuild.DefaultBuildEngine.access$000(DefaultBuildEngine.java:141)
        at com.pmease.quickbuild.DefaultBuildEngine$2.run(DefaultBuildEngine.java:1220)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
        at java.lang.Thread.run(Thread.java:748)
 Caused by: com.pmease.quickbuild.plugin.report.engine.exception.DatabaseException: Unable to get connection from database url: jdbc:h2:/opt/quickbuild/storage/builds/b122/10030122/reports/junit/Linux unit tests/junit;ACCESS_MODE_DATA=r
        at com.pmease.quickbuild.plugin.report.engine.datastore.ConnectionManager.getConnection(ConnectionManager.java:25)
        at com.pmease.quickbuild.plugin.report.engine.datastore.DbStore.getConnection(DbStore.java:384)
        at com.pmease.quickbuild.plugin.report.engine.datastore.DbStore.open(DbStore.java:322)
        ... 14 more
 Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "2930 of 2688". Possible solution: use the recovery tool [90030-175]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
        at org.h2.message.DbException.get(DbException.java:172)
        at org.h2.message.DbException.get(DbException.java:149)
        at org.h2.store.PageStore.readPage(PageStore.java:1288)
        at org.h2.store.PageStore.getPage(PageStore.java:738)
        at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:232)
        at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:213)
        at org.h2.index.PageDataIndex.<init>(PageDataIndex.java:87)
        at org.h2.table.RegularTable.<init>(RegularTable.java:84)
        at org.h2.store.PageStore.addMeta(PageStore.java:1652)
        at org.h2.store.PageStore.readMetaData(PageStore.java:1584)
        at org.h2.store.PageStore.recover(PageStore.java:1370)
        at org.h2.store.PageStore.openExisting(PageStore.java:361)
        at org.h2.store.PageStore.open(PageStore.java:285)
        at org.h2.engine.Database.getPageStore(Database.java:2298)
        at org.h2.engine.Database.open(Database.java:626)
        at org.h2.engine.Database.openDatabase(Database.java:244)
        at org.h2.engine.Database.<init>(Database.java:239)
        at org.h2.engine.Engine.openSession(Engine.java:58)
        at org.h2.engine.Engine.openSession(Engine.java:162)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:141)
        at org.h2.engine.Engine.createSession(Engine.java:124)
        at org.h2.engine.Engine.createSession(Engine.java:30)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:323)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:105)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:90)
        at org.h2.Driver.connect(Driver.java:73)
        at java.sql.DriverManager.getConnection(DriverManager.java:571)
        at java.sql.DriverManager.getConnection(DriverManager.java:215)
        at com.pmease.quickbuild.plugin.report.engine.datastore.ConnectionManager.getConnection(ConnectionManager.java:23)
        ... 16 more


How can we prevent it from happening and how can we fix it.

max_connections on Mysql is 151
max_used_connections =27
threads_connected=26

so why did it happen?

 All   Comments   Work Log   Change History      Sort Order:
No work has yet been logged on this issue.