On 20.08.2017 11:18, Chaitanya Sabbineni wrote:
Hi All,

If tomcat is not stopped properly that is if any of the demon threads are
running under tomcat it will prevent jvm from starting as this will already
hold the threads. So these threads has to be killed in order start it
properly. Regarding the bouncing of the tomcat I.e starting and stopping
any
 *local*
application can connedt
 *locally*
> to the shutdown port and send a command stop to
the tomcat which will stop the server.


Note: If you have any concern about this, you can change the port, and the address (IP on which it listens)(*), and the shutdown command (**), in the server.xml -> <Server> tag.
http://tomcat.apache.org/tomcat-7.0-doc/config/server.html#Attributes

(*) which by default, /is/ localhost only, so don't change it.
(**) if you change this, you'll need to change your start/stop scripts too.

On Sat, 19 Aug 2017 1:18 am James H. H. Lampert, <jam...@touchtonecorp.com>
wrote:

This is not with the Debian apt-get that I'm having trouble figuring out
where it's finding its webapp contexts.

It's with the downloaded-from-Apache one that I've got running (on port
7070, no HTTPS) on a CentOS 5 box, and that I haven't figured out how to
run as a service (but that's not the immediate problem).

It seems that the Tomcat server was apparently running fine for several
days (albeit unmonitored and without any firewall opening allowing it to
be reached from outside, up until yesterday afternoon), up until a few
hours ago. Then it started going down.

Yesterday afternoon, I put our webapp context on it, and changed the
port forwarding in the firewall, so that the outside access (and
therefore, the Site24x7 monitor on this particular server) pointed to
it, rather than to what it replaced.

And then I got a message from Site24x7 telling me that it had gone down.
After a brief inspection, I shut it down and restarted it.

Less than an hour later, the same story. And a third time.

The fourth time, I had my hands too full to go in and manually restart
it, and to my surprise, without my having restarted it, I got a message
from Site24x7 telling me it was back up.

And it bounced up and down a few times since then. I eventually shut it
down.

There's nothing in catalina.out between our webapp announcing that it
was running (9:14 AM), and the messages from my shutting it down (11:46
AM).

So far as I've been able to determine, when it's reported as down, it's
not accepting requests even from within the LAN.

Anybody ever seen anything like this before?

Yes, but there can be several reasons :
- TCP connections to port 7070 are no longer being accepted, because there is a TCP/IP-level problem - TCP connections to port 7070 are no longer being accepted, because there is nothing listening there (no Tomcat e.g.) - TCP connections are accepted, and the monitoring system can establish a connection to it, and can send on it a HTTP request for "/", but Tomcat is not responding to it within the timeout that the monitoring system expects (because tomcat is too busy e.g.)
- ...

You first need to find out precisely what the monitoring system is really 
telling you.
(It's certainly not saying that "tomcat is bouncing up and down"). Is it not able to connect, or is it able to connect, but not getting an answer to a HTTP request ?

On your server, the command
netstat --tcp -aopn
(optionally :
netstat --tcp -aopn | grep 7070
)
will show you if something is listening on port 7070, and if it is really 
tomcat.
The command-line program "curl" (or perl's "lwp-request") can help you find out if tomcat is answering requests.
Turning on tomcat's Access Log can also help.
 http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve



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

Reply via email to