> From: millerKiller [mailto:smille8...@hotmail.com]
> Subject: RE: Socket Error in tomcat, white screen in browser
> 
> (1)  On startup, does Tomcat have to set up these dormant
> sockets(inactive/listening/passive) or, does Tomcat create
> them upon a need base?

They're established during Tomcat initialization.  They should appear in the 
netstat display by the time Tomcat logs its server startup message.  For 
example, here are the ones from my Vista system:

Feb 13, 2010 11:22:27 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 13, 2010 11:22:27 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Feb 13, 2010 11:22:27 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3943 ms

> (2) This one might answer number (1). Why does Tomcat use the three
> different sockets, doesn't it just need a single server listening
> socket?

One for each configured port.  The shutdown port (default 8005) is established 
only on the standard IPv4 loopback address (127.0.0.1), whereas the others are 
on 0.0.0.0 ([::] for IPv6) - meaning all IP addresses - unless the address 
attribute is used on the <Connector> elements.

Your snippet of server.xml showed an HTTP <Connector> on port 80, and an AJP 
one on 8009, so there has to be a listener set up for each.  (BTW, unless 
you're front-ending Tomcat with IIS or httpd, you don't need the AJP 
<Connector>.)

> I am testing the server on localHost and am getting
> Proto  Local Address          Foreign Address        State
> PID
>  TCP    127.0.0.1:8005             0.0.0.0:0              LISTENING
> 520

> Is this valid since I using localHost?

No - it shows that *something* is listening on 8005, but it's not likely to be 
Tomcat.  Use the Task Manager to find out what PID 520 is.  As I mentioned 
before, lots of products have Tomcat embedded in them, and at least one 
(VMware) leaves the shutdown port set to the default, creating difficulty for 
anyone trying to run an out-of-the-box Tomcat.

> (4)If nothing else is using the ports that I mentioned earlier when I
> use netstat -ano,  then why does it think there is a bind somewhere?

Something *is* using 8005, which will interfere with a Tomcat configured with 
the default shutdown port.

And again, be wary of running Tomcat under Eclipse, since Eclipse likes to use 
its own Tomcat configuration, not the one you thing you've set up.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to