André Warnier wrote:
Dave,
from the whole collection of recent messages, it very much looks to me
as if you are effectively trying to run 2 Tomcats on this machine, and
that they somehow conflict in terms of ports, maybe in terms of which
applications they run, etc..
A while ago, you mentioned another server, for flash stuff. Are you
sure that this program is itsef not based on Tomcat for example ?
It may also be that you are trying to start the same Tomcat code
twice, with different parameters (this is a technical possibility).
I don't know exactly what to tell you, but it seems that some things
don't make sense otherwise.
In any case, the Connectors that you have activated in the server.xml,
do not seem to match the ports that are really open for listening.
Maybe you should have a look at the "ps" and "netstat" options on your
system, and proceed calmly and one bit at a time to find out what is
running and using which ports.
Something like :
- turn off Apache
- turn off Tomcat
- turn off the other application supposedly using port 8088
Then do a
netstat -pan | grep LISTEN
(or maybe with -o as Chuck mentioned)
and save the result (keeping only the tcp-related lines)
Then turn on Apache, and do the same netstat command, and compare the
result. Any additional LISTEN port is probably Apache.
Save the result again.
- turn off Apache, and turn on the flash application
Do a netstat again and compare to the first one.
Etc...
When you have identified ports that really seem to belong to one or
the other process consistently, then it is possible, with the
appropriate options of netstat and ps, to find out which program is
really running, that uses these ports.
The basic principle is this : it is not possible for two distinct
processes (Tomcat, Apache, other app), to both have the same port open
for listening (that's what the "grep LISTEN" is about above).
The first one that opens the port "wins", and the second one trying to
open the same port will get an error of the kind "cannot bind.. port
already in use" (and that program will generally then refuse to even
start)(but not necessarily; depending on the program, it may still
run, in some cramped way; but Tomcat will probably not).
It may be that you installed Tomcat once, then de-installed it, then
re-installed it in a new location but without removing first
everything from the first one, etc.. or something of the kind.
I don't now exactly what is going on, but something is at the moment
not clear, and it makes it almost impossible to help you, because when
you access a given URL on a given port, we don't even know what
process is really answering (or not).
OK, here is my report in response to all of this.
I shut down tomcat, red5 and apache. Issued a killall java (a couple of
times)
Issued the command netstat -pan | grep LISTEN | grep tcp
Verified that none of the ports that I expect (in relation to this
problem I am having) were showing up.
Started apache and ran the command again and correctly saw httpd show up
listening on port 80 and 443.
shutdown apache
started red5 and show it show up on ports 8088 and 5080 (note these are
not interfering with tomcat.)
killed red5 and started tomcat
Lo and behold, there were all my ports I expect for tomcat: 8081, 8005,
8010, 8011
Started apache and still everything looked fine.
Finally, started red5 and still all looks correct. Now my site/app works
again (well the web portion of it at least)
So, it appears to me that the server was just sort of "holding on to old
connections" that were getting in the way of each other. Probably not a
good description but that is what it looks like. All those CLOSE_WAIT
connections on 8009 have now disappeared as well.
So I suppose this is a good step forward ... yes?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org