1

I'm standing up a TeamCity server that's running it's own embedded Tomcat instance on Amazon EC2.

I have successfully gotten the instance to respond on port 8111 or 8080, but when I try to change the port to 80 I can't get it to respond on that port.

I have my security group set up to allow port 80, and verified that that's not the problem.

I'm not running anything else on my linux instance, just the TeamCity distro, so I don't have an apache server or anything running.

What seems odd to me is that when I run it on 8111 or 8080 and subsequently do a netstat I can see those ports being listened on, but when I put the port to 80 and run another netstat port 80 never shows up as being listened on.

Does anyone know why I can't get tomcat to respond to port 80?

2 Answers 2

3

With the Amazon EC2 Basic Linux instances the ports 1-1023 are privileged, so when I tried to start teamcity as non-root user it was crashing because I was trying to access a privileged port.

I found this out through this stackoverflow question

It outlines 2 solutions:

  • start teamcity as root user
  • run teamcity as service with jsvc
1
  • +1 Well done. I thought about that on my way back home. That's consistent with the fact that 8090 works fine. Apr 22, 2011 at 22:08
1

It's probably already in use by some other process. You should run

netstat -anc | grep 80

as root to find out what process has a LISTEN socket on that port.

4
  • the only thing I'm getting when I do that is udp on port 123. If run netstat from my non-root user i get the same thing. Thoughts?
    – Joseph
    Apr 22, 2011 at 16:47
  • I ran a test and did a yum install httpd which installed an Apache server, which I then navigated to in my browser successfully on port 80. netstat at that point showed apache listening on port 80. I then uninstalled using yum remove httpd and put TeamCity back on port 80, but no dice, it won't respond to the port.
    – Joseph
    Apr 22, 2011 at 16:50
  • I know only tomcat, not TeamCity, but I'd try to change on 8090 (for instance) to see if the port settings is taken from where I think it is (e.g. server.xml) if that works then there is something fishy with 80. Otherwise the port settings are non standard in TeamCity. Sorry that's all I can think of at the moment. Apr 22, 2011 at 17:18
  • changed to port 8090 and it works fine there. I'm thinking the OS is blocking it or something, but I can't figure out how.
    – Joseph
    Apr 22, 2011 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .