RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-07 Thread Jay
Thanks Chris for answering all the questions!

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Friday, March 07, 2014 3:36 PM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jay,

On 3/7/14, 1:46 PM, Jay wrote:
> Tomcat instance launches its background processes which seems to 
> detached from the console/terminal (Please correct if it is not right 
> phrase.)

Here is the misunderstanding: Tomcat's scripts launch Tomcat in the 
"background", but it does not disconnect from the terminal. When you kill the 
terminal (i.e. log out), a signal is sent to all processes bound to the 
terminal that says "terminal hung up" -- that's why its called SIGHUP "Hang UP" 
from the old days when terminals were things like telephone lines that could be 
off-hook on on-hook.

When the JVM receives this process on Solaris (and not all Solarises, not all 
versions, not all configurations), the JVM quits.

Using "nohup" does in fact divorce the JVM from the terminal so that when the 
terminal exits (because you logged-out), the SIGHUP does not kill the JVM.

> As normally, those backend processes keep alive event the user logout 
> or disconnect from the console/terminal where the Tomcat instance was 
> launched. (this was what I meant)

"Normal" for you is abnormal for others. Solaris is a very old time-sharing 
system and the SIGHUP thing was designed to kill processes when the remote user 
went-away. If you want them to not to die, you have to explicitly use "nohup". 
I'm sorry that this is the case on your system, but apparently, its required.

There's nothing the Tomcat team can do to change this.

> Actually, we start Tomcat just using ./startup.sh on Linux the same 
> way as we started it on this SunOS and it never stops on Linux unless 
> stopping it using shutdown.

Different environment. Different kernel. Different userspace.
Different shell. Different everything. Ever heard the term "GNU's Not UNIX"? 
Well, guess what? Solaris /is/ UNIX, and GNU/Linux isn't that.
They may smell the same, but they are very different.

> As we know many people also start the Tomcat as this way on their 
> Linux and Solaris machines without this issue.

Ev-e-ry siiistem's different, er-e-ry sistem's god. If a 
system's wasted, in your neighborhood...

> Questions: 1. As Tomcat gives a message of "A valid shutdown command 
> was received via the shutdown port." in the log when it receives the 
> signal from a Shutdown command. What message can we see in the log 
> when the Tomcat receives the SIGHUP and/or SIGTERM, etc. that stops 
> the Tomcat?

Tomcat cannot receive the signal, only the JVM can. You'll see that the 
connectors are shut down gracefully, etc. and the server stops.
So, basically, exactly what you have already observed.

> 2. When Tomcat receives the SIGHUP and/or SIGTERM, will Tomcat stop 
> immediately or Tomcat would stop itself after a half day or several 
> days randomly?

Tomcat will shut down as fast as it can. So, immediately.

> 3. If there are multiple users connected to the Solaris with the 
> consoles/terminals, would the Tomcat receives the SIGHUP and/or 
> SIGTERM when any of user logs out and/or disconnected from the 
> Solaris?

It should only be tied to the terminal that was used to launch it.
But, Solaris might have complicated rules for parent-process inheritance when a 
process's parent dies. It may be re-inherited several times before it's 
eventually killed.

> 4. Will the Solaris send the SIGHUP and/or SIGTERM to the Tomcat 
> immediately just the user logged out and/or terminated from the 
> Solaris? or Solaris would wait and then sent the SIGHUP and/or SIGTERM 
> to the Tomcat after a half day or several days randomly?

It should happen immediately.

You should really be asking your administrator about this. We are not Solaris 
experts.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTGi26AAoJEBzwKT+lPKRY8wEP/RDHlc0KHIAFeS3Za5kPODBv
BUOm75wt96sDDFok0qITPV7WDp3Mstb8mnz0Be6+0TONpx6CPqXj4LtfD7aR/Bas
BdTJWPuaXUeOE+BoejCl23+jADCwHccE1S3KJE5nno8TZ7yjDWxV6BN3krkyY6Bk
wV52ITPWM56Uecyzz2voXDgsypS6WUIAHPHOkAJNMsumDQnTaQZqTDJZ0f1s0YVD
9VXcQ6CqGquijw81PhcA4f64U9gb0+cBxupKayl2Sx6sGSlw9F/3QrM88iMBEuY3
xNm/g9bBKzxjMyDDAuhU67fP2HeUNDzpeWn6ZpNOTQ7kar+wyyqDcKaaOxPb1CQ7
ef7Zb/o0355syi2l7JT5V7FNp3HxXMkFxtQRVvXLEh4kKw0c4RMV+iz3Vf5pWvQL
9pffQHBu1p1lUZk5vvMqxyGN/d6GRahwMQMImuTK52GOW0VK5J9TkGthEbg4UIXE
uwL5Z+nCbMGYVT+Zheij6Uq4WyDpyyoy7WHF3JSzhw0I64TOXEnH1MTwmjQ6orgt
qyd9tShHnk/gTGOEBvvGZuikbPTMt2WAZW95U

Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jay,

On 3/7/14, 1:46 PM, Jay wrote:
> Tomcat instance launches its background processes which seems to
> detached from the console/terminal (Please correct if it is not
> right phrase.)

Here is the misunderstanding: Tomcat's scripts launch Tomcat in the
"background", but it does not disconnect from the terminal. When you
kill the terminal (i.e. log out), a signal is sent to all processes
bound to the terminal that says "terminal hung up" -- that's why its
called SIGHUP "Hang UP" from the old days when terminals were things
like telephone lines that could be off-hook on on-hook.

When the JVM receives this process on Solaris (and not all Solarises,
not all versions, not all configurations), the JVM quits.

Using "nohup" does in fact divorce the JVM from the terminal so that
when the terminal exits (because you logged-out), the SIGHUP does not
kill the JVM.

> As normally, those backend processes keep alive event the user
> logout or disconnect from the console/terminal where the Tomcat
> instance was launched. (this was what I meant)

"Normal" for you is abnormal for others. Solaris is a very old
time-sharing system and the SIGHUP thing was designed to kill
processes when the remote user went-away. If you want them to not to
die, you have to explicitly use "nohup". I'm sorry that this is the
case on your system, but apparently, its required.

There's nothing the Tomcat team can do to change this.

> Actually, we start Tomcat just using ./startup.sh on Linux the same
> way as we started it on this SunOS and it never stops on Linux
> unless stopping it using shutdown.

Different environment. Different kernel. Different userspace.
Different shell. Different everything. Ever heard the term "GNU's Not
UNIX"? Well, guess what? Solaris /is/ UNIX, and GNU/Linux isn't that.
They may smell the same, but they are very different.

> As we know many people also start the Tomcat as this way on their
> Linux and Solaris machines without this issue.

Ev-e-ry siiistem's different, er-e-ry sistem's god. If
a system's wasted, in your neighborhood...

> Questions: 1. As Tomcat gives a message of "A valid shutdown
> command was received via the shutdown port." in the log when it
> receives the signal from a Shutdown command. What message can we
> see in the log when the Tomcat receives the SIGHUP and/or SIGTERM,
> etc. that stops the Tomcat?

Tomcat cannot receive the signal, only the JVM can. You'll see that
the connectors are shut down gracefully, etc. and the server stops.
So, basically, exactly what you have already observed.

> 2. When Tomcat receives the SIGHUP and/or SIGTERM, will Tomcat
> stop immediately or Tomcat would stop itself after a half day or
> several days randomly?

Tomcat will shut down as fast as it can. So, immediately.

> 3. If there are multiple users connected to the Solaris with the 
> consoles/terminals, would the Tomcat receives the SIGHUP and/or
> SIGTERM when any of user logs out and/or disconnected from the
> Solaris?

It should only be tied to the terminal that was used to launch it.
But, Solaris might have complicated rules for parent-process
inheritance when a process's parent dies. It may be re-inherited
several times before it's eventually killed.

> 4. Will the Solaris send the SIGHUP and/or SIGTERM to the Tomcat
> immediately just the user logged out and/or terminated from the
> Solaris? or Solaris would wait and then sent the SIGHUP and/or
> SIGTERM to the Tomcat after a half day or several days randomly?

It should happen immediately.

You should really be asking your administrator about this. We are not
Solaris experts.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTGi26AAoJEBzwKT+lPKRY8wEP/RDHlc0KHIAFeS3Za5kPODBv
BUOm75wt96sDDFok0qITPV7WDp3Mstb8mnz0Be6+0TONpx6CPqXj4LtfD7aR/Bas
BdTJWPuaXUeOE+BoejCl23+jADCwHccE1S3KJE5nno8TZ7yjDWxV6BN3krkyY6Bk
wV52ITPWM56Uecyzz2voXDgsypS6WUIAHPHOkAJNMsumDQnTaQZqTDJZ0f1s0YVD
9VXcQ6CqGquijw81PhcA4f64U9gb0+cBxupKayl2Sx6sGSlw9F/3QrM88iMBEuY3
xNm/g9bBKzxjMyDDAuhU67fP2HeUNDzpeWn6ZpNOTQ7kar+wyyqDcKaaOxPb1CQ7
ef7Zb/o0355syi2l7JT5V7FNp3HxXMkFxtQRVvXLEh4kKw0c4RMV+iz3Vf5pWvQL
9pffQHBu1p1lUZk5vvMqxyGN/d6GRahwMQMImuTK52GOW0VK5J9TkGthEbg4UIXE
uwL5Z+nCbMGYVT+Zheij6Uq4WyDpyyoy7WHF3JSzhw0I64TOXEnH1MTwmjQ6orgt
qyd9tShHnk/gTGOEBvvGZuikbPTMt2WAZW95UEIXMUaLupqAz+NLcAepvNYfpUpB
NSJNf4meCwdBydVeZ1WHXRxn5ADDgR3dPpP5IdZf1dBZ8lBQP4Wo+RC8/TKBGhsn
jE7p9Y1RounMVJk1TSdL
=ykQx
-END PGP SIGNATURE-

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



RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-07 Thread Jay
Update: 
It has been running ok more than 3 days after using "nohup ./startup.sh"

Correction: 
Instead of the misleading "Daemon", I actually meant that Tomcat starts by
./startup.sh with following parameters: 
###
/usr/bin/java
-Djava.util.logging.config.file=/home/tester/apache-tomcat-7.0.52/conf/loggi
ng.properties 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.endorsed.dirs=/home/tester/apache-tomcat-7.0.52/endorsed 
-classpath
/home/tester/apache-tomcat-7.0.52/bin/bootstrap.jar:/home/tester/apache-tomc
at-7.0.52/bin/tomcat-juli.jar 
-Dcatalina.base=/home/tester/apache-tomcat-7.0.52 
-Dcatalina.home=/home/tester/apache-tomcat-7.0.52 
-Djava.io.tmpdir=/home/tester/apache-tomcat-7.0.52/temp
org.apache.catalina.startup.Bootstrap start
###
Tomcat instance launches its background processes which seems to detached
from the console/terminal (Please correct if it is not right phrase.) 
As normally, those backend processes keep alive event the user logout or
disconnect from the console/terminal where the Tomcat instance was launched.
(this was what I meant)
Actually, we start Tomcat just using ./startup.sh on Linux the same way as
we started it on this SunOS and it never stops on Linux unless stopping it
using shutdown. 
As we know many people also start the Tomcat as this way on their Linux and
Solaris machines without this issue.

Questions:
1. As Tomcat gives a message of "A valid shutdown command was received via
the shutdown port." in the log when it receives the signal from a Shutdown
command. 
What message can we see in the log when the Tomcat receives the SIGHUP
and/or SIGTERM, etc. that stops the Tomcat?

2. When Tomcat receives the SIGHUP and/or SIGTERM, will Tomcat stop
immediately or Tomcat would stop itself after a half day or several days
randomly?

3. If there are multiple users connected to the Solaris with the
consoles/terminals, would the Tomcat receives the SIGHUP and/or SIGTERM when
any of user logs out and/or disconnected from the Solaris?

4. Will the Solaris send the SIGHUP and/or SIGTERM to the Tomcat immediately
just the user logged out and/or terminated from the Solaris? 
  or Solaris would wait and then sent the SIGHUP and/or SIGTERM to the
Tomcat after a half day or several days randomly?

Thanks,
Jay

-Original Message-
From: Jay [mailto:mx...@live.com] 
Sent: Thursday, March 06, 2014 2:22 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

Thanks André for your explanations!

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Thursday, March 06, 2014 12:34 PM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

Jay wrote:
> Case update:
> 
> Started Tomcat using "nohup ./startup.sh"
> ###
> ...
> Mar 04, 2014 10:23:34 AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-8080"] Mar 04, 2014 10:23:34 
> AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["ajp-bio-8009"] Mar 04, 2014 10:23:34 
> AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 10369 ms
> ###
> 
> It has been running 2 days and it is still alive now.
> As tested, it could stops itself from about half day to several days 
> randomly ... event it looks so far so good but we are still watching.
> 
> If nohup does work, can you please give us some clues regarding the 
> questions?
> As Tomcat launches daemons after starting,

No, it doesn't.

  what is actual difference
> between using nohup and not?
> Normally, Tomcat can be started without using nohup on Linux and Unix 
> including Solaris ... what would be the possible specific reason that 
> we have to use nohup in our env.?

There is apparently some fundamental misunderstanding there on your part.

Normally, on Unix/Linux systems, daemon programs are launched via system
startup scripts, which live in directories such as /etc/rc2.d (which
actually are links to files in a directory /etc/init.d or similar).
These startup scripts are run by an "init" program, which *does* run them so
as to "daemonise" the corresponding programs. (*)

But when you run Tomcat's "startup.sh" script from a console window, you are
not using this "init" program, and there is nothing which insures that the
corresponding program that you start (in this case, a java JVM) is
"daemonised".
So when you disconnect your console (or logout), the running program gets
killed (by a SIGHUP signal sent by the OS).
*Unless* you start the program under "nohup", which is specifically designed
to catch (and
igno

RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-06 Thread Jay
Thanks André for your explanations!

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Thursday, March 06, 2014 12:34 PM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

Jay wrote:
> Case update:
> 
> Started Tomcat using "nohup ./startup.sh"
> ###
> ...
> Mar 04, 2014 10:23:34 AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-8080"] Mar 04, 2014 10:23:34 
> AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["ajp-bio-8009"] Mar 04, 2014 10:23:34 
> AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 10369 ms
> ###
> 
> It has been running 2 days and it is still alive now.
> As tested, it could stops itself from about half day to several days 
> randomly ... event it looks so far so good but we are still watching.
> 
> If nohup does work, can you please give us some clues regarding the 
> questions?
> As Tomcat launches daemons after starting,

No, it doesn't.

  what is actual difference
> between using nohup and not?
> Normally, Tomcat can be started without using nohup on Linux and Unix 
> including Solaris ... what would be the possible specific reason that 
> we have to use nohup in our env.?

There is apparently some fundamental misunderstanding there on your part.

Normally, on Unix/Linux systems, daemon programs are launched via system
startup scripts, which live in directories such as /etc/rc2.d (which
actually are links to files in a directory /etc/init.d or similar).
These startup scripts are run by an "init" program, which *does* run them so
as to "daemonise" the corresponding programs. (*)

But when you run Tomcat's "startup.sh" script from a console window, you are
not using this "init" program, and there is nothing which insures that the
corresponding program that you start (in this case, a java JVM) is
"daemonised".
So when you disconnect your console (or logout), the running program gets
killed (by a SIGHUP signal sent by the OS).
*Unless* you start the program under "nohup", which is specifically designed
to catch (and
ignore) this SIGHUP signal, and leave the started program running even after
you disconnect its console.

The real solution, if you intend to have Tomcat running as a daemon, would
be to create an appropriate startup script in the appropriate directory.  If
you need to create it from scratch, either take one of the existing ones
(see Apache httpd for example) and modify it, or ask someone for such a
script appropriate for Tomcat under Solaris.

(*) Note: each Unix/Linux version varies a bit as to where these startup
scripts are located, and I don't remember for Solaris.  It may be
/sbin/init.d/rc.d or similar). Do a "man init" to find out.


> 
> If the Tomcat is use as embedded in other product, what would be the 
> affects if it has to be started with nohup?
> 
> Thanks,
> Jay
> 
> -----Original Message-
> From: Jay [mailto:mx...@live.com]
> Sent: Tuesday, March 04, 2014 10:22 AM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with 
> SunOS
> 5.10
> 
> Hi Konstantin,
> 
> For your questions:
> 
> 1. What is different with regards to similar question that you asked a 
> week ago?
> A: As you suggested, we upgraded to the latest Java version and the 
> latest Tmocat 7.x.
> 
> 2. Have you read the FAQ that I mentioned?
> http://wiki.apache.org/tomcat/FAQ/Linux_Unix#Q3
> A: yes. In our situation, after started the Tomcat runs from hours to 
> a day then stops randomly no matter if logout or terminating from the
terminal.
> 
> 3. Are you using nohup?
> A: Not yet. will try. 
> It seems the issue only on this Sun Sparc platform and Tomcat 7 seems 
> ok without using nohup on other Sun Sparc machines.
> 
> Do you have suggestion where we can capture the stop reason?
> 
> Thanks,
> Jay
> 
> -Original Message-
> From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
> Sent: Monday, March 03, 2014 5:29 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with 
> SunOS
> 5.10
> 
> 2014-03-03 21:29 GMT+04:00 Jay :
>> Hello,
>>
>> We newly installed Solaris 10 with all default settings on our Sun 
>> Sparc machine (sun4u sparc SUNW,UltraAX-i2 64-bit sparcv9 kernel
modules).
>> The OS Version: SunOS hostname 5.10 Generic_147147-26 sun4u sparc 
>> SUNW,UltraAX-i2.
>>
>> We downloaded and installed JDK packages as follows:
>> jdk-7u51-solaris-sparc.z
>> jdk-7u51-solaris-sparcv9.z
>>
&

Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-06 Thread André Warnier

Jay wrote:

Case update:

Started Tomcat using "nohup ./startup.sh"
###
...
Mar 04, 2014 10:23:34 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 04, 2014 10:23:34 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Mar 04, 2014 10:23:34 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10369 ms
###

It has been running 2 days and it is still alive now.
As tested, it could stops itself from about half day to several days
randomly ... event it looks so far so good but we are still watching.

If nohup does work, can you please give us some clues regarding the
questions?
As Tomcat launches daemons after starting, 


No, it doesn't.

 what is actual difference

between using nohup and not?
Normally, Tomcat can be started without using nohup on Linux and Unix
including Solaris ... what would be the possible specific reason that we
have to use nohup in our env.?


There is apparently some fundamental misunderstanding there on your part.

Normally, on Unix/Linux systems, daemon programs are launched via system startup scripts, 
which live in directories such as /etc/rc2.d (which actually are links to files in a 
directory /etc/init.d or similar).
These startup scripts are run by an "init" program, which *does* run them so as to 
"daemonise" the corresponding programs. (*)


But when you run Tomcat's "startup.sh" script from a console window, you are not using 
this "init" program, and there is nothing which insures that the corresponding program 
that you start (in this case, a java JVM) is "daemonised".
So when you disconnect your console (or logout), the running program gets killed (by a 
SIGHUP signal sent by the OS).
*Unless* you start the program under "nohup", which is specifically designed to catch (and 
ignore) this SIGHUP signal, and leave the started program running even after you 
disconnect its console.


The real solution, if you intend to have Tomcat running as a daemon, would be to create an 
appropriate startup script in the appropriate directory.  If you need to create it from 
scratch, either take one of the existing ones (see Apache httpd for example) and modify 
it, or ask someone for such a script appropriate for Tomcat under Solaris.


(*) Note: each Unix/Linux version varies a bit as to where these startup scripts are 
located, and I don't remember for Solaris.  It may be /sbin/init.d/rc.d or similar). Do a 
"man init" to find out.





If the Tomcat is use as embedded in other product, what would be the affects
if it has to be started with nohup?

Thanks,
Jay

-Original Message-----
From: Jay [mailto:mx...@live.com] 
Sent: Tuesday, March 04, 2014 10:22 AM

To: 'Tomcat Users List'
Subject: RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

Hi Konstantin,

For your questions:

1. What is different with regards to similar question that you asked a week
ago?
A: As you suggested, we upgraded to the latest Java version and the latest
Tmocat 7.x.

2. Have you read the FAQ that I mentioned?
http://wiki.apache.org/tomcat/FAQ/Linux_Unix#Q3
A: yes. In our situation, after started the Tomcat runs from hours to a day
then stops randomly no matter if logout or terminating from the terminal.

3. Are you using nohup?
A: Not yet. will try. 
It seems the issue only on this Sun Sparc platform and Tomcat 7 seems ok
without using nohup on other Sun Sparc machines. 


Do you have suggestion where we can capture the stop reason?

Thanks,
Jay

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: Monday, March 03, 2014 5:29 PM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

2014-03-03 21:29 GMT+04:00 Jay :

Hello,

We newly installed Solaris 10 with all default settings on our Sun 
Sparc machine (sun4u sparc SUNW,UltraAX-i2 64-bit sparcv9 kernel modules).
The OS Version: SunOS hostname 5.10 Generic_147147-26 sun4u sparc 
SUNW,UltraAX-i2.


We downloaded and installed JDK packages as follows:
jdk-7u51-solaris-sparc.z
jdk-7u51-solaris-sparcv9.z

The Java in the environment:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 
Client VM (build 24.51-b03, mixed mode, sharing)


We downloaded the  apache-tomcat-7.0.52.tar.gz and just unpacked it in 
/export/home/tester.
Then we started the Tomcat server just using ./startup.sh without 
change of any default settings.
The Tomcat is started ok listening at 8080 and we can see the Tomcat 
main page on Web Browser at the port 8080.
But after several hours it stops itself without obvious reason (not 
manually killed). and It seems it was not a Shutdown command as there 
is no message of "A valid shutdown command was receive

RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-06 Thread Jay
Case update:

Started Tomcat using "nohup ./startup.sh"
###
...
Mar 04, 2014 10:23:34 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 04, 2014 10:23:34 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Mar 04, 2014 10:23:34 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10369 ms
###

It has been running 2 days and it is still alive now.
As tested, it could stops itself from about half day to several days
randomly ... event it looks so far so good but we are still watching.

If nohup does work, can you please give us some clues regarding the
questions?
As Tomcat launches daemons after starting,  what is actual difference
between using nohup and not?
Normally, Tomcat can be started without using nohup on Linux and Unix
including Solaris ... what would be the possible specific reason that we
have to use nohup in our env.?

If the Tomcat is use as embedded in other product, what would be the affects
if it has to be started with nohup?

Thanks,
Jay

