tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Janner <Jeffrey.Jan...@PolyDyne.com>
Subject RE: please help me how i can test that whether tomcat is up and running on
Date Mon, 03 Oct 2011 18:25:14 GMT
And the key to the proper answer is this bit from the OP:
>>> please help me how i can test that whether tomcat is up and running
>>> on a remote machine from a client machine.
The proper answer is "he can't", as the server is only listening to the port via the localhost
IP (aka loopback).  There is no way he will ever be able to check status this way from a client
(remote) system.


> -----Original Message-----
> From: André Warnier [mailto:aw@ice-sa.com]
> Sent: Thursday, September 22, 2011 3:21 PM
> To: Tomcat Users List
> Subject: Re: please help me how i can test that whether tomcat is up
> and running on
> 
> Hi.
> 
> This is all very nicely explained, but maybe irrelevant.
> As far as I understand, the OP is trying to connect to the "shutdown
> port" mentioned in
> the <Server> tag, not to a <Connector>.  On that shutdown port, there
> should not be so
> many connection requests that they outrun the ability of Tomcat to
> accept a connection on it.
> I have a suspicion that the client does not connect to Tomcat though,
> maybe not even to
> the Tomcat host.
> But the OP did not really provide enough information to validate or
> invalidate that suspicion.
> 
> Daniel Baktiar wrote:
> > Hi Vishveswara,
> >
> > If you look at the behavior of ServerSocket, or any BSD-like
> listening
> > server socket in general, there is something called 'backlog'.
> >
> http://download.oracle.com/javase/1.4.2/docs/api/java/net/ServerSocket.
> html
> >
> > In short, backlog is something like a queue, if all your worker
> thread
> > occupied, the listening server socket is allowed to hold and queue n
> number
> > of connecting socket. Only when the all threads occupied and backlog
> full
> > then you will get "connection refused". The connection socket in the
> backlog
> > is silently accepted but not served yet. If the connection socket was
> held
> > in the backlog for quite some time (e.g. due to existing worker
> threads
> > still busy), until it is time out for the connection client socket,
> then
> > that what you have said may occur: the Tomcat is up and running, yet
> the
> > connection client socket  java.net.ConnectException: Connection
> timeout:
> > connect.
> >
> > So, what you can detect by a connection client socket is not "whether
> Tomcat
> > is up and running", instead "whether Tomcat is up and running and
> able to
> > accept and process one more client socket within the client time out
> > interval". There are cases where "Tomcat is up and running" but "is
> not able
> > to accept and process one more client socket within the client time
> out
> > interval" (which is the case when "java.net.ConnectException:
> Connection
> > timeout: connect" happens).
> >
> > There is an "acceptCount" attribute in server.xml <Connector /> which
> > specifies the backlog. If you set this to 0, it may behave the way
> you want,
> > but you have to test yourself whether that will be good for the
> system
> > behaviour and performance from the user point of view.
> >
> > ---
> > daniel baktiar
> >
> > On Thu, Sep 22, 2011 at 18:30, vishveswara chary varanasi <
> > vvchary.varanasi@gmail.com> wrote:
> >
> >> Tomcat community has a wiki which providded the
> >>
> >>
> http://wiki.apache.org/tomcat/HowTo#How_do_I_check_whether_Tomcat_is_UP
> _or_DOWN.3F_There_is_no_status_command
> >>
> >> i have tried to connect to tomcat using sockect connection on the
> port
> >> where the tomcat running
> >>
> >>  Socket socket = new Socket("hostname", port);
> >>
> >> this works some time and some time even if the tomcat is up and
> >> runnning this is throwing the java.net.ConnectException: Connection
> >> timed out: connect.
> >>
> >> please help me how i can test that whether tomcat is up and running
> on
> >> a remote machine from a client machine.
> >>
> >> Thanks
> >>
> >> --------------------------------------------------------------------
> -
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

__________________________________________________________________________

Confidentiality Notice:  This Transmission (including any attachments) may contain information
that is privileged, confidential, and exempt from disclosure under applicable law.  If the
reader of this message is not the intended recipient you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to the sender or
telephone (512) 343-9100 and delete this transmission from your system.
Mime
View raw message