Lisa D Beggs/AC/VCU wrote:
...
Now another bit :
In the following, I have removed the lines of less interest right now,
leaving only the ones related to tomcat5.
The ... represent removed lines.
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
C:\Documents and Settings\Administrator>netstat -anb -p tcp | more
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:13 0.0.0.0:0 LISTENING 5764
[D4.exe]
I have left the lines above to explain what the columns mean :
"Proto" is the protocol, and in this case it is always TCP.
"Local address" is composed of an IP address, a ":", and a port number.
It is the IP address and port used by the process indicated at the end
of the same line (see below).
"0.0.0.0" as an IP address, means "ALL the IP addresses that this server
has". It's like a wildcard.
"127.0.0.1" also means "localhost", an alias for "this server".
The other IP address that can be there is the IP address of the server
itself, in this case "128.172.12.129". Just trust me on this for now.
"Foreign address", if it contains anything different from 0, is also a
combination of an IP address and a port. It is the IP address/port to
which this process is "talking to", if it has an ongoing connection with
another process.
In this case, "0.0.0.0:0" means "none", and it means that this server
process, for the time being, is not connected to anything.
"State" is the state of this connection. "LISTENING" means that this
line is relative to a "server-like" process, which is waiting for
connections to its own Local address/port. Tomcat is such a server, and
we should see somewhere a line showing that your Tomcat5 is LISTENING on
port 80, or port 8080, or both.
The last 2 columns are respectively : the "process-id" of this program
(each running program has a different one), and the name of the program.
... (deleting a bunch of lines of little interest now)(my,my, do you
have stuff running on that server..)
TCP 0.0.0.0:2070 0.0.0.0:0 LISTENING 4900
[tomcat5.exe]
Ha. This is an interesting one. It shows a process "tomcat5.exe", with
a process-id of 4900, listening on port ... 2070.
2070 ? what is that ? So something in this tomcat is also listening on
port 2070. Wonder what that may be..
But let's continue.
...
TCP 0.0.0.0:5001 0.0.0.0:0 LISTENING 4900
[tomcat5.exe]
There's another tomcat5, listening on port .. 5001 !
I also have no idea what that is for.
In fact,it's the same tomcat as the previous one (process-id 4900), just
happening to listen on another port also.
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 4900
[tomcat5.exe]
And here is the one we're looking for !
Still the same Tomcat, listening on port 8080.
That, we believe we know where it comes from.
(That's from your <Connector ..port="8080"> in the server.xml file.)
...
TCP 127.0.0.1:8005 0.0.0.0:0 LISTENING 4900
[tomcat5.exe]
And here goes another one !
This one also, we know what it is. You can see it at the top of your
server.xml file. It is the special Connector named "shutdown".
...
TCP 128.172.12.129:2019 128.172.12.129:6415 ESTABLISHED 4900
[tomcat5.exe]
Here goes the same tomcat again. This time, it is not LISTENING on a
port, it has an ESTABLISHED (means connected) connection to some other
process on the same server (because the "foreign address is the same IP
address as this server). That other process uses port 6415.
TCP 128.172.12.129:3009 128.172.12.129:6415 ESTABLISHED 4900
[tomcat5.exe]
TCP 128.172.12.129:3014 128.172.12.129:6415 ESTABLISHED 4900
[tomcat5.exe]
Above are two more connections of our Tomcat to (probably) this same
other process on the same server..
...
TCP 128.172.12.129:4372 128.172.12.129:6415 ESTABLISHED 4900
[tomcat5.exe]
TCP 128.172.12.129:4794 128.172.12.129:6415 ESTABLISHED 4900
[tomcat5.exe]
TCP 128.172.12.129:4842 128.172.12.129:6415 ESTABLISHED 4900
[tomcat5.exe]
TCP 128.172.12.129:4889 128.172.12.129:6415 ESTABLISHED 4900
[tomcat5.exe]
and here 4 more of these.
TCP 128.172.12.129:6415 128.172.12.129:4372 ESTABLISHED 2804
[CMS.exe]
Ha. See here, we have the process that has the other side of the
connections of those previous Tomcat processes. This particular
instance of the program "CMS.exe", is connected to the first of the 4
Tomcat process just above. (You can see that because their respective
"local" and "foreign" addresses are the opposite of one another).
... (more similar lines omitted)
TCP 127.0.0.1:1192 127.0.0.1:9592 CLOSE_WAIT 4372
[policy.client.invoker.exe]
...
TCP 127.0.0.1:53001 127.0.0.1:2220 TIME_WAIT 0
TCP 128.172.12.129:1709 128.172.12.129:6415 TIME_WAIT 0
TCP 128.172.12.129:2165 128.172.4.60:135 TIME_WAIT 0
The various lines above showing connections in the CLOSE_WAIT and
TIME_WAIT states are connections that are in the process of closing.
They are of no interest here, I just mention them for completeness.
In summary, what does this tell us ?
We saw a Tomcat instance listening on port 8080.
One thing that we /did not/ see above, is a Tomcat LISTENING on port 80.
That means that, whether you use a local browser on the server itself,
or a browser on a remote workstation, *in any case no browser should be
able to connect to tomcat on port 80*, because tomcat is not listening
on that port.
In other words, if the configuration has not changed since, and you try
from the browser on the server itself (or anywhere) to access the URL
http://adm138/InfoViewApp
OR
http://adm138:80/InfoViewApp
(the same thing really)
you should /NOT/ get an answer from Tomcat.
If you do, then it means that you are getting a saved copy of the page,
from the browser's cache memory.
If you keep the "shift" button pressed, and hit the "reload page"
button, you /must/ get an error.
Or else I give up...
Now if you change your <Connector> again in the server.xml file, and
reset its port to 80, and restart Tomcat, then :
if you enter the same command as above, the line with Tomcat listening
on port 8080 should no longer be there, and instead you should have a
line showing Tomcat listening on port 80.
And you should then be able to get an answer in the browser for the URL
http://adm138/InfoViewApp
That is why the full output of this "netstat" command was important.
It shows on which port(s) Tomcat is *really* listening.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org