TeamCity server startup error - Database lock acquisition failure: lockFile.....

Hi, I do know is this the right place to post my problem.

Recently, I installed TeamCity 8.0.5, and always got below error message, stuck in maintenance mode...

Is anyone had the same problem before,
thanks a lot.

==

Unexpected error during connecting to the database: Unexpected exception SQLException/HsqlException: SQL error when doing: Connecting to HSQL2
SQL query: connect
SQL exception: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@be2b8ab4[file =C:\ProgramData\JetBrains\TeamCity\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkMagic magic: '0000000000000000'



here is log
===
[2013-11-30 01:09:35,061]   INFO -  jetbrains.buildServer.STARTUP -
[2013-11-30 01:09:35,062]   INFO -  jetbrains.buildServer.STARTUP - ===========================================================
[2013-11-30 01:09:35,062]   INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server
[2013-11-30 01:09:35,925]   INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 8.0.5 (build 27692), data format version 628
[2013-11-30 01:09:35,927]   INFO -  jetbrains.buildServer.STARTUP - OS: Windows Server 2008, JRE: 1.7.0_21-b11
[2013-11-30 01:09:35,927]   INFO -  jetbrains.buildServer.STARTUP - Servlet real path: C:\TeamCity\bin\..\webapps\ROOT\
[2013-11-30 01:09:35,929]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the TeamCity Data Directory
[2013-11-30 01:09:35,929]   INFO -  jetbrains.buildServer.STARTUP - TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH
[2013-11-30 01:09:35,929]   INFO -  jetbrains.buildServer.STARTUP - Data Directory "C:\ProgramData\JetBrains\TeamCity" exists
[2013-11-30 01:09:36,263]   INFO -  jetbrains.buildServer.STARTUP - The main configuration file "C:\ProgramData\JetBrains\TeamCity\config\main-config.xml" exists
[2013-11-30 01:09:36,263]   INFO -  jetbrains.buildServer.STARTUP - The database properties file "C:\ProgramData\JetBrains\TeamCity\config\database.properties" doesn't exist
[2013-11-30 01:09:36,263]   INFO -  jetbrains.buildServer.STARTUP - The internal database data file "C:\ProgramData\JetBrains\TeamCity\system\buildserver.data" exists
[2013-11-30 01:09:36,375]   INFO -  jetbrains.buildServer.STARTUP - Data Directory version: 628
[2013-11-30 01:09:36,375]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration
[2013-11-30 01:09:36,376]   INFO -  jetbrains.buildServer.STARTUP - Database properties file "C:\ProgramData\JetBrains\TeamCity\config\database.properties" doesn't exist
[2013-11-30 01:09:36,376]   INFO -  jetbrains.buildServer.STARTUP - Internal HSQL database file (C:\ProgramData\JetBrains\TeamCity\system\buildserver.data) exists, version: 2.2.9
[2013-11-30 01:09:36,387]   INFO -  jetbrains.buildServer.STARTUP - Using internal (HSQL) database
[2013-11-30 01:09:36,388]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Connecting to the database
[2013-11-30 01:09:46,767]  ERROR -  jetbrains.buildServer.STARTUP - Exception UnknownServerStartupError in stage DB_CONNECT: Unexpected error during connecting to the database: Unexpected exception SQLException/HsqlException: SQL error when doing: Connecting to HSQL2
SQL query: connect
SQL exception: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@be2b8ab4[file =C:\ProgramData\JetBrains\TeamCity\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkMagic magic: '0000000000000000'
jetbrains.buildServer.maintenance.exceptions.UnknownServerStartupError: Unexpected error during connecting to the database: Unexpected exception SQLException/HsqlException: SQL error when doing: Connecting to HSQL2
SQL query: connect
SQL exception: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@be2b8ab4[file =C:\ProgramData\JetBrains\TeamCity\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkMagic magic: '0000000000000000'
 at jetbrains.buildServer.maintenance.StartupProcessor.performConnectToDatabaseInternal(StartupProcessor.java:439)
 at jetbrains.buildServer.maintenance.StartupProcessor.performConnectToDatabase(StartupProcessor.java:219)
 at jetbrains.buildServer.maintenance.StartupProcessor.doDatabaseConnect(StartupProcessor.java:273)
 at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStage(StartupProcessor.java:346)
 at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStageSafe(StartupProcessor.java:475)
 at jetbrains.buildServer.maintenance.StartupProcessor.processTeamCityLifecycle(StartupProcessor.java:195)
 at jetbrains.buildServer.maintenance.StartupProcessor.access$000(StartupProcessor.java:20)
 at jetbrains.buildServer.maintenance.StartupProcessor$1.run(StartupProcessor.java:2)
 at java.lang.Thread.run(Unknown Source)
Caused by: jetbrains.buildServer.serverSide.db.UnexpectedDBException: Unexpected exception SQLException/HsqlException: SQL error when doing: Connecting to HSQL2
SQL query: connect
SQL exception: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@be2b8ab4[file =C:\ProgramData\JetBrains\TeamCity\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkMagic magic: '0000000000000000'
 at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
 at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
 at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source)
 at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
 at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
 at jetbrains.buildServer.serverSide.db.jdbcLoader.JdbcDataSource.getConnection(JdbcDataSource.java:52)
 at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.connect(TeamCityDatabaseManager.java:327)
 at jetbrains.buildServer.maintenance.StartupProcessor.performConnectToDatabaseInternal(StartupProcessor.java:52)
 ... 8 more
Caused by: java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@be2b8ab4[file =C:\ProgramData\JetBrains\TeamCity\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkMagic magic: '0000000000000000'
 ... 16 more
Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@be2b8ab4[file =C:\ProgramData\JetBrains\TeamCity\system\buildserver.lck, exists=true, locked=false, valid=false, ] method: checkMagic magic: '0000000000000000'
 at org.hsqldb.error.Error.error(Unknown Source)
 at org.hsqldb.error.Error.error(Unknown Source)
 at org.hsqldb.persist.LockFile.newLockFileLock(Unknown Source)
 at org.hsqldb.persist.Logger.acquireLock(Unknown Source)
 at org.hsqldb.persist.Logger.openPersistence(Unknown Source)
 at org.hsqldb.Database.reopen(Unknown Source)
 at org.hsqldb.Database.open(Unknown Source)
 at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
 at org.hsqldb.DatabaseManager.newSession(Unknown Source)
 ... 14 more
[2013-11-30 01:09:46,769]   INFO -  jetbrains.buildServer.STARTUP - Current stage: TeamCity server startup error
[2013-11-30 01:09:46,769]   INFO -  jetbrains.buildServer.STARTUP - Administrator login is required from web UI using authentication token: 1166460268477900984
1 comment
Comment actions Permalink

Hi yeah ,, I got the same error after chaing the user the service runs as recently .. I managed to backup and restore my DB to  MSSQL but I'm still stuck in maintenance mode !

http://devnet.jetbrains.com/message/5504429#5504429

I tried deleting the .lck file but it doesn't seem to have any effect on being in maintenance mode ..

0

Please sign in to leave a comment.