Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as not a real question by mdpc, voretaq7 Dec 4 '12 at 2:35

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
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 3 '12 at 19:54
    
netstat -a revealed I'm listening on port 80. –  Sam Pearson Dec 3 '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") –  Sam Pearson Dec 3 '12 at 20:10
2  
Settings should be in <TeamCity Home>/conf/server.xml file (See confluence.jetbrains.net/display/TCD5/… ) –  sgmoore Dec 3 '12 at 20:17
    
Thanks sgmoore, found it! –  Sam Pearson Dec 3 '12 at 20:20

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.