Update from 9.1.7 to 10.0 - Second TeamCity instance detected

We are running 1 TeamCity instance on a VM and after update from v9.1.7 to v10.0 we cannot start the service/server again. We constantly get the message Second TeamCity instance detected, where there is non. No other services except TeamCity are connecting to the TeamCity db on our POSTGRESQL Server. 

 

See team-city.log file extract: 

[2016-08-11 19:04:38,469]   INFO -  jetbrains.buildServer.STARTUP - =========================================================== 

[2016-08-11 19:04:38,469]   INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server 

[2016-08-11 19:04:38,797]   INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 10.0.1 (build 42078), data format version 787 

[2016-08-11 19:04:38,813]   INFO -  jetbrains.buildServer.STARTUP - OS: Windows Server 2012 R2, User: IDV01$, Java: 1.8.0_66, Java HotSpot(TM) Server VM (32 bit) (25.66-b17, mixed mode), Java(TM) SE Runtime Environment (1.8.0_66-b17), Oracle Corporation 

[2016-08-11 19:04:38,813]   INFO -  jetbrains.buildServer.STARTUP - JVM parameters: -Djava.util.logging.config.file=D:\Appl\TeamCity\bin\..\conf\logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xrs -Xmx512m -Dteamcity.configuration.path=../conf/teamcity-startup.properties -Dlog4j.configuration=file:../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/ -Djava.endorsed.dirs=D:\Appl\TeamCity\bin\..\endorsed -Dcatalina.base=D:\Appl\TeamCity\bin\.. -Dcatalina.home=D:\Appl\TeamCity\bin\.. -Djava.io.tmpdir=D:\Appl\TeamCity\bin\..\temp 

[2016-08-11 19:04:38,813]   INFO -  jetbrains.buildServer.STARTUP - Garbage collection: PS Scavenge, PS MarkSweep 

[2016-08-11 19:04:38,813]   INFO -  jetbrains.buildServer.STARTUP - Web server version: Apache Tomcat/7.0.68 

[2016-08-11 19:04:38,813]   INFO -  jetbrains.buildServer.STARTUP - Server IP address: 192.168.7.6 

[2016-08-11 19:04:38,828]   INFO -  jetbrains.buildServer.STARTUP - Web server ports: 80 (protocol: org.apache.coyote.http11.Http11NioProtocol, scheme: http), 8105 (shutdown port) 

[2016-08-11 19:04:38,828]   INFO -  jetbrains.buildServer.STARTUP - TeamCity server work mode: Main TeamCity Server 

[2016-08-11 19:04:38,828]   INFO - rocesses.ProcessTreeTerminator - Using jetbrains.buildServer.processes.ProcessTreeTerminatorWindows 

[2016-08-11 19:04:38,938]   INFO -  jetbrains.buildServer.STARTUP - TeamCity server process ID (6100) stored in: D:\Appl\TeamCity\logs\teamcity.pid 

[2016-08-11 19:04:38,938]   INFO -  jetbrains.buildServer.STARTUP - Version file lock was successfully obtained: D:\Appl\TeamCity\bin\..\webapps\ROOT\BUILD_42078 

[2016-08-11 19:04:38,969]   INFO -  jetbrains.buildServer.STARTUP - Servlet real path: D:\Appl\TeamCity\bin\..\webapps\ROOT\ 

[2016-08-11 19:04:38,969]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the TeamCity Data Directory 

[2016-08-11 19:04:38,969]   INFO -  jetbrains.buildServer.STARTUP - The TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH 

[2016-08-11 19:04:38,985]   INFO -  jetbrains.buildServer.STARTUP - The TeamCity Data Directory "D:\Data\JetBrains\TeamCity" exists 

[2016-08-11 19:04:38,985]   INFO -  jetbrains.buildServer.STARTUP - The main configuration file "D:\Data\JetBrains\TeamCity\config\main-config.xml" exists 

