TeamCity 5.1.2, error after upgrade "Error on step: Maintaining the database schema... "

Hi,

Just upgraded a Windows box from 5.1.1 to 5.1.2, but the error below from homepage after starting it back up.

Anyone else seen this?

Rebooted machine but that did not help.

Reverting to previous version, by copying back in .BuildServer directory and re-installing 5.1.1 - but this gives the same/similar error... help  

Thanks,

Chrs

Ooops, something went wrong...

Error on step: Maintaining the database schema...

Failed to maintain database schema on startup. SQL error: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@92f95944[file =D:\TeamCity\.BuildServer\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2010-05-24 10:29:35.880 heartbeat - read: -3376 ms.
SQL exception: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@92f95944[file =D:\TeamCity\.BuildServer\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2010-05-24 10:29:35.880 heartbeat - read: -3376 ms.

Stacktrace copied!
jetbrains.buildServer.serverSide.db.UnexpectedDBException: Failed to maintain database schema on startup. SQL error: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@92f95944[file =D:\TeamCity\.BuildServer\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2010-05-24 10:29:35.880 heartbeat - read: -3376 ms.
SQL exception: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@92f95944[file =D:\TeamCity\.BuildServer\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2010-05-24 10:29:35.880 heartbeat - read: -3376 ms.
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.ensureActualSchema(TeamCityDatabaseManager.java:0)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:70)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processServerStartup(TeamCityDispatcherServlet.java:7)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$000(TeamCityDispatcherServlet.java:131)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$1.run(TeamCityDispatcherServlet.java)
   at java.lang.Thread.run(Unknown Source)
caused by: java.sql.SQLException: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@92f95944[file =D:\TeamCity\.BuildServer\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2010-05-24 10:29:35.880 heartbeat - read: -3376 ms.
   at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
   at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
   at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
   at org.hsqldb.jdbcDriver.connect(Unknown Source)
   at jetbrains.buildServer.serverSide.db.jdbcLoader.JdbcDataSource.getConnection(JdbcDataSource.java:13)
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.ensureActualSchema(TeamCityDatabaseManager.java:147)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:70)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processServerStartup(TeamCityDispatcherServlet.java:7)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$000(TeamCityDispatcherServlet.java:131)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$1.run(TeamCityDispatcherServlet.java)
   at java.lang.Thread.run(Unknown Source)
2 comments

Hi Chris,

this problem might occur when the internal HSQL database has not be shut down correct.
Usually, in order to solve it you can just kill all java processes and then delete the HSQL lock file (it is D:\TeamCity\.BuildServer\system\buildserver.lck in your case).

Best regards,
Leonid

0

Thanks, just sussed it out - we run the TeamCity webapp on a different webapp path - /teamcity rather ROOT , I forgot this in the upgrade and both were running.

Problem has gone now that I have removed the other one.

Would be nice if the installer could detect this and at least give a warning (or ideally do the right thing )

Thanks,

Chris

0

Please sign in to leave a comment.