Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 27717 invoked from network); 27 Jul 2009 20:39:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jul 2009 20:39:45 -0000 Received: (qmail 56239 invoked by uid 500); 27 Jul 2009 20:40:46 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 56159 invoked by uid 500); 27 Jul 2009 20:40:46 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 56148 invoked by uid 99); 27 Jul 2009 20:40:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jul 2009 20:40:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jul 2009 20:40:35 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id 9E3F2226075 for ; Mon, 27 Jul 2009 22:40:14 +0200 (CEST) Received: from tor.combios.es ([127.0.0.1]) by localhost (tor.combios.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ak4PHZ6uLVRx for ; Mon, 27 Jul 2009 22:40:14 +0200 (CEST) Received: from [192.168.245.129] (p549EB2B6.dip0.t-ipconnect.de [84.158.178.182]) by tor.combios.es (Postfix) with ESMTPA id 0C4A3226073 for ; Mon, 27 Jul 2009 22:40:13 +0200 (CEST) Message-ID: <4A6E1088.9070102@ice-sa.com> Date: Mon, 27 Jul 2009 22:39:36 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: aw@ice-sa.com User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Trouble setting up virtual host References: <4eedb92a0907221241p1c3e8166o6c9bf733874f5d6@mail.gmail.com> <4A67974E.9080808@ice-sa.com> <4A687681.2010205@ice-sa.com> <4A689326.5090608@ice-sa.com> <4A68C927.2030403@ice-sa.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 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 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-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org