Unexpected issue after server restart

Just restarted myTC server and got the follwing issue.

[2014-10-27 13:07:19,744]   INFO -  jetbrains.buildServer.STARTUP - Current stage: TeamCity server startup error
[2014-10-27 13:07:19,744]   INFO -  jetbrains.buildServer.STARTUP - Administrator login is required from web UI using authentication token: 4281426442322130251
[2014-10-27 13:10:41,535]   INFO -  jetbrains.buildServer.STARTUP - Server shutdown has been requested
[2014-10-27 13:10:41,536]   INFO -  jetbrains.buildServer.STARTUP - Current stage: The system is shutting down
[2014-10-27 13:10:41,536]   INFO -  jetbrains.buildServer.STARTUP - Stopping the main application
[2014-10-27 13:10:41,551]   INFO -   jetbrains.buildServer.SERVER - Unregsitered 2 drivers successfully.
[2014-10-27 13:10:41,551]   INFO -  jetbrains.buildServer.STARTUP - Server shutdown complete
[2014-10-27 13:10:50,831]   INFO -  jetbrains.buildServer.STARTUP -
[2014-10-27 13:10:50,831]   INFO -  jetbrains.buildServer.STARTUP - ===========================================================
[2014-10-27 13:10:50,831]   INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server
[2014-10-27 13:10:50,980]   INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 8.0.3 (build 27540), data format version 628
[2014-10-27 13:10:50,982]   INFO -  jetbrains.buildServer.STARTUP - OS: Windows Server 2012, JRE: 1.7.0_21-b11
[2014-10-27 13:10:50,982]   INFO -  jetbrains.buildServer.STARTUP - Servlet real path: c:\TeamCity\bin\..\webapps\ROOT\
[2014-10-27 13:10:50,984]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the TeamCity Data Directory
[2014-10-27 13:10:50,984]   INFO -  jetbrains.buildServer.STARTUP - TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH
[2014-10-27 13:10:50,984]   INFO -  jetbrains.buildServer.STARTUP - Data Directory "C:\ProgramData\JetBrains\TeamCity" exists
[2014-10-27 13:10:51,058]   INFO -  jetbrains.buildServer.STARTUP - The main configuration file "C:\ProgramData\JetBrains\TeamCity\config\main-config.xml" exists
[2014-10-27 13:10:51,058]   INFO -  jetbrains.buildServer.STARTUP - The database properties file "C:\ProgramData\JetBrains\TeamCity\config\database.properties" doesn't exist
[2014-10-27 13:10:51,058]   INFO -  jetbrains.buildServer.STARTUP - The internal database data file "C:\ProgramData\JetBrains\TeamCity\system\buildserver.data" exists
[2014-10-27 13:10:51,116]   INFO -  jetbrains.buildServer.STARTUP - Data Directory version: 628
[2014-10-27 13:10:51,116]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration
[2014-10-27 13:10:51,117]   INFO -  jetbrains.buildServer.STARTUP - Database properties file "C:\ProgramData\JetBrains\TeamCity\config\database.properties" doesn't exist
[2014-10-27 13:10:51,117]   INFO -  jetbrains.buildServer.STARTUP - Internal HSQL database file (C:\ProgramData\JetBrains\TeamCity\system\buildserver.data) exists, version: 2.2.9
[2014-10-27 13:10:51,122]   INFO -  jetbrains.buildServer.STARTUP - Using internal (HSQL) database
[2014-10-27 13:10:51,122]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Connecting to the database
[2014-10-27 13:10:52,126]  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: error in script file line: 253 java.io.IOException: java.lang.IndexOutOfBoundsException in statement [SET TABLE PUBLIC.AGENT INDEX '11362873 11362873 11362873 11362873 11362873 0 0 0 0 0 1']
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: error in script file line: 253 java.io.IOException: java.lang.IndexOutOfBoundsException in statement [SET TABLE PUBLIC.AGENT INDEX '11362873 11362873 11362873 11362873 11362873 0 0 0 0 0 1']
 at jetbrains.buildServer.maintenance.StartupProcessor.performConnectToDatabaseInternal(StartupProcessor.java:223)
 at jetbrains.buildServer.maintenance.StartupProcessor.performConnectToDatabase(StartupProcessor.java:153)
 at jetbrains.buildServer.maintenance.StartupProcessor.doDatabaseConnect(StartupProcessor.java:37)
 at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStage(StartupProcessor.java:21)
 at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStageSafe(StartupProcessor.java:145)
 at jetbrains.buildServer.maintenance.StartupProcessor.processTeamCityLifecycle(StartupProcessor.java:164)
 at jetbrains.buildServer.maintenance.StartupProcessor.access$000(StartupProcessor.java:320)
 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: error in script file line: 253 java.io.IOException: java.lang.IndexOutOfBoundsException in statement [SET TABLE PUBLIC.AGENT INDEX '11362873 11362873 11362873 11362873 11362873 0 0 0 0 0 1']
 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:320)
 at jetbrains.buildServer.maintenance.StartupProcessor.performConnectToDatabaseInternal(StartupProcessor.java:103)
 ... 8 more
