Re: [OT] Tomcat 7: manager application takes forever to deploy - or not

2011-03-19 Thread Francis GALIEGUE
On Fri, Mar 18, 2011 at 22:45, Christopher Schultz
ch...@christopherschultz.net wrote:
[...]

 I'm interested to see how you are able to launch Tomcat and have your
 script continue only after all webapps have been deployed.


This is the code right now:


if [ $1 = start ]; then
STARTDATE=$(date +%Y%m%d-%H%M)
STAMP START $STARTDATE ===

cat $LOGFILE EOF

$STAMP

EOF

echo -n Starting Tomcat

${JAVACMD} $JAVA_STARTUP_OPTS $JAVA_OPTS \
-classpath $CLASSPATH $TOMCAT_OPTS \
$MAIN_CLASS start  $LOGFILE 21 

echo $!  $CATALINA_PID

MAXITERS=120
ITERS=0

while true; do
ITERS=$((ITERS+1))
if [ $ITERS -gt $MAXITERS ]; then
echo
echo 2 BUG: Tomcat not started after
$MAXITERS seconds!
exit 1
fi

perl -ne print if /^$STAMP$/ .. eof() $LOGFILE | \
egrep -q ^INFO: Server startup in [0-9]+ ms$

RC=$?

if [ $RC = 0 ]; then
break
fi
echo -n .
sleep 1
done

echo  Done (in $ITERS seconds)
[...]


It is with this script that I noticed the long deploying time of
/manager. This is the only way I knew of until yesterday, when I
noticed that the shutdown port only gets open after webapps are
deployed. I'll switch to this technique (using netstat -ltn|grep -w
$SHUTDOWN_PORT or something like that) since it is more reliable (and
faster) than scanning the log file: the server startup message may
change behind me... Ideally, of course, it'd be very nice if the
BootStrap class had, said, a fullstart command: I wouldn't need any
of these ;)

Ultimately, what I really want to do anyway is a startup sequence
which starts Tomcat up only with the manager app, and which deploys
webapps the list of which I store in another place. The deploy command
only returns after the app is fully deployed, which is good (and so
does the undeploy command).

[...]

 Third, what if you want to do SNMP monitoring
 (-Dcom.sun.management.snmp.port=xxx etc etc)? You can't with the
 bundled scripts. Why? If you set JAVA_OPTS appropriately, these
 JAVA_OPTS will also be used for shutdown... Which means you can't
 shutdown at all: EADDRINUSE. Unless you arrange for different
 JAVA_OPTS on startup and shutdown, which I don't need to do with my
 scripts.

 As Chuck suggests, you haven't read the documentation well enough
 because catalina.sh has options to cover your situation described above.


Indeed.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



RE: [OT] Tomcat 7: manager application takes forever to deploy - or not

2011-03-19 Thread Martin Gainty