-Original Message-
From: Jay [mailto:mx...@live.com] 
Sent: Tuesday, March 04, 2014 10:22 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

Hi Konstantin,

For your questions:

1. What is different with regards to similar question that you asked a week
ago?
A: As you suggested, we upgraded to the latest Java version and the latest
Tmocat 7.x.

2. Have you read the FAQ that I mentioned?
http://wiki.apache.org/tomcat/FAQ/Linux_Unix#Q3
A: yes. In our situation, after started the Tomcat runs from hours to a day
then stops randomly no matter if logout or terminating from the terminal.

3. Are you using nohup?
A: Not yet. will try. 
It seems the issue only on this Sun Sparc platform and Tomcat 7 seems ok
without using nohup on other Sun Sparc machines. 

Do you have suggestion where we can capture the stop reason?

Thanks,
Jay

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: Monday, March 03, 2014 5:29 PM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

2014-03-03 21:29 GMT+04:00 Jay :
> Hello,
>
> We newly installed Solaris 10 with all default settings on our Sun 
> Sparc machine (sun4u sparc SUNW,UltraAX-i2 64-bit sparcv9 kernel modules).
> The OS Version: SunOS hostname 5.10 Generic_147147-26 sun4u sparc 
> SUNW,UltraAX-i2.
>
> We downloaded and installed JDK packages as follows:
> jdk-7u51-solaris-sparc.z
> jdk-7u51-solaris-sparcv9.z
>
> The Java in the environment:
> java version "1.7.0_51"
> Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 
> Client VM (build 24.51-b03, mixed mode, sharing)
>
> We downloaded the  apache-tomcat-7.0.52.tar.gz and just unpacked it in 
> /export/home/tester.
> Then we started the Tomcat server just using ./startup.sh without 
> change of any default settings.
> The Tomcat is started ok listening at 8080 and we can see the Tomcat 
> main page on Web Browser at the port 8080.
> But after several hours it stops itself without obvious reason (not 
> manually killed). and It seems it was not a Shutdown command as there 
> is no message of "A valid shutdown command was received via the 
> shutdown port." in the log.
>
> Is anyone aware about this issue?
> Is it a configuration issue or environment issue?
>
> Can you please provide any clues or check points?
>
> Thanks,
> Jay
>
> PS. Here are the outputs from the logs:
> #
> # cat catalina.out
> Feb 28, 2014 4:12:09 PM org.apache.catalina.core.AprLifecycleListener
> init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not found on the
> java.library.path: /usr/jdk/packages/lib/sparc:/lib:/usr/lib
> Feb 28, 2014 4:12:12 PM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-bio-8080"] Feb 28, 2014
> 4:12:12 PM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["ajp-bio-8009"] Feb 28, 2014
> 4:12:12 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 5782 ms Feb 28, 2014 4:12:12 PM 
> org.apache.catalina.core.StandardService
> startInternal
> INFO: Starting service Catalina
> Feb 28, 2014 4:12:12 PM org.apache.catalina.core.StandardEngine
> startInternal
> INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 Feb 28, 2014
> 4:12:12 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory 
> /export/home/tester/apache-tomcat-7.0.52/webapps

RE: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-04 Thread Jay
Hi Konstantin,

For your questions:

1. What is different with regards to similar question that you asked a week
ago?
A: As you suggested, we upgraded to the latest Java version and the latest
Tmocat 7.x.

2. Have you read the FAQ that I mentioned?
http://wiki.apache.org/tomcat/FAQ/Linux_Unix#Q3
A: yes. In our situation, after started the Tomcat runs from hours to a day
then stops randomly no matter if logout or terminating from the terminal.

3. Are you using nohup?
A: Not yet. will try. 
It seems the issue only on this Sun Sparc platform and Tomcat 7 seems ok
without using nohup on other Sun Sparc machines. 

Do you have suggestion where we can capture the stop reason?

Thanks,
Jay

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Monday, March 03, 2014 5:29 PM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS
5.10

