Can't start TeamCity and Build agent.

CentOS7, TeamCity 2018.2

My TeamCity suddenly stopped working. It fails to execute start/stop. Reboot the machine and kill by PID don't  help either.

Output from the command line:

[root@host bin]# ./ stop
Java executable is found: '/usr/lib/jvm/java-1.8.0-openjdk-'
Using CATALINA_BASE: /opt/TeamCity
Using CATALINA_HOME: /opt/TeamCity
Using CATALINA_TMPDIR: /opt/TeamCity/temp
Using JRE_HOME: /usr/lib/jvm/java-1.8.0-openjdk-
Using CLASSPATH: /opt/TeamCity/bin/bootstrap.jar:/opt/TeamCity/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/TeamCity/bin/../logs/
PID file found but either no matching process was found or the current user does not have permission to stop the process. Stop aborted.
Stopping TeamCity build agent...
Java executable is found: '/usr/lib/jvm/java-1.8.0-openjdk-'
Starting TeamCity Build Agent Launcher...
Agent home directory is /opt/TeamCity/buildAgent
Received stop command from console.
Sending agent shutdown command to: http://localhost:9090
Failed to shutdown agent gracefully: Connection timed out (Connection timed out)
Cannot stop agent gracefully, you can try to kill agent by './ stop kill' command

Output from Catalina's log:

25-Dec-2018 20:35:48.289 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8105]: Cannot assign requested address (Bind failed)
at Method)
at org.apache.catalina.core.StandardServer.await(
at org.apache.catalina.startup.Catalina.await(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(


25-Dec-2018 20:35:48.563 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Change Observer 1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)

What can be a reason or a solution?

1 comment



The catalina log should have the answer you are looking for. TeamCity is configured to run in a given address:port. This (most probably the port) is not available for some reason, or the system is refusing to provide it. The most common situation here is that another application is using that same port, preventing teamcity from using it and thus starting, although it could also be that the user lacks permissions to request binding that port.


Make sure that no application has the port locked and try again.


Please sign in to leave a comment.