MG des réponses sont mises en tête par le MG
__ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Sat, 19 Mar 2011 10:49:34 +0100
 Subject: Re: [OT] Tomcat 7: manager application takes forever to deploy - or 
 not
 From: f...@one2team.com
 To: users@tomcat.apache.org
 
 On Fri, Mar 18, 2011 at 22:45, Christopher Schultz
 ch...@christopherschultz.net wrote:
 [...]
 
  I'm interested to see how you are able to launch Tomcat and have your
  script continue only after all webapps have been deployed.
 
 
 This is the code right now:
 
 
 if [ $1 = start ]; then
 STARTDATE=$(date +%Y%m%d-%H%M)
 STAMP START $STARTDATE ===
 
 cat $LOGFILE EOF
 
 $STAMP
 
 EOF
 
 echo -n Starting Tomcat
 
 ${JAVACMD} $JAVA_STARTUP_OPTS $JAVA_OPTS \
 -classpath $CLASSPATH $TOMCAT_OPTS \
 $MAIN_CLASS start  $LOGFILE 21 
 
 echo $!  $CATALINA_PID
 
 MAXITERS=120
 ITERS=0
 
 while true; do
 ITERS=$((ITERS+1))
 if [ $ITERS -gt $MAXITERS ]; then
 echo
 echo 2 BUG: Tomcat not started after
 $MAXITERS seconds!
 exit 1
 fi
 
 perl -ne print if /^$STAMP$/ .. eof() $LOGFILE | \
 egrep -q ^INFO: Server startup in [0-9]+ ms$
 
 RC=$?
 
 if [ $RC = 0 ]; then
 break
 fi
 echo -n .
 sleep 1
 done
 
 echo  Done (in $ITERS seconds)
 [...]
 
 
 It is with this script that I noticed the long deploying time of
 /manager. This is the only way I knew of until yesterday, when I
 noticed that the shutdown port only gets open after webapps are
 deployed. I'll switch to this technique (using netstat -ltn|grep -w
 $SHUTDOWN_PORT or something like that) since it is more reliable (and
 faster) than scanning the log file: the server startup message may
 change behind me... Ideally, of course, it'd be very nice if the
 BootStrap class had, said, a fullstart command: I wouldn't need any
 of these ;)
 
 Ultimately, what I really want to do anyway is a startup sequence
 which starts Tomcat up only with the manager app, 

MGA default Tomcat installation includes the manager. To add an instance of the
MGManager web application Context to a new host install the
MGmanager.xml context configuration file in the
MG$CATALINA_BASE/conf/[enginename]/[hostname] folder. Here is an example:
MG
Context path=/manager debug=0 privileged=true
 docBase=/usr/local/kinetic/tomcat6/server/webapps/manager
/Context
MG
and which deploys
 webapps the list of which I store in another place. The deploy command
 only returns after the app is fully deployed, which is good (and so
 does the undeploy command).

MGhttp://mojo.codehaus.org/tomcat-maven-plugin/deployment.html
MGtomcat-maven-plugin supports the following configuration attributes
MGconfigurable war file folder called  warSourceDirectory
MGconfigurable location for context.xml called contextFile
MG running embedded tomcat from maven with command 
MGmvn tomcat:run

  Third, what if you want to do SNMP monitoring
  (-Dcom.sun.management.snmp.port=xxx etc etc)? You can't with the
  bundled scripts. Why? If you set JAVA_OPTS appropriately, these
  JAVA_OPTS will also be used for shutdown... Which means you can't
  shutdown at all: EADDRINUSE. Unless you arrange for different
  JAVA_OPTS on startup and shutdown, which I don't need to do with my
  scripts.
 
  As Chuck suggests, you haven't read the documentation well enough
  because catalina.sh has options to cover your situation described above.
 
 
 Indeed.
 
 -- 
 Francis Galiegue
 ONE2TEAM
 Ingénieur système
 Mob : +33 (0) 683 877 875
 Tel : +33 (0) 178 945 552
 f...@one2team.com
 40 avenue Raymond Poincaré
 75116 Paris
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

Re: Solr on new Tomcat 7.0.11

2011-03-19 Thread Michael Ludwig
Lewis John McGibbney schrieb am 16.03.2011 um 17:19 (+):

 org.xml.sax.SAXParseException: The processing instruction target
 matching [xX][mM][lL] is not allowed.

Take a look at this doc:

?xml version=1.0?
Urmel
?abc bla=99 blub=77?
/Urmel
?def blubbel=irgendwas?

The first line is the XML declaration.

The third and fifth lines are processing instructions (PIs).

The XML declaration looks just like a PI. But the identifer xml (in
all cases) is reserved for the XML declaration.

So the error message means you have a PI using a reserved identifier
in your document.

 My configuration descriptor is as follows
 ?xml version=1.0 encoding=utf-8?
 Context docBase=/home/lewis/Downloads/wombra/wombra.war
 crossContext=true
   Environment name=solr/home type=java.lang.String
 value=/home/lewis/Downloads/wombra override=true/
 /Context