2014-03-03 21:29 GMT+04:00 Jay :
> Hello,
>
> We newly installed Solaris 10 with all default settings on our Sun 
> Sparc machine (sun4u sparc SUNW,UltraAX-i2 64-bit sparcv9 kernel modules).
> The OS Version: SunOS hostname 5.10 Generic_147147-26 sun4u sparc 
> SUNW,UltraAX-i2.
>
> We downloaded and installed JDK packages as follows:
> jdk-7u51-solaris-sparc.z
> jdk-7u51-solaris-sparcv9.z
>
> The Java in the environment:
> java version "1.7.0_51"
> Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 
> Client VM (build 24.51-b03, mixed mode, sharing)
>
> We downloaded the  apache-tomcat-7.0.52.tar.gz and just unpacked it in 
> /export/home/tester.
> Then we started the Tomcat server just using ./startup.sh without 
> change of any default settings.
> The Tomcat is started ok listening at 8080 and we can see the Tomcat 
> main page on Web Browser at the port 8080.
> But after several hours it stops itself without obvious reason (not 
> manually killed). and It seems it was not a Shutdown command as there 
> is no message of "A valid shutdown command was received via the 
> shutdown port." in the log.
>
> Is anyone aware about this issue?
> Is it a configuration issue or environment issue?
>
> Can you please provide any clues or check points?
>
> Thanks,
> Jay
>
> PS. Here are the outputs from the logs:
> #
> # cat catalina.out
> Feb 28, 2014 4:12:09 PM org.apache.catalina.core.AprLifecycleListener 
> init
> INFO: The APR based Apache Tomcat Native library which allows optimal 
> performance in production environments was not found on the
> java.library.path: /usr/jdk/packages/lib/sparc:/lib:/usr/lib
> Feb 28, 2014 4:12:12 PM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-bio-8080"] Feb 28, 2014 
> 4:12:12 PM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["ajp-bio-8009"] Feb 28, 2014 
> 4:12:12 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 5782 ms Feb 28, 2014 4:12:12 PM 
> org.apache.catalina.core.StandardService
> startInternal
> INFO: Starting service Catalina
> Feb 28, 2014 4:12:12 PM org.apache.catalina.core.StandardEngine
> startInternal
> INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 Feb 28, 2014 
> 4:12:12 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory 
> /export/home/tester/apache-tomcat-7.0.52/webapps/manager
> Feb 28, 2014 4:12:16 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory 
> /export/home/tester/apache-tomcat-7.0.52/webapps/docs
> Feb 28, 2014 4:12:17 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory 
> /export/home/tester/apache-tomcat-7.0.52/webapps/examples
> Feb 28, 2014 4:12:21 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory 
> /export/home/tester/apache-tomcat-7.0.52/webapps/ROOT
> Feb 28, 2014 4:12:21 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory 
> /export/home/tester/apache-tomcat-7.0.52/webapps/host-manager
> Feb 28, 2014 4:12:22 PM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-8080"] Feb 28, 2014 4:12:22 
> PM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["ajp-bio-8009"] Feb 28, 2014 4:12:22 
> PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 10031 ms
> Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["http-bio-8080"] Mar 01, 2014 2:00:50 
> AM org.apache.coyote.Abst

Re: Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-03 Thread Konstantin Kolinko
2014-03-03 21:29 GMT+04:00 Jay :
> Hello,
>
> We newly installed Solaris 10 with all default settings on our Sun Sparc
> machine (sun4u sparc SUNW,UltraAX-i2 64-bit sparcv9 kernel modules).
> The OS Version: SunOS hostname 5.10 Generic_147147-26 sun4u sparc
> SUNW,UltraAX-i2.
>
> We downloaded and installed JDK packages as follows:
> jdk-7u51-solaris-sparc.z
> jdk-7u51-solaris-sparcv9.z
>
> The Java in the environment:
> java version "1.7.0_51"
> Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) Client
> VM (build 24.51-b03, mixed mode, sharing)
>
> We downloaded the  apache-tomcat-7.0.52.tar.gz and just unpacked it in
> /export/home/tester.
> Then we started the Tomcat server just using ./startup.sh without change of
> any default settings.
> The Tomcat is started ok listening at 8080 and we can see the Tomcat main
> page on Web Browser at the port 8080.
> But after several hours it stops itself without obvious reason (not manually
> killed). and
> It seems it was not a Shutdown command as there is no message of "A valid
> shutdown command was received via the shutdown port." in the log.
>
> Is anyone aware about this issue?
> Is it a configuration issue or environment issue?
>
> Can you please provide any clues or check points?
>
> Thanks,
> Jay
>
> PS. Here are the outputs from the logs:
> #
> # cat catalina.out
> Feb 28, 2014 4:12:09 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal
> performance in production environments was not found on the
> java.library.path: /usr/jdk/packages/lib/sparc:/lib:/usr/lib
> Feb 28, 2014 4:12:12 PM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-bio-8080"]
> Feb 28, 2014 4:12:12 PM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
> Feb 28, 2014 4:12:12 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 5782 ms
> Feb 28, 2014 4:12:12 PM org.apache.catalina.core.StandardService
> startInternal
> INFO: Starting service Catalina
> Feb 28, 2014 4:12:12 PM org.apache.catalina.core.StandardEngine
> startInternal
> INFO: Starting Servlet Engine: Apache Tomcat/7.0.52
> Feb 28, 2014 4:12:12 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /export/home/tester/apache-tomcat-7.0.52/webapps/manager
> Feb 28, 2014 4:12:16 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /export/home/tester/apache-tomcat-7.0.52/webapps/docs
> Feb 28, 2014 4:12:17 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /export/home/tester/apache-tomcat-7.0.52/webapps/examples
> Feb 28, 2014 4:12:21 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /export/home/tester/apache-tomcat-7.0.52/webapps/ROOT
> Feb 28, 2014 4:12:21 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /export/home/tester/apache-tomcat-7.0.52/webapps/host-manager
> Feb 28, 2014 4:12:22 PM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-8080"]
> Feb 28, 2014 4:12:22 PM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["ajp-bio-8009"]
> Feb 28, 2014 4:12:22 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 10031 ms
> Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["http-bio-8080"]
> Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
> Mar 01, 2014 2:00:50 AM org.apache.catalina.core.StandardService
> stopInternal
> INFO: Stopping service Catalina
> Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol stop
> INFO: Stopping ProtocolHandler ["http-bio-8080"]
> Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol stop
> INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
> Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["http-bio-8080"]
> Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
>
> #
> # cat localhost.2014-02-28.log
> Feb 28, 2014 4:12:21 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Feb 28, 2014 4:12:21 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Feb 28, 2014 4:12:21 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener:
> attributeAdded('org.apache.jasper.compiler.TldLocationsCache',
> 'org.apache.jasper.compiler.TldLocationsCache@19a2df9')
>
> ###

