0

I have no clue what other program might be using port 80, but after checking the TeamCity log file, it appears to be in use already:

The following is from catalina.2012-12-03.log:

SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-80"] java.net.BindException: Address already in use: JVM_Bind :80 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:382) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:553) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:369) at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119) at org.apache.catalina.connector.Connector.initInternal(Connector.java:937) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:573) at org.apache.catalina.startup.Catalina.load(Catalina.java:598) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:449)

I tried changing the port when the 'Configure Build Agent Properties' window came up during installation, in the serverUrl property, but this didn't seem to have any effect.

Is there a configuration file I use to change the server port, and then maybe restart the TeamCity services?

xofz
  • 129
  • 1
  • 5
  • You need to do a little more research before we can possibly help you. For instance have you done netstat -a? Have you looked at ps or lsof? – mdpc Dec 03 '12 at 19:54
  • netstat -a revealed I'm listening on port 80. – xofz Dec 03 '12 at 20:08
  • Strange thing is, going to localhost in my web browser doesn't work (Google Chrome pops up with "Oops! This link appears to be broken") – xofz Dec 03 '12 at 20:10
  • 2
    Settings should be in /conf/server.xml file (See http://confluence.jetbrains.net/display/TCD5/Installing+and+Configuring+the+TeamCity+Server ) – sgmoore Dec 03 '12 at 20:17

1 Answers1

2

I solved the problem by going into TeamCity folder\conf\ and opening up server.xml.

About halfway down there was the following:

<Connector port="80" protocol="HTTP/1.1"
           connectionTimeout="60000"
           redirectPort="8543"
           useBodyEncodingForURI="true" />

So I changed the port attribute to 81 and restarted the build agent and server services and it worked! I can now access TeamCity web at http://localhost:81.

xofz
  • 129
  • 1
  • 5
  • You may also have to change the build-agents properties for calling the new port in `TeamCity folder\buildAgent\conf\buildAgent.properties` – cederlof Sep 11 '15 at 10:29