Caused by: java.sql.SQLException: error in script file line: 253 java.io.IOException: java.lang.IndexOutOfBoundsException in statement [SET TABLE PUBLIC.AGENT INDEX '11362873 11362873 11362873 11362873 11362873 0 0 0 0 0 1']
 ... 16 more
Caused by: org.hsqldb.HsqlException: error in script file line: 253 java.io.IOException: java.lang.IndexOutOfBoundsException in statement [SET TABLE PUBLIC.AGENT INDEX '11362873 11362873 11362873 11362873 11362873 0 0 0 0 0 1']
 at org.hsqldb.error.Error.error(Unknown Source)
 at org.hsqldb.scriptio.ScriptReaderText.readDDL(Unknown Source)
 at org.hsqldb.scriptio.ScriptReaderBase.readAll(Unknown Source)
 at org.hsqldb.persist.Log.processScript(Unknown Source)
 at org.hsqldb.persist.Log.open(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
Caused by: org.hsqldb.HsqlException: java.io.IOException: java.lang.IndexOutOfBoundsException
 at org.hsqldb.error.Error.error(Unknown Source)
 at org.hsqldb.persist.DataFileCache.readObject(Unknown Source)
 at org.hsqldb.persist.DataFileCache.getFromFile(Unknown Source)
 at org.hsqldb.persist.DataFileCache.get(Unknown Source)
 at org.hsqldb.persist.RowStoreAVLDisk.get(Unknown Source)
 at org.hsqldb.persist.RowStoreAVLDisk.setAccessor(Unknown Source)
 at org.hsqldb.Table.setIndexRoots(Unknown Source)
 at org.hsqldb.Table.setIndexRoots(Unknown Source)
 at org.hsqldb.StatementCommand.getResult(Unknown Source)
 at org.hsqldb.StatementCommand.execute(Unknown Source)
 at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
 ... 23 more
Caused by: java.io.IOException: java.lang.IndexOutOfBoundsException
 at org.hsqldb.persist.ScaledRAFileNIO.read(Unknown Source)
 at org.hsqldb.persist.ScaledRAFileHybrid.read(Unknown Source)
 ... 33 more
Caused by: java.lang.IndexOutOfBoundsException
 at java.nio.Buffer.checkBounds(Unknown Source)
 at java.nio.ByteBuffer.get(Unknown Source)
 at java.nio.DirectByteBuffer.get(Unknown Source)
 ... 35 more
[2014-10-27 13:10:52,211]   INFO -  jetbrains.buildServer.STARTUP - Current stage: TeamCity server startup error
[2014-10-27 13:10:52,211]   INFO -  jetbrains.buildServer.STARTUP - Administrator login is required from web UI using authentication token: 8073432204504621459

1 comment
Comment actions Permalink

The related issue was raised - https://youtrack.jetbrains.com/issue/TW-38381. The answer is "Looks like database is corrupted."

0

Please sign in to leave a comment.