[2016-08-11 19:04:38,985]   INFO -  jetbrains.buildServer.STARTUP - The database properties file "D:\Data\JetBrains\TeamCity\config\database.properties" exists 

[2016-08-11 19:04:38,985]   INFO -  jetbrains.buildServer.STARTUP - The internal database data file "D:\Data\JetBrains\TeamCity\system\buildserver.data" doesn't exist 

[2016-08-11 19:04:38,985]   INFO -  jetbrains.buildServer.STARTUP - Data Directory version: 727 

[2016-08-11 19:04:38,985]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration 

[2016-08-11 19:04:39,000]   INFO -  jetbrains.buildServer.STARTUP - Database properties file "D:\Data\JetBrains\TeamCity\config\database.properties" exists 

[2016-08-11 19:04:39,000]   INFO -  jetbrains.buildServer.STARTUP - Internal HSQL database file (D:\Data\JetBrains\TeamCity\system\buildserver.data) doesn't exist 

[2016-08-11 19:04:39,000]   INFO -  jetbrains.buildServer.STARTUP - Database connection URL: jdbc:postgresql:///TeamCity_Store 

[2016-08-11 19:04:39,000]   INFO -  jetbrains.buildServer.STARTUP - Using database connection URL from the database properties file. The URL is: jdbc:postgresql:///TeamCity_Store 

[2016-08-11 19:04:39,000]   INFO -  jetbrains.buildServer.STARTUP - Using external (POSTGRESQL) database 

[2016-08-11 19:04:39,000]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Connecting to the database 

[2016-08-11 19:04:39,000]   INFO -  jetbrains.buildServer.STARTUP - JDBC loader: loading JDBC drivers (for the first time) 

[2016-08-11 19:04:39,375]   INFO - ide.db.TeamCityDatabaseManager - Database character set: UTF8 

[2016-08-11 19:04:39,375]   INFO - ide.db.TeamCityDatabaseManager - Database collation: Dutch_Netherlands.1252 

[2016-08-11 19:04:42,953]   INFO -  jetbrains.buildServer.STARTUP - 

 

 

 

 

 

 

[2016-08-11 19:04:42,969]   INFO -  jetbrains.buildServer.STARTUP - =========================================================== 

[2016-08-11 19:04:42,969]   INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server 

[2016-08-11 19:04:43,125]   INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 9.1.7 (build 37573), data format version 727 

[2016-08-11 19:04:43,125]   INFO -  jetbrains.buildServer.STARTUP - OS: Windows Server 2012 R2, User: IDV01$, JRE: 1.8.0_66, Java HotSpot(TM) Server VM (32 bit) (25.66-b17, mixed mode), Java(TM) SE Runtime Environment (1.8.0_66-b17), Oracle Corporation 

[2016-08-11 19:04:43,125]   INFO -  jetbrains.buildServer.STARTUP - JVM parameters: -Djava.util.logging.config.file=D:\Appl\TeamCity\bin\..\conf\logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xrs -Xmx512m -Dteamcity.configuration.path=../conf/teamcity-startup.properties -Dlog4j.configuration=file:../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/ -Djava.endorsed.dirs=D:\Appl\TeamCity\bin\..\endorsed -Dcatalina.base=D:\Appl\TeamCity\bin\.. -Dcatalina.home=D:\Appl\TeamCity\bin\.. -Djava.io.tmpdir=D:\Appl\TeamCity\bin\..\temp 

[2016-08-11 19:04:43,125]   INFO -  jetbrains.buildServer.STARTUP - Garbage collection: PS Scavenge, PS MarkSweep 

[2016-08-11 19:04:43,125]   INFO -  jetbrains.buildServer.STARTUP - Web server version: Apache Tomcat/7.0.68 

[2016-08-11 19:04:43,125]   INFO -  jetbrains.buildServer.STARTUP - Server IP address: 192.168.7.6 

[2016-08-11 19:04:43,140]   INFO -  jetbrains.buildServer.STARTUP - Web server ports: 80 (protocol: org.apache.coyote.http11.Http11NioProtocol, scheme: http), 8105 (shutdown port) 

