TeamCity stuck on "Connecting to the database" after upgrade to 8.1

Similar to this issue, I just upgraded TeamCity from 7.2 to 8.1. The server is stuck on the "Connecting to the database" screen. The server log shows only the info below. I do have backups of the system if I need to revert to them. Any advice?

OS: Ubuntu 13.04
Teamcity version: 8.1 (build 29879)
Database: MySQL 5.5.34-0ubuntu0.13.04.1 (Ubuntu)

[2014-02-20 12:18:47,916]   INFO -  jetbrains.buildServer.STARTUP - =========================================================== [2014-02-20 12:18:47,916]   INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server [2014-02-20 12:18:48,335]   INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 8.1 (build 29879), data format version 658 [2014-02-20 12:18:48,342]   INFO -  jetbrains.buildServer.STARTUP - OS: Linux, JRE: 1.7.0_51-b00 [2014-02-20 12:18:48,342]   INFO -  jetbrains.buildServer.STARTUP - Servlet real path: /var/teamcity/TeamCity/webapps/ROOT/ [2014-02-20 12:18:48,343]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the TeamCity Data Directory [2014-02-20 12:18:48,343]   INFO -  jetbrains.buildServer.STARTUP - TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH [2014-02-20 12:18:48,343]   INFO -  jetbrains.buildServer.STARTUP - Data Directory "/var/teamcity/buildserver" exists [2014-02-20 12:18:48,380]   INFO -  jetbrains.buildServer.STARTUP - The main configuration file "/var/teamcity/buildserver/config/main-config.xml" exists [2014-02-20 12:18:48,380]   INFO -  jetbrains.buildServer.STARTUP - The database properties file "/var/teamcity/buildserver/config/database.properties" exists [2014-02-20 12:18:48,380]   INFO -  jetbrains.buildServer.STARTUP - The internal database data file "/var/teamcity/buildserver/system/buildserver.data" exists [2014-02-20 12:18:48,480]   INFO -  jetbrains.buildServer.STARTUP - Data Directory version: 544 [2014-02-20 12:18:48,481]   WARN -  jetbrains.buildServer.STARTUP - The Data Directory contains non-TeamCity files or directories [2014-02-20 12:18:48,481]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration [2014-02-20 12:18:48,481]   INFO -  jetbrains.buildServer.STARTUP - Database properties file "/var/teamcity/buildserver/config/database.properties" exists [2014-02-20 12:18:48,486]   INFO -  jetbrains.buildServer.STARTUP - Internal HSQL database file (/var/teamcity/buildserver/system/buildserver.data) exists, version: 1.8.1 [2014-02-20 12:18:48,486]   INFO -  jetbrains.buildServer.STARTUP - Database connection URL: jdbc:mysql://localhost:3306/teamcity [2014-02-20 12:18:48,487]   INFO -  jetbrains.buildServer.STARTUP - Using database connection URL from the database properties file. The URL is: jdbc:mysql://localhost:3306/teamcity [2014-02-20 12:18:48,488]   INFO -  jetbrains.buildServer.STARTUP - Using external (MYSQL) database [2014-02-20 12:18:48,488]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Connecting to the database

5 comments
Comment actions Permalink

Correction: I was upgrading from TeamCity version: TeamCity 7.1.4 (build 24331)

0
Comment actions Permalink

I reverted to TeamCity 7.1.4.
I successfully upgraded to 7.1.5.
I then attempted the upgrade to 8.1.1. Symptoms appear to be identical to my first attempt (failure).

This time the server log reads as follows:

[2014-03-12 09:08:35,113]   INFO -  jetbrains.buildServer.STARTUP - ===========================================================
[2014-03-12 09:08:35,113]   INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server
[2014-03-12 09:08:35,616]   INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 8.1.1 (build 29939), data format version 658
[2014-03-12 09:08:35,623]   INFO -  jetbrains.buildServer.STARTUP - OS: Linux, JRE: 1.7.0_51-b00
[2014-03-12 09:08:35,623]   INFO -  jetbrains.buildServer.STARTUP - Servlet real path: /var/teamcity/TeamCity/webapps/ROOT/
[2014-03-12 09:08:35,624]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the TeamCity Data Directory
[2014-03-12 09:08:35,624]   INFO -  jetbrains.buildServer.STARTUP - TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH
[2014-03-12 09:08:35,624]   INFO -  jetbrains.buildServer.STARTUP - Data Directory "/var/teamcity/buildserver" exists
[2014-03-12 09:08:35,685]   INFO -  jetbrains.buildServer.STARTUP - The main configuration file "/var/teamcity/buildserver/config/main-config.xml" exists
[2014-03-12 09:08:35,685]   INFO -  jetbrains.buildServer.STARTUP - The database properties file "/var/teamcity/buildserver/config/database.properties" exists
[2014-03-12 09:08:35,685]   INFO -  jetbrains.buildServer.STARTUP - The internal database data file "/var/teamcity/buildserver/system/buildserver.data" exists
[2014-03-12 09:08:35,887]   INFO -  jetbrains.buildServer.STARTUP - Data Directory version: 544
[2014-03-12 09:08:35,887]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration
[2014-03-12 09:08:35,901]   INFO -  jetbrains.buildServer.STARTUP - Database properties file "/var/teamcity/buildserver/config/database.properties" exists
[2014-03-12 09:08:35,901]   INFO -  jetbrains.buildServer.STARTUP - Internal HSQL database file (/var/teamcity/buildserver/system/buildserver.data) exists, version: 1.8.1
[2014-03-12 09:08:35,902]   INFO -  jetbrains.buildServer.STARTUP - Database connection URL: jdbc:mysql://localhost:3306/teamcity
[2014-03-12 09:08:35,902]   INFO -  jetbrains.buildServer.STARTUP - Using database connection URL from the database properties file. The URL is: jdbc:mysql://localhost:3306/teamcity
[2014-03-12 09:08:35,903]   INFO -  jetbrains.buildServer.STARTUP - Using external (MYSQL) database
[2014-03-12 09:08:35,903]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Connecting to the database

0
Comment actions Permalink

catalina.out contains this information:

Mar 12, 2014 9:08:24 AM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Mar 12, 2014 9:08:24 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8111"]
Mar 12, 2014 9:08:24 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Mar 12, 2014 9:08:30 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Mar 12, 2014 9:08:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8111"]
Mar 12, 2014 9:08:31 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 12, 2014 9:08:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1870 ms
Mar 12, 2014 9:08:31 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 12, 2014 9:08:31 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.37
Mar 12, 2014 9:08:31 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/teamcity/TeamCity/webapps/ROOT
Using logs directory /var/teamcity/TeamCity/logs
Log4J configuration file /var/teamcity/TeamCity/bin/../conf/teamcity-server-log4j.xml will be monitored with interval 10 seconds.
Mar 12, 2014 9:08:35 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8111"]
Mar 12, 2014 9:08:35 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3804 ms
TeamCity version: 8.1.1 (build 29939), data format version 658
OS: Linux, JRE: 1.7.0_51-b00
Exception in thread "TeamCity Monitor (version 8.1.1 build 29939 started 2014-03-12 09:08)" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
        at jetbrains.buildServer.serverSide.db.jdbcLoader.JdbcDriverLoader.<clinit>(JdbcDriverLoader.java:30)
        at jetbrains.buildServer.serverSide.db.jdbcLoader.TeamCityJdbcUtils.loadJdbcDrivers(TeamCityJdbcUtils.java:21)
        at jetbrains.buildServer.maintenance.StartupHelper.reloadJdbcDrivers(StartupHelper.java:3)
        at jetbrains.buildServer.maintenance.StartupProcessor.performConnectToDatabase(StartupProcessor.java:524)
        at jetbrains.buildServer.maintenance.StartupProcessor.doDatabaseConnect(StartupProcessor.java:127)
        at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStage(StartupProcessor.java:197)
        at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStageSafe(StartupProcessor.java:528)
        at jetbrains.buildServer.maintenance.StartupProcessor.processTeamCityLifecycle(StartupProcessor.java:406)
        at jetbrains.buildServer.maintenance.StartupProcessor.access$000(StartupProcessor.java:262)
        at jetbrains.buildServer.maintenance.StartupProcessor$1.run(StartupProcessor.java)
        at java.lang.Thread.run(Thread.java:744)