Either this isn't your document, or something mangles it on the way to
the parser, or - least likely - your parser has a bug.

-- 
Michael Ludwig

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



Installing Tomcat the Brute Force Way?

2011-03-19 Thread ken dias


 
I had installed Tomcat 6 with no problem. Then started having problems, so 
uninstalled it and reinstalled but the icon does not appear on the taskbar and 
hence server does not work and localhost also. Not sure how to proceed.
Thanks

Re: Installing Tomcat the Brute Force Way?

2011-03-19 Thread André Warnier

ken dias wrote:


 
I had installed Tomcat 6 with no problem. Then started having problems, so uninstalled it and reinstalled but the icon does not appear on the taskbar and hence server does not work and localhost also. Not sure how to proceed.


Neither are we, unless you provide some precise information for a change, so that we do 
not have to guess.



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



Re: Installing Tomcat the Brute Force Way?

2011-03-19 Thread Pid
On 19/03/2011 17:57, André Warnier wrote:
 ken dias wrote:

  
 I had installed Tomcat 6 with no problem. Then started having
 problems, so uninstalled it and reinstalled but the icon does not
 appear on the taskbar and hence server does not work and localhost
 also. Not sure how to proceed.
 
 Neither are we, unless you provide some precise information for a
 change, so that we do not have to guess.

Preferably starting a new thread, rather than editing an existing one,
however similar the title.


p



signature.asc
Description: OpenPGP digital signature


Hook into Tomcat before web applications load

2011-03-19 Thread Pulkit Singhal
Hello,

Is there a hook exposed in tomcat such that a custom class can be
introduced to do some work at a point where we have a list of the
docBase attribute for all the web applications that will be hosted by
this tomcat instance ... while one of the web application specific
handling has begun yet?

I 'm asking this for any tomcat version, starting with 5.x, 6.x or 7.x
... I don't care.

The motivation behind this question is a bit wordy so I don't want to
take everyone off topic by posting it here ... but if you are
interested in reading you can refer to this link:
http://pulkitsinghal.blogspot.com/2011/03/idea-day-scan-for-shared-webapp.html

Thanks!

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



Issue with tomcat 6 connector