[2016-08-11 19:04:43,140]   INFO - rocesses.ProcessTreeTerminator - Using jetbrains.buildServer.processes.ProcessTreeTerminatorWindows 

[2016-08-11 19:04:43,265]   INFO -  jetbrains.buildServer.STARTUP - TeamCity server process ID (6100) stored in: D:\Appl\TeamCity\logs\teamcity.pid 

[2016-08-11 19:04:43,265]   INFO -  jetbrains.buildServer.STARTUP - Version file lock was successfully obtained: D:\Appl\TeamCity\bin\..\webapps\teamcity\BUILD_37573 

[2016-08-11 19:04:43,281]   INFO -  jetbrains.buildServer.STARTUP - Servlet real path: D:\Appl\TeamCity\bin\..\webapps\teamcity\ 

[2016-08-11 19:04:43,390]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the TeamCity Data Directory 

[2016-08-11 19:04:43,390]   INFO -  jetbrains.buildServer.STARTUP - The TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH 

[2016-08-11 19:04:43,484]   INFO -  jetbrains.buildServer.STARTUP - The TeamCity Data Directory "D:\Data\JetBrains\TeamCity" exists 

[2016-08-11 19:04:43,484]   INFO -  jetbrains.buildServer.STARTUP - The main configuration file "D:\Data\JetBrains\TeamCity\config\main-config.xml" exists 

[2016-08-11 19:04:43,500]   INFO -  jetbrains.buildServer.STARTUP - The database properties file "D:\Data\JetBrains\TeamCity\config\database.properties" exists 

[2016-08-11 19:04:43,500]   INFO -  jetbrains.buildServer.STARTUP - The internal database data file "D:\Data\JetBrains\TeamCity\system\buildserver.data" doesn't exist 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Data Directory version: 727 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Database properties file "D:\Data\JetBrains\TeamCity\config\database.properties" exists 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Internal HSQL database file (D:\Data\JetBrains\TeamCity\system\buildserver.data) doesn't exist 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Database connection URL: jdbc:postgresql:///TeamCity_Store 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Using database connection URL from the database properties file. The URL is: jdbc:postgresql:///TeamCity_Store 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Using external (POSTGRESQL) database 

[2016-08-11 19:04:43,625]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Connecting to the database 

[2016-08-11 19:04:43,640]   INFO -  jetbrains.buildServer.STARTUP - JDBC loader: loading JDBC drivers (for the first time) 

[2016-08-11 19:04:43,812]   INFO - ide.db.TeamCityDatabaseManager - Database character set: UTF8 

[2016-08-11 19:04:43,812]   INFO - ide.db.TeamCityDatabaseManager - Database collation: Dutch_Netherlands.1252 

[2016-08-11 19:05:32,328]   INFO -  jetbrains.buildServer.STARTUP - JDBC driver version: 9.3 (PostgreSQL Native Driver) 

[2016-08-11 19:05:32,328]   INFO -  jetbrains.buildServer.STARTUP - Database system version: 9.3.5 (PostgreSQL) 

[2016-08-11 19:05:32,328]   INFO -  jetbrains.buildServer.STARTUP - Connected to the database successfully 

[2016-08-11 19:05:32,328]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Checking the database 

[2016-08-11 19:05:32,343]   INFO -  jetbrains.buildServer.STARTUP - JDBC driver version: 9.3 (PostgreSQL Native Driver) 

[2016-08-11 19:05:32,343]   INFO -  jetbrains.buildServer.STARTUP - Database system version: 9.3.5 (PostgreSQL) 

[2016-08-11 19:05:32,343]   INFO -  jetbrains.buildServer.STARTUP - Connected to the database successfully 

[2016-08-11 19:05:32,343]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Checking the database 

[2016-08-11 19:06:32,447]   INFO -  jetbrains.buildServer.STARTUP - Using schema: public 

[2016-08-11 19:06:32,462]   INFO -  jetbrains.buildServer.STARTUP - Schema contains 122 tables. 

