TeamCity hanginig at startup
Hey! I am having such kind of problem: after a blackout I am team city is hanging at the startup. Even after restart.(Im restarting it with runAll.sh stop && runAll.sh start) TeamCity is isolated into an lxc container on local server. My TeamCity instance has no internet access.
When I run runAll.sh stop I see this
Using CATALINA_BASE: /usr/local/teamcity
Using CATALINA_HOME: /usr/local/teamcity
Using CATALINA_TMPDIR: /usr/local/teamcity/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/teamcity/bin/bootstrap.jar:/usr/local/teamcity/bin/tomcat-juli.jar
Using CATALINA_PID: ../logs/teamcity.pid
PID file found but no matching process was found. Stop aborted.
Stopping TeamCity build agent...
Java executable is found in '/usr/bin/..'.
Starting TeamCity Build Agent Launcher...
Agent home directory is /usr/local/teamcity/buildAgent
Received stop command from console.
Sending agent shutdown command to: http://localhost:9090
Shutdown command successfully sent. Agent will exit when idle.
When I run runAll.sh start I see this
sh bin/runAll.sh start
Using CATALINA_BASE: /usr/local/teamcity
Using CATALINA_HOME: /usr/local/teamcity
Using CATALINA_TMPDIR: /usr/local/teamcity/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/teamcity/bin/bootstrap.jar:/usr/local/teamcity/bin/tomcat-juli.jar
Using CATALINA_PID: ../logs/teamcity.pid
Existing PID file found during start.
Tomcat appears to still be running with PID 213. Start aborted.
If the following process is not a Tomcat process, remove the PID file and try again:
UID PID PPID C STIME TTY TIME CMD
root 213 1 0 фев06 ? 00:21:47 /usr/bin/java -Djava.util.logging.config.file=/usr/local/teamcity/conf/logg
Starting TeamCity build agent...
Java executable is found in '/usr/bin/..'.
Starting TeamCity Build Agent Launcher...
Agent home directory is /usr/local/teamcity/buildAgent
Current Java runtime version is 1.8
Lock file: /usr/local/teamcity/buildAgent/logs/buildAgent.properties.lock
Using no lock
Done [10225], see log at /usr/local/teamcity/buildAgent/logs/teamcity-agent.log
here is some info from
/usr/local/teamcity/buildAgent/logs/teamcity-agent.log
.8/64 (1.8.0_121) at /usr/lib/jvm/java-1.8.0-openjdk-amd64 (JDK) [200]
1.8/64 (1.8.0_121) at /usr/lib/jvm/java-8-openjdk-amd64/jre (JRE) [300]
[2017-02-10 21:31:23,896] INFO - ggers.vcs.mercurial.HgDetector - Cannot detect installed mercurial
[2017-02-10 21:31:23,898] INFO - dAgentConfigurationInitializer - Loading build agent configuration from /usr/local/teamcity/buildAgent/conf/buildAgent.properties
[2017-02-10 21:31:30,944] INFO - n.AmazonInstanceMetadataReader - Amazon is not available. Amazon EC2 integration is not active: Failed to connect to http://169.254.169.254/2016-04-19. The host did not accept the connection within timeout of 7000 ms
[2017-02-10 21:31:30,944] INFO - .agent.AmazonPropertiesUpdater - Fetched AmazonEC2 instance metadata:
[2017-02-10 21:31:30,947] INFO - zon.agent.AmazonMetadataChecks - Amazon EC instance metadata contains no keys
[2017-02-10 21:31:30,948] WARN - .agent.AmazonPropertiesUpdater - Fetched Amazon EC2 instance metadata does not contain required values. Probably this agent was not started inside Amazon EC2. Is proxy server used?
[2017-02-10 21:31:31,026] INFO - .agent.impl.OsArchBitsDetector - Detecting via "getconf LONG_BIT", exit code: 0, output: 64
[2017-02-10 21:31:31,026] INFO - .agent.impl.OsArchBitsDetector - "teamcity.agent.os.arch.bits" detected as "64"
[2017-02-10 21:31:31,038] INFO - jetbrains.buildServer.AGENT - Start build agent
[2017-02-10 21:31:31,050] INFO - jetbrains.buildServer.AGENT - Agent Web server started on port 9090
[2017-02-10 21:31:31,055] INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to /usr/local/teamcity/buildAgent/logs/buildAgent.xmlRpcPort
[2017-02-10 21:31:31,056] INFO - agent.impl.AgentPortFileWriter - Launcher version is 42538
[2017-02-10 21:31:31,057] INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to /usr/local/teamcity/buildAgent/logs/buildAgent.xmlRpcPort :DONE!
[2017-02-10 21:31:31,060] WARN - nstall.PackagesInstallerRunner - NuGet runner jb.nuget.installer available only under Windows
[2017-02-10 21:31:31,061] WARN - t.agent.runner.pack.PackRunner - NuGet runner jb.nuget.pack available only under Windows
[2017-02-10 21:31:31,061] WARN - .publish.PackagesPublishRunner - NuGet runner jb.nuget.publish available only under Windows
[2017-02-10 21:31:31,061] WARN - nner.agent.MSpecServiceFactory - MSpec runner is only available under windows
[2017-02-10 21:31:31,065] INFO - agent.PowerShellServiceFactory - Powershell runner is disabled: Powershell was not found.
[2017-02-10 21:31:31,077] WARN - StudioTestRunnerServiceFactory - Visual Studio test runner is only available under windows
[2017-02-10 21:31:31,094] INFO - se.agent.ClearCaseAgentSupport - ClearCase agent checkout is disabled: Could not find executable: 'cleartool'. Original message: Cannot run program "cleartool" (in directory "."): error=2, Нет такого файла или каталога
[2017-02-10 21:31:31,099] INFO - buildServer.AGENT.registration - Registering on server via URL http://localhost:8111. AgentDetails{Name='Default Agent', AgentId=null, BuildId=null, AgentOwnAddress='null', AlternativeAddresses=[10.10.100.58], Port=9090, Version='42538', PluginsVersion='42538-md5-dfc42d978978f2937dfb3a5093d1cb4a', AvailableRunners=[Ant, cargo-deploy-runner, Duplicator, ftp-deploy-runner, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, JPS, Maven2, MSBuild, NAnt, NUnit, rake-runner, SBT, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, VS.Solution], AvailableVcs=[tfs, cvs, jetbrains.git, mercurial, svn, perforce], AuthorizationToken='94b30d0f604ac1a6d5d4c48226a81ee1', PingCode='q2tK01ViEBLxOZ7Tm0exzfG6yypYCxvE'}
[2017-02-10 21:31:31,102] INFO - jetbrains.buildServer.AGENT - Build agent started
[2017-02-10 21:31:31,553] INFO - r.artifacts.impl.HttpDiskCache - Cleaning up items with life time in cache greater than 172800 seconds
[2017-02-10 21:31:31,554] INFO - r.artifacts.impl.HttpDiskCache - Finished cleaning up expired items, 0 items removed
[2017-02-10 21:31:31,556] INFO - dDirectoryBasedCleanupRegistry - Removing files from /usr/local/teamcity/buildAgent/temp/.old
[2017-02-10 21:31:31,556] INFO - dDirectoryBasedCleanupRegistry - Removing files from /usr/local/teamcity/buildAgent/work/.old
[2017-02-10 21:31:31,589] INFO - l.directories.DirectoryMapImpl - Cleaning up old checkout directories. Default lifetime = 192 hour(s)
[2017-02-10 21:32:49,959] WARN - jetbrains.buildServer.AGENT - Rejecting xml-rpc connection from /10.10.101.72
ubuntu@teamcity:/usr/local/teamcity$
Please sign in to leave a comment.
Hi,
from the output you've pasted, it seems that there is a server already running, but for some reason it says that the PID doesn't match that of the one stored in the pid file. You should be able to simply kill the process, remove the PID file and just start it again from scratch. The agent seems to be starting up just fine.
Could you try doing that? If the problem still persists, please check the teamcity-server.log file and the teamcity-agent.log (in case it's the agent failing to connect). You can send them to us as well for further inspection if you consider it appropriate.