0
Comment actions Permalink

Tried again, this time deleting the contents of the TeamCity directory as advised by the upgrade notes. I'm getting further. But this time, I get the following log content, but the web service does not seem to be accessible on the expected port 8111. I direct the web browser to that port, I just get a message from the browser saying "waiting for teamcity".

[2014-03-12 09:37:30,433]   INFO -  jetbrains.buildServer.STARTUP - The main configuration file "/var/teamcity/buildserver/config/main-config.xml" exists
[2014-03-12 09:37:30,433]   INFO -  jetbrains.buildServer.STARTUP - The database properties file "/var/teamcity/buildserver/config/database.properties" exists
[2014-03-12 09:37:30,433]   INFO -  jetbrains.buildServer.STARTUP - The internal database data file "/var/teamcity/buildserver/system/buildserver.data" exists
[2014-03-12 09:37:30,524]   INFO -  jetbrains.buildServer.STARTUP - Data Directory version: 544
[2014-03-12 09:37:30,524]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration
[2014-03-12 09:37:30,529]   INFO -  jetbrains.buildServer.STARTUP - Database properties file "/var/teamcity/buildserver/config/database.properties" exists
[2014-03-12 09:37:30,529]   INFO -  jetbrains.buildServer.STARTUP - Internal HSQL database file (/var/teamcity/buildserver/system/buildserver.data) exists, version: 1.8.1
[2014-03-12 09:37:30,529]   INFO -  jetbrains.buildServer.STARTUP - Database connection URL: jdbc:mysql://localhost:3306/teamcity
[2014-03-12 09:37:30,530]   INFO -  jetbrains.buildServer.STARTUP - Using database connection URL from the database properties file. The URL is: jdbc:mysql://localhost:3306/teamcity
[2014-03-12 09:37:30,531]   INFO -  jetbrains.buildServer.STARTUP - Using external (MYSQL) database
[2014-03-12 09:37:30,531]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Connecting to the database
[2014-03-12 09:37:31,330]   INFO -  jetbrains.buildServer.STARTUP - Connected to the database successfully
[2014-03-12 09:37:31,333]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Checking the database
[2014-03-12 09:37:32,872]   INFO -  jetbrains.buildServer.STARTUP - Database contains 100 tables.
[2014-03-12 09:37:32,879]   INFO -  jetbrains.buildServer.STARTUP - Database version is 544
[2014-03-12 09:37:32,902]   INFO - etbrains.buildServer.HEARTBEAT - No heartbeat table in the database - the DB lock is bypassed and heartbeat is not started
[2014-03-12 09:37:32,902]   INFO -  jetbrains.buildServer.STARTUP - Upgrade from version 544 to version 658 is required
[2014-03-12 09:37:32,902]   INFO -  jetbrains.buildServer.STARTUP - Backup of this version is possible
[2014-03-12 09:37:32,903]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Data upgrade is required (administrator login is required to proceed)
[2014-03-12 09:37:32,903]   INFO -  jetbrains.buildServer.STARTUP - Administrator can login from web UI using authentication token: <auth token>

0
Comment actions Permalink

Resolved with a reboot. Thanks for the complete lack of support JetBrains.

0

Please sign in to leave a comment.