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

Key: QB-3553
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Steve Luo
Reporter: Jerry Ye
Votes: 0
Watchers: 0
Operations

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

Connect H2 DB faild due to change to mySQL databash

Created: 23/Apr/20 02:14 AM   Updated: 28/Apr/20 06:13 AM
Component/s: None
Affects Version/s: 10.0.7
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Server: CentOS 6.7


 Description  « Hide
ERROR LOG:
2020-04-23 09:44:09,948 [pool-2-thread-359] ERROR com.pmease.quickbuild.DefaultBuildEngine - Error processing build request.
    com.pmease.quickbuild.plugin.report.engine.exception.DatabaseException: Open database [/opt/qb/configurations/12/reports/scm_activity/DEFAULT] failed. Database status [No active connections].
        at com.pmease.quickbuild.plugin.report.engine.datastore.DbStore.open(DbStore.java:358)
        at com.pmease.quickbuild.plugin.report.changes.generator.ChangesStatsGenerator.generate(ChangesStatsGenerator.java:40)
        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:486)
        at com.pmease.quickbuild.DefaultBuildEngine.access$000(DefaultBuildEngine.java:148)
        at com.pmease.quickbuild.DefaultBuildEngine$2.run(DefaultBuildEngine.java:1275)
        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: com.pmease.quickbuild.plugin.report.engine.exception.DatabaseException: Unable to get connection from database url: jdbc:h2:/opt/qb/configurations/12/reports/scm_activity/DEFAULT/scm_activity;TRACE_LEVEL_FILE=0
        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:349)
        ... 9 more
    Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.SyncFailedException: sync failed"; "/opt/qb/configurations/12/reports/scm_activity/DEFAULT/scm_activity.h2.db" [90031-175]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
        at org.h2.message.DbException.get(DbException.java:161)
        at org.h2.message.DbException.convertIOException(DbException.java:318)
        at org.h2.store.FileStore.sync(FileStore.java:406)
        at org.h2.store.PageStore.writeVariableHeader(PageStore.java:950)
        at org.h2.store.PageStore.setLogFirstPage(PageStore.java:944)
        at org.h2.store.PageLog.openForWriting(PageLog.java:187)
        at org.h2.store.PageStore.openForWriting(PageStore.java:380)
        at org.h2.store.PageStore.openExisting(PageStore.java:366)
        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:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at com.pmease.quickbuild.plugin.report.engine.datastore.ConnectionManager.getConnection(ConnectionManager.java:23)
        ... 11 more
    Caused by: java.io.SyncFailedException: sync failed
        at java.io.FileDescriptor.sync(Native Method)
        at org.h2.store.fs.FileDisk.force(FilePathDisk.java:406)
        at org.h2.store.FileStore.sync(FileStore.java:403)
        ... 33 more



 All   Comments   Work Log   Change History      Sort Order:
Jerry Ye [23/Apr/20 02:15 AM]
Though check the path, there still show H2 databash in configuration/report/SCM_manager
As the main time we already using MySQL to instead of H2

Robin Shen [23/Apr/20 02:22 AM]
This issue along with the agent download issue you filed make me wondering if the OS user running QB server process has full permission over QB's installation directory.

Jerry Ye [23/Apr/20 09:36 AM]
We are upgrade from 9.0.9 but this error msg is not show on preview version.

The installation directory contain a configuration directory. Each subfolder have a DEFAULT dir. In most DEFAULT folder have "scm_activity.h2.db" file. Some of DEFAULT folder have "buildstats.h2.db" file

Steve Luo [24/Apr/20 10:01 AM]
Hi CTU,

The error is not related to your main database MySQL. It is reported by QuickBuild report system.

I want to know is this issue only existed in one configuration or not? Do you use NFS or mapped drive? Usually, this is caused by a network problem. If you are using NFS or mapped drive, please try use a local disk to see if the issue persists.

If the error occurs in lots of configurations, please try restart the server to see if the error persists.

If this issue only occurs in that build, you may also delete the directory to see if the error persists:
 /opt/qb/configurations/12/reports/scm_activity/DEFAULT

Jerry Ye [28/Apr/20 06:13 AM]
Hi,

I find work round way to just copy an configuration and delete the preview one to solve this question, I have lot of configuration show this error, I will delete them one by one.