RE: please help me how i can test that whether tomcat is up and running on

2011-10-03 Thread Jeffrey Janner
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:a...@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.varan...@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-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@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.


Re: please help me how i can test that whether tomcat is up and running on

2011-10-03 Thread André Warnier

Coming late to the party, hm ?

Jeffrey Janner wrote:

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.


As was mentioned in the first answer to the OP's post, on 22/9.
But the OP himself seems to have lost interest a long time ago, and never even posted a 
message indicating whether he had solved his problem.

Ungrateful, they are.


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



Re: please help me how i can test that whether tomcat is up and running on a remote machine from a client machine.

2011-09-22 Thread André Warnier

vishveswara chary varanasi 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



which is ?


 Socket socket = new Socket(hostname, port);



What is hostname in your case ? can the client resolve this name to an IP address 
corresponding to the Tomcat host ?



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.



When does it work and when not ?


please help me how i can test that whether tomcat is up and running on
a remote machine from a client machine.



Read this carefully : http://tomcat.apache.org/tomcat-7.0-doc/config/server.html
(all of it, but particularly the address attribute).

Unless I am mistaken, it means that by default Tomcat only listens, on that port, on the 
address localhost, which usually is the IP address 127.0.0.1.

In other words, by default this will only work from a client running on the 
same host.

By using e.g. : address=0.0.0.0
you could tell Tomcat to bind this listening socket to all the IP addresses of the Tomcat 
host.  But then, you have to be extra careful not to allow just any client to stop Tomcat, 
just by connecting to that IP/port and sending SHUTDOWN.


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



Re: please help me how i can test that whether tomcat is up and running on

2011-09-22 Thread Daniel Baktiar
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.varan...@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-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: please help me how i can test that whether tomcat is up and running on

2011-09-22 Thread André Warnier

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.varan...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







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



Re: please help me how i can test that whether tomcat is up and running on

2011-09-22 Thread Daniel Baktiar
Oops. I missed that. You've pointed it straight!

---
daniel baktiar

On Fri, Sep 23, 2011 at 04:20, André Warnier a...@ice-sa.com wrote:

 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.htmlhttp://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.varan...@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_commandhttp://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.orgusers-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





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