[2016-08-11 19:06:32,462]   INFO -  jetbrains.buildServer.STARTUP - Database version is 727 

[2016-08-11 19:06:32,478]   INFO -  jetbrains.buildServer.STARTUP - Upgrade from version 727 to version 787 is required 

[2016-08-11 19:06:32,478]   INFO -  jetbrains.buildServer.STARTUP - Backup of this version is possible 

[2016-08-11 19:06:32,525]   INFO - etbrains.buildServer.HEARTBEAT - Attempting to capture the DB lock. My session starting code: 104894296 

[2016-08-11 19:06:32,614]   INFO - etbrains.buildServer.HEARTBEAT - The Heartbeat thread is started. 

[2016-08-11 19:06:32,614]   INFO - etbrains.buildServer.HEARTBEAT - Attempting to take exclusive lock 

[2016-08-11 19:06:32,614]   INFO - etbrains.buildServer.HEARTBEAT - Exclusive DB lock was taken. 

[2016-08-11 19:06:32,614]   INFO -  jetbrains.buildServer.STARTUP - Exclusive database lock was taken 

[2016-08-11 19:06:32,614]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Data upgrade is required (administrator login is required to proceed) 

[2016-08-11 19:06:32,614]   INFO -  jetbrains.buildServer.STARTUP - Administrator can login from web UI using authentication token: 9167539751419427938 

[2016-08-11 19:06:32,630]   INFO -  jetbrains.buildServer.STARTUP - Using schema: public 

[2016-08-11 19:06:32,646]   INFO -  jetbrains.buildServer.STARTUP - Schema contains 122 tables. 

[2016-08-11 19:06:32,646]   INFO -  jetbrains.buildServer.STARTUP - Database version is 727 

[2016-08-11 19:06:32,677]   INFO - etbrains.buildServer.HEARTBEAT - Attempting to capture the DB lock. My session starting code: 453755530 

[2016-08-11 19:06:32,719]   INFO - etbrains.buildServer.HEARTBEAT - Revealed a concurrent competitor: Session 104894296 started at 2016-08-11 19:04:38.594 in mode UNKNOWN from IP address 192.168.7.6 (IP: 192.168.7.6, Port: 80, Installation Directory: D:\Appl\TeamCity, Data Direct) last updated at 2016-08-11 19:06:32.525. 

[2016-08-11 19:06:33,632]   INFO - etbrains.buildServer.HEARTBEAT - Revealed a concurrent competitor: Session 453755530 with node id MAIN_SERVER started at 2016-08-11 19:06:32.677 in mode INTENTION from (192.168.7.6, null, main_server, null, Apache Tomcat/7.0.68, version null, build null) last updated at 2016-08-11 19:06:32.677. 

[2016-08-11 19:06:33,632]   INFO - etbrains.buildServer.HEARTBEAT - Removed the concurrent sessions 453755530 (in impudent mode) 

[2016-08-11 19:06:33,732]   WARN - etbrains.buildServer.HEARTBEAT - Our session record has been extruded. We've lost 

[2016-08-11 19:06:33,732]   INFO -  jetbrains.buildServer.STARTUP - Current stage: Second TeamCity instance detected (administrator login is required to proceed)

  

3 comments

Hello Oleksandr,

Could you please stop TeamCity server and use Process Explorer to make sure that no TeamCity process running? If you find any, please stop them. After that start TeamCity server.

0

Hello Alina,

 
We had did exactly as you have advised, even did it multiple times, restarted the machine and started everything again. From the Log file that I have attached with my ticked, you can see that TeamCity Server is in conflict with Apache Tomcat service, which pretty strange, as it is the one that TeamCity relays on and start itself.   
0

Hi Oleksandr,

According to the attached log the server was started twice ("Starting TeamCity server" lines). Could you please make sure that there are no running TeamCity instances using Process Explorer, then start TeamCity server and attach the zipped /logs directory from TeamCity server?

0

Please sign in to leave a comment.