2011-03-19 Thread Krish

 Hi,

 I am using tomcat 6.0.20. In the frontend i have sun one webserver 7 using
 nsapi_redirect-1.2.31 connector.


   My OS is windows server 2003 32bit.


 I am trying to create a connector using the document below.

 http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

 my tomcat is ssl enabled and my sun one webserver 7 is http.

 here is the configuration in obj.conf. I can get the tomcat base html
 pages. But jsp is not working.

 Appreciate your help in this.


 #

 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.

 #

 # You can edit this file, but comments and formatting changes

 # might be lost when you use the administration GUI or CLI.

 Object name=default

 AuthTrans fn=match-browser browser=*MSIE* ssl-unclean-shutdown=true

 NameTrans fn=ntrans-j2ee name=j2ee

 NameTrans fn=pfx2dir from=/mc-icons dir=C:/Program
 Files/Oracle/WebServer7/lib/icons name=es-internal

 NameTrans fn=assign-name from=/* name=jknsapi

 NameTrans fn=assign-name from=/*.jsp/ name=jknsapi

 NameTrans fn=assign-name from=/servlet/* name=jknsapi

 NameTrans fn=assign-name from=/twpoc/* name=jknsapi

 PathCheck fn=uri-clean

 PathCheck fn=check-acl acl=default

 PathCheck fn=find-pathinfo

 PathCheck fn=find-index-j2ee

 PathCheck fn=find-index index-names=index.html,index.jsp,home.html

 PathCheck fn=validate_session_policy

 ObjectType fn=type-j2ee

 ObjectType fn=type-by-extension

 ObjectType fn=force-type type=text/plain

 Service method=(GET|HEAD) type=magnus-internal/directory
 fn=index-common

 Service method=(GET|HEAD|POST) type=*~magnus-internal/* fn=send-file

 Service method=TRACE fn=service-trace

 Error fn=error-j2ee

 AddLog fn=flex-log

 /Object

 Object name=j2ee

 Service fn=service-j2ee method=*

 /Object

 Object name=es-internal

 PathCheck fn=check-acl acl=es-internal

 /Object

 Object name=cgi

 ObjectType fn=force-type type=magnus-internal/cgi

 Service fn=send-cgi

 /Object

 Object name=jknsapi

 ObjectType fn=force-type type=text/plain

 Service fn=jk_service method=* worker=worker1

 /Object

 Object name=send-precompressed

 PathCheck fn=find-compressed

 /Object

 Object name=compress-on-demand

 Output fn=insert-filter filter=http-compression

 /Object

  Object ppath=*/dummypost/sunpostpreserve*

 Service type=text/* method=(GET|POST) fn=append_post_data

 /Object

 Object ppath=*/UpdateAgentCacheServlet*

 Service type=text/* method=(POST) fn=process_notification

 /Object

 Thanks



RE: Installing Tomcat the Brute Force Way?

2011-03-19 Thread Robinson, Eric
  From looking at the server, it would appear that tomcat was 
 installed 
  using tomcat-6.0.18-0.noarch.rpm.
 
 Now you're in trouble.  The 3rd-party repackaged versions of 
 Tomcat typically scatter files all over, and then try to get 
 things back together with symlinks.  You're better off doing 
 a proper install on the new server.  Had you used a real 
 Tomcat, life would be much easier.
 
  - Chuck
 

Not necessarily. I did an rpm -qlp on tomcat-6.0.18-0.noarch.rpm. All
the files it installs are in /opt/tomcat

--Eric























Disclaimer - March 19, 2011 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of Physicians' Managed Care or Physician Select Management. Warning: 
Although Physicians' Managed Care or Physician Select Management has taken 
reasonable precautions to ensure no viruses are present in this email, the 
company cannot accept responsibility for any loss or damage arising from the 
use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

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



How to detect down of tomcat.

2011-03-19 Thread Hide

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a log 
file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service is good.

The motive that wants to know such a thing is because I want to detect down of 
tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of tomcat 
automatically.

Thanks for your advice.


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



Re: How to detect down of tomcat.

2011-03-19 Thread Darryl Lewis
Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
  then
  subject=`tomcat down; date`
  address=m...@domain.com
  ps -efatt.txt
  mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an attachment

For myself, I have scripts that detects when the service is down, sends me an 
email, then tries to restart it, then will email if it has managed to recover 
it. If it can't restart it after 5 minutes, then I get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty rest 
only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a log 
file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service is good.

The motive that wants to know such a thing is because I want to detect down of 
tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of tomcat 
automatically.

Thanks for your advice.


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




Re: How to detect down of tomcat.

2011-03-19 Thread Hide

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message - 
From: Darryl Lewis darryl.le...@unsw.edu.au

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
 then
 subject=`tomcat down; date`
 address=m...@domain.com
 ps -efatt.txt
 mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an attachment

For myself, I have scripts that detects when the service is down, sends me an email, then tries to restart it, then will email 
if it has managed to recover it. If it can't restart it after 5 minutes, then I get an SMS.

In the morning, I can quickly see if it failed overnight, and my beauty rest 
only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a log 
file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service is good.

The motive that wants to know such a thing is because I want to detect down of 
tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of tomcat 
automatically.

Thanks for your advice.


-
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: How to detect down of tomcat.

2011-03-19 Thread Darryl Lewis
Opps...typo

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
  then
  NOW=`date`
  subject=tomcat down $NOW
  address=m...@domain.com
  ps -efatt.txt
  mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


On 20/03/11 2:00 PM, Darryl darryl.le...@unsw.edu.au wrote:

Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
  then
  subject=`tomcat down; date`
  address=m...@domain.com
  ps -efatt.txt
  mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an attachment

For myself, I have scripts that detects when the service is down, sends me an 
email, then tries to restart it, then will email if it has managed to recover 
it. If it can't restart it after 5 minutes, then I get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty rest 
only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a log 
file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service is good.

The motive that wants to know such a thing is because I want to detect down of 
tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of tomcat 
automatically.

Thanks for your advice.


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





Re: How to detect down of tomcat.

2011-03-19 Thread Darryl Lewis
You could write something similar using windows powershell. Do you have that 
installed on your server?


On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message -
From: Darryl Lewis darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
  then
  subject=`tomcat down; date`
  address=m...@domain.com
  ps -efatt.txt
  mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an attachment

For myself, I have scripts that detects when the service is down, sends me an 
email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes, then I 
get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty rest 
only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a log 
file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service is good.

The motive that wants to know such a thing is because I want to detect down of 
tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of tomcat 
automatically.

Thanks for your advice.


-
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: How to detect down of tomcat.

2011-03-19 Thread Martin Gainty

with windoze under cygwin you may want to sub ps -ef with netstat assuming TC 
port is 8080  
 if [ `netstat -ab|grep 8080|grep -v grep|wc -l` -lt 1 ]

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 From: darryl.le...@unsw.edu.au
 To: users@tomcat.apache.org
 Date: Sun, 20 Mar 2011 14:00:49 +1100
 Subject: Re: How to detect down of tomcat.
 
 Put this in a cronjob to fire every minute
 
 #!/bin/sh
 if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
   then
   subject=`tomcat down; date`
   address=m...@domain.com
   ps -efatt.txt
   mail -s $subject $addr -- -fno-reply@yourdomain att.txt
 fi
 
 
 Fill in the address with your email address, and you can also pipe an 
 attachment
 
 For myself, I have scripts that detects when the service is down, sends me an 
 email, then tries to restart it, then will email if it has managed to recover 
 it. If it can't restart it after 5 minutes, then I get an SMS.
 In the morning, I can quickly see if it failed overnight, and my beauty rest 
 only gets disturbed in the really bad cases.
 
 On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:
 
 How to detect down of tomcat.
 
 Helo.
 
 My environment is tomcat7, java1.6, windows.
 
 When process of tomcat terminated abnormally,
 is there any method or setting that output the abnormal termination to a log 
 file?
 
 If there is it, please let me know.
 
 tomcat is the premise that is not service of windows, but even service is 
 good.
 
 The motive that wants to know such a thing is because I want to detect down 
 of tomcat in  automatically without human operation.
 I set a file and keyword in a log monitor tool, and it  detects down of 
 tomcat automatically.
 
 Thanks for your advice.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
  

RE: Issue with tomcat 6 connector

2011-03-19 Thread Martin Gainty

you're routing jsp to jk-service 
what is jk-service

Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Sat, 19 Mar 2011 17:31:35 -0700
 Subject: Issue with tomcat 6 connector
 From: kris...@gmail.com
 To: users@tomcat.apache.org
 
 
  Hi,
 
  I am using tomcat 6.0.20. In the frontend i have sun one webserver 7 using
  nsapi_redirect-1.2.31 connector.
 
 
My OS is windows server 2003 32bit.
 
 
  I am trying to create a connector using the document below.
 
  http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html
 
  my tomcat is ssl enabled and my sun one webserver 7 is http.
 
  here is the configuration in obj.conf. I can get the tomcat base html
  pages. But jsp is not working.
 
  Appreciate your help in this.
 
 
  #
 
  # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 
  #
 
  # You can edit this file, but comments and formatting changes
 
  # might be lost when you use the administration GUI or CLI.
 
  Object name=default
 
  AuthTrans fn=match-browser browser=*MSIE* ssl-unclean-shutdown=true
 
  NameTrans fn=ntrans-j2ee name=j2ee
 
  NameTrans fn=pfx2dir from=/mc-icons dir=C:/Program
  Files/Oracle/WebServer7/lib/icons name=es-internal
 
  NameTrans fn=assign-name from=/* name=jknsapi
 
  NameTrans fn=assign-name from=/*.jsp/ name=jknsapi
 
  NameTrans fn=assign-name from=/servlet/* name=jknsapi
 
  NameTrans fn=assign-name from=/twpoc/* name=jknsapi
 
  PathCheck fn=uri-clean
 
  PathCheck fn=check-acl acl=default
 
  PathCheck fn=find-pathinfo
 
  PathCheck fn=find-index-j2ee
 
  PathCheck fn=find-index index-names=index.html,index.jsp,home.html
 
  PathCheck fn=validate_session_policy
 
  ObjectType fn=type-j2ee
 
  ObjectType fn=type-by-extension
 
  ObjectType fn=force-type type=text/plain
 
  Service method=(GET|HEAD) type=magnus-internal/directory
  fn=index-common
 
  Service method=(GET|HEAD|POST) type=*~magnus-internal/* fn=send-file
 
  Service method=TRACE fn=service-trace
 
  Error fn=error-j2ee
 
  AddLog fn=flex-log
 
  /Object
 
  Object name=j2ee
 
  Service fn=service-j2ee method=*
 
  /Object
 
  Object name=es-internal
 
  PathCheck fn=check-acl acl=es-internal
 
  /Object
 
  Object name=cgi
 
  ObjectType fn=force-type type=magnus-internal/cgi
 
  Service fn=send-cgi
 
  /Object
 
  Object name=jknsapi
 
  ObjectType fn=force-type type=text/plain
 
  Service fn=jk_service method=* worker=worker1
 
  /Object
 
  Object name=send-precompressed
 
  PathCheck fn=find-compressed
 
  /Object
 
  Object name=compress-on-demand
 
  Output fn=insert-filter filter=http-compression
 
  /Object
 
   Object ppath=*/dummypost/sunpostpreserve*
 
  Service type=text/* method=(GET|POST) fn=append_post_data
 
  /Object
 
  Object ppath=*/UpdateAgentCacheServlet*
 
  Service type=text/* method=(POST) fn=process_notification
 
  /Object
 
  Thanks
 
  

Re: How to detect down of tomcat.

2011-03-19 Thread Hide

Hi, Darryl.

Thanks for your advice.

My explanation seems to have been bad.
I explain it a little more.

It is a method to output the information of the abnormal termination in 
catalina.log that I want to know.
Would you teach it if you know some method?

Thank you.

- Original Message - 
From: Darryl Lewis darryl.le...@unsw.edu.au

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:17 PM
Subject: Re: How to detect down of tomcat.


You could write something similar using windows powershell. Do you have that 
installed on your server?


On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message -
From: Darryl Lewis darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
 then
 subject=`tomcat down; date`
 address=m...@domain.com
 ps -efatt.txt
 mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an attachment

For myself, I have scripts that detects when the service is down, sends me an 
email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes, then I 
get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty rest 
only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a log 
file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service is good.

The motive that wants to know such a thing is because I want to detect down of 
tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of tomcat 
automatically.

Thanks for your advice.


-
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




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



Re: Issue with tomcat 6 connector

2011-03-19 Thread Krish
HI Martin,

Thanks for the email.

I hope you require my magus conf. Here you go.

#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
Init fn=load-modules shlib=j2eeplugin.dll
Init fn=load-modules
shlib=D:/Agent/144703-01/web_agents/sjsws_agent/lib/ames6.dll
funcs=web_agent_init,validate_session_policy,append_post_data,process_notification
Init fn=web_agent_init
dsameconfdir=D:/Agent/144703-01/web_agents/sjsws_agent/Agent_002/config
LateInit=yes
Init fn=pool-init disable=false
Init fn=load-modules funcs=jk_init,jk_service shlib=C:/Program
Files/Oracle/WebServer7/https-dca-app-170/config/nsapi_redirect.dll
shlib_flags=(global|now)
Init fn=jk_init worker_file=C:/Program
Files/Oracle/WebServer7/https-dca-app-170/config/workers.properties
log_level=debug log_file=C:/Program
Files/Oracle/WebServer7/https-dca-app-170/logs/nsapi.log
shm_file=C:/Program
Files/Oracle/WebServer7/https-dca-app-170/config/logs/jk_shm

Krish
On Sat, Mar 19, 2011 at 9:03 PM, Martin Gainty mgai...@hotmail.com wrote:


 you're routing jsp to jk-service
 what is jk-service

 Martin Gainty
 __
 Jogi és Bizalmassági kinyilatkoztatás/Verzicht und
 Vertraulichkeitanmerkung/Note de déni et de confidentialité
  Ez az
 üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
 jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
 készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
 semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
 könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
 ezen üzenet tartalma miatt.

 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
 dient lediglich dem Austausch von Informationen und entfaltet keine
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
 destinataire prévu, nous te demandons avec bonté que pour satisfaire
 informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
 de ceci est interdite. Ce message sert à l'information seulement et n'aura
 pas n'importe quel effet légalement obligatoire. Étant donné que les email
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
 aucune responsabilité pour le contenu fourni.




  Date: Sat, 19 Mar 2011 17:31:35 -0700
  Subject: Issue with tomcat 6 connector
  From: kris...@gmail.com
  To: users@tomcat.apache.org
 
  
Hi,
  
   I am using tomcat 6.0.20. In the frontend i have sun one webserver 7
 using
   nsapi_redirect-1.2.31 connector.
  
 
 My OS is windows server 2003 32bit.
 
  
   I am trying to create a connector using the document below.
  
   http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html
  
   my tomcat is ssl enabled and my sun one webserver 7 is http.
  
   here is the configuration in obj.conf. I can get the tomcat base html
   pages. But jsp is not working.
  
   Appreciate your help in this.
  
  
   #
  
   # Copyright (c) 2010, Oracle and/or its affiliates. All rights
 reserved.
  
   #
  
   # You can edit this file, but comments and formatting changes
  
   # might be lost when you use the administration GUI or CLI.
  
   Object name=default
  
   AuthTrans fn=match-browser browser=*MSIE*
 ssl-unclean-shutdown=true
  
   NameTrans fn=ntrans-j2ee name=j2ee
  
   NameTrans fn=pfx2dir from=/mc-icons dir=C:/Program
   Files/Oracle/WebServer7/lib/icons name=es-internal
  
   NameTrans fn=assign-name from=/* name=jknsapi
  
   NameTrans fn=assign-name from=/*.jsp/ name=jknsapi
  
   NameTrans fn=assign-name from=/servlet/* name=jknsapi
  
   NameTrans fn=assign-name from=/twpoc/* name=jknsapi
  
   PathCheck fn=uri-clean
  
   PathCheck fn=check-acl acl=default
  
   PathCheck fn=find-pathinfo
  
   PathCheck fn=find-index-j2ee
  
   PathCheck fn=find-index index-names=index.html,index.jsp,home.html
  
   PathCheck fn=validate_session_policy
  
   ObjectType fn=type-j2ee
  
   ObjectType fn=type-by-extension
  
   ObjectType fn=force-type type=text/plain
  
   Service method=(GET|HEAD) type=magnus-internal/directory
   fn=index-common
  
   Service method=(GET|HEAD|POST) type=*~magnus-internal/*
 fn=send-file
  
   Service method=TRACE fn=service-trace
  
   Error fn=error-j2ee
  
   AddLog fn=flex-log
  
   /Object
  
   Object name=j2ee
  
   Service fn=service-j2ee method=*
  
   /Object
  
   Object name=es-internal
  
   PathCheck fn=check-acl acl=es-internal
  
   /Object
  
   Object name=cgi
  
   ObjectType fn=force-type type=magnus-internal/cgi
  
   Service fn=send-cgi
  
   /Object
  
   Object name=jknsapi
  
   ObjectType fn=force-type type=text/plain
  
   Service fn=jk_service method=*