Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm on a Linux machine and am trying to replace an Apache2 instance with a Tomcat 6 instance. I shut down the Apache instance by running a kill on the appropriate pid, but when I try to access any pages, I get an error 504 instead of 404. Additionally, when I run the Tomcat 6 instance, I still get the error 504. Requests to port 80 get returned much faster than requests to port 8080. Any idea what I can do to get Tomcat 6 up and running?

share|improve this question
What are you trying to do? Apache, Tomcat configuration files? – quanta Oct 12 '11 at 2:05
The Tomcat configuration file is the default. The regular Apache instance shouldn't be running. – Random2 Oct 12 '11 at 2:07
Which distro are you running? Why not stop Apache in standard way via init script instead of kill pid? Are you sure you kill the parent process? lsof -i :80 or netstat -natp | grep :80? – quanta Oct 12 '11 at 2:12
Both of those return nothing. – Random2 Oct 12 '11 at 2:16
ps -ef | egrep 'apache|httpd'? Post the Apache configuration file? – quanta Oct 12 '11 at 2:20
up vote 1 down vote accepted

The firewall was causing the problem.

share|improve this answer

you might try lsof -p 33333 | grep TCP where 33333 is your tomcat's pid, you could then see where connections are being made. With the 504 on 8080 AND 80, my first guess would be that you have a loop, and that you forward request from one to another or on the same one... that could explain the timeouts, but we don't have much to work on with what you give us.

share|improve this answer
That returns: TCP *:webcache (LISTEN), TCP *:8009 (LISTEN), TCP localhost.localdomain:8005 (LISTEN) – Random2 Oct 12 '11 at 3:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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