Tomcat 7.0.52 stops after hours on our Sun Sparc with SunOS 5.10

2014-03-03 Thread Jay
Hello,

We newly installed Solaris 10 with all default settings on our Sun Sparc
machine (sun4u sparc SUNW,UltraAX-i2 64-bit sparcv9 kernel modules).
The OS Version: SunOS hostname 5.10 Generic_147147-26 sun4u sparc
SUNW,UltraAX-i2.

We downloaded and installed JDK packages as follows:
jdk-7u51-solaris-sparc.z
jdk-7u51-solaris-sparcv9.z

The Java in the environment:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) Client
VM (build 24.51-b03, mixed mode, sharing)

We downloaded the  apache-tomcat-7.0.52.tar.gz and just unpacked it in
/export/home/tester.
Then we started the Tomcat server just using ./startup.sh without change of
any default settings.
The Tomcat is started ok listening at 8080 and we can see the Tomcat main
page on Web Browser at the port 8080. 
But after several hours it stops itself without obvious reason (not manually
killed). and 
It seems it was not a Shutdown command as there is no message of "A valid
shutdown command was received via the shutdown port." in the log.

Is anyone aware about this issue?
Is it a configuration issue or environment issue? 

Can you please provide any clues or check points?

Thanks,
Jay 

PS. Here are the outputs from the logs:
#
# cat catalina.out
Feb 28, 2014 4:12:09 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/jdk/packages/lib/sparc:/lib:/usr/lib
Feb 28, 2014 4:12:12 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Feb 28, 2014 4:12:12 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Feb 28, 2014 4:12:12 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5782 ms
Feb 28, 2014 4:12:12 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Feb 28, 2014 4:12:12 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52
Feb 28, 2014 4:12:12 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/export/home/tester/apache-tomcat-7.0.52/webapps/manager
Feb 28, 2014 4:12:16 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/export/home/tester/apache-tomcat-7.0.52/webapps/docs
Feb 28, 2014 4:12:17 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/export/home/tester/apache-tomcat-7.0.52/webapps/examples
Feb 28, 2014 4:12:21 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/export/home/tester/apache-tomcat-7.0.52/webapps/ROOT
Feb 28, 2014 4:12:21 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/export/home/tester/apache-tomcat-7.0.52/webapps/host-manager
Feb 28, 2014 4:12:22 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Feb 28, 2014 4:12:22 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Feb 28, 2014 4:12:22 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10031 ms
Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Mar 01, 2014 2:00:50 AM org.apache.catalina.core.StandardService
stopInternal
INFO: Stopping service Catalina
Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Mar 01, 2014 2:00:50 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

#
# cat localhost.2014-02-28.log
Feb 28, 2014 4:12:21 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 28, 2014 4:12:21 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Feb 28, 2014 4:12:21 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener:
attributeAdded('org.apache.jasper.compiler.TldLocationsCache',
'org.apache.jasper.compiler.TldLocationsCache@19a2df9')

#
# cat localhost.2014-03-01.log
Mar 01, 2014 2:00:50 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Mar 01, 2014 2:00:50 AM org.apache.catalina.core.ApplicationContext log