R: tomcat service public key

2009-08-17 Thread Leandro Dardini
You can easily solve this problem with the following steps:

#Create the .ssh key directory

mkdir /usr/share/tomcat5/.ssh

#Assign ownership to tomcat

chown tomcat /usr/share/tomcat5/.ssh

I don't think further steps are necessary...

Leandro


> -Messaggio originale-
> Da: Gagan Malik [mailto:gaganma...@dev.java.net] 
> Inviato: martedì 18 agosto 2009 4.08
> A: users@tomcat.apache.org
> Oggetto: tomcat service public key
> 
> 
> Hi, I'm a newbie to both tomcat and ssh and here's my problem:
> 
> I have a web-app (Hudson) running on tomcat (ver 5). This 
> Tomcat runs as a service on RHEL box. Hudson triggers a 
> custom 'ant' script to do a build which uses ssh to login to 
> another server (svn server).
> 
> The ant script runs perfectly fine when triggered manually, 
> since the user that runs it shares his public key with the 
> svn server. But when the same is done via Hudson, it fails 
> since hudson is run by the user: tomcat.
> 
> How can I generate and share the public key of user 'tomcat' 
> (the service) with the svn server so that the ant script does 
> not fail.
> 
> 
> I get this error:
> Could not create directory '/usr/share/tomcat5/.ssh'.
> Host key verification failed.
> svn: Connection closed unexpectedly
> 
> Any help is appreciated.
> 
> Thanks
> --
> View this message in context: 
> http://www.nabble.com/tomcat-service-public-key-tp25017278p250
17278.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> -
> 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



R: How to limit requests per second

2009-07-17 Thread Leandro Dardini
We had a similar problem with a software not made by us. We solved it placing 
apache in front of tomcat and using the mod_cband extension of apache. Feel 
free to query me directly if you need more info.

Leandro

--
Dott. Leandro Dardini
Sistema Informativo
Comune di Prato
Via Cairoli, 16
59100 Prato
Tel: +39 05741835216
Fax: +39 05741835212
Mobile: +39 3474501445 

> -Messaggio originale-
> Da: Tamer Abdulazim [mailto:eng.ta...@gmail.com] 
> Inviato: mercoledì 15 luglio 2009 18.20
> A: users@tomcat.apache.org
> Oggetto: How to limit requests per second
> 
> Hi,
> 
>  We have a servlet deployed on Tomcat 5.5. Another 3rd party 
> application call this servlet heavily. The system works fine 
> for 20 requests per second but it crash if it exceeded this 
> limit. We cannot control the 3rd party system that call our 
> servlet. Can we change any configuration in tomcat to limit 
> number of requests per second to our servlet?
> 
> 
> Thanks a lot
> 
> Timo
> 

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



R: Apache / Tomcat Load Balanced mode

2009-04-21 Thread Leandro Dardini
 

> -Messaggio originale-
> Da: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] 
> Inviato: martedì 21 aprile 2009 7.34
> A: Tomcat Users List
> Oggetto: Apache / Tomcat Load Balanced mode
> 
> Hi
> 
> Would the same work with Apache / Tomcat   Load Balanced mode
> 
> Configuration for single installation of the web application "acme"
> 
> 
> "www.acme.com"  being exposed to INTERNET
> 
> "www.acme.com/admin"being exposed to INTRANET
> 
> 
> Reason :  The application uses a single DB  to request of 
> orders  (from Subscribers) and  same URL  with
>   *admin*  would process the orders ( Internal Employees)
>   and  should not be exposed to outside world.
> 
> 
> Is there any Configuration with in Apache or Tomcat to 
> achieve the same?
> 
> 
> 
> With regards
> Karthik
> 
> 

Maybe I don't understand your question, but to me there is no difference in 
configuring access in Load Balanced or not Load Balanced mode.

As regarding the admin section, you can filter it using apache access control.

Leandro

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



R: Designing tomcat failover

2008-11-06 Thread Leandro Dardini
 

> -Messaggio originale-
> Da: Sivapatham, Hari [mailto:[EMAIL PROTECTED] 
> Inviato: mercoledì 5 novembre 2008 18.10
> A: users@tomcat.apache.org
> Oggetto: Designing tomcat failover
> 
> Hello,
> I have to design a failover setup and I am looking for rough 
> ideas/pointers. Here is our scenario...
>  
> TomcatServer1  <---/Cannot communicate to one 
> another/-> TomcatServer2(hot backup)
>^ ^
> ^
>|   \
> | 
> | \  --- TO DO: Switch to
> TomcatServer2 if server 1 is down---|
> |   \   /
> TomcatClient1 TomcatClient2
>  
> (Following text simply puts the above picture in words, in 
> case it doesnt show up aligned on some email clients)
> - TomcatServer1 is a 5.5 tomcat that provides services. Its 
> clients are other tomcat instances (say TomcatClient1, 
> TomcatClient2). 
> - We have a redundant TomcatServer2 that is a hot backup for server1. 
> - For simplicity sake, we can assume that there is no need to 
> share session information among TomcatServer1 and 
> TomcatServer2. Also, for practical reasons, we cannot have 
> any communication between them (our clients would resist 
> opening up ports).
>  
> Our applications on TomcatClient1 and TomcatClient2 are 
> configured to talk to TomcatServer1. The task at hand is, the 
> client tomcat instances should automatically switch to 
> TomcatServer2 if they detect that
> TomcatServer1 is down. 
>  
> So, I am looking for a failover solution for outgoing requests from
> TomcatClient1 and TomcatClient2. The only option I have right 
> now is for our apps to handle the failover. I wanted to check 
> if there is some module that I can use (filter/valve/apache 
> module) that would handle the failover.
>  
> I appreciate any ideas you might suggest.
> Thanks!
> Hari
>  
>  
> 

The simplest solution popping in my mind is to use a wrapper on tomcatclient1 
and tomcatclient2 togheter with a "mon" probe. You can configure tomcatclient1 
to talk to a local wrapper who send the connection to tomcatserver1. The same 
on tomcatclient2. The "mon" probe will test the connection to tomcatserver1 and 
if it detects a failure it reconfigure the wrapper to let the connection go to 
tomcatserver2. 

Let me know if you'd like more details on this.

Leandro

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



R: R: R: R: Problems with tomcat in debian

2008-09-04 Thread Leandro Dardini
Thank you for pointing this out. This is a valuable information I have to 
remember. I'll go to throw away all path directives from my xml file. ... and 
yes, my applications are outside the host appBase.

Next time I think twice before giving an hint I am not 100% sure.

Leandro

> -Messaggio originale-
> Da: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
> Inviato: giovedì 4 settembre 2008 15.17
> A: Tomcat Users List
> Oggetto: RE: R: R: R: Problems with tomcat in debian
> 
> > From: Leandro Dardini [mailto:[EMAIL PROTECTED]
> > Subject: R: R: R: R: Problems with tomcat in debian
> >
> > I don't know if a file is needed, but I usually create it 
> and all runs 
> > well.
> 
> Please stop giving bad information.  The 
> conf/Catalina/[host]/[appName].xml file is only needed when 
> you wish to override an existing META-INF/context.xml file in 
> the webapp, or the webapp is deployed outside of the  
> appBase.  In other cases, such as the situation posed by the 
> OP, it is not necessary.
> 
> > This is mine for lambda probe, named probebinj.xml  version="1.0" 
> > encoding="UTF-8"?>  > privileged="true"
> > allowLinking="true"
> > docBase="/usr2/context/probe"
> > reloadable="false"
> > path="/probebinj"
> > >
> > 
> 
> The path attribute is illegal here, and must not be used.  If 
> you're lucky, Tomcat will just ignore it; if you're not, 
> behavior will be unpredictable.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
> PROPRIETARY MATERIAL and is thus for use only by the intended 
> recipient. If you received this in error, please contact the 
> sender and delete the e-mail and its attachments from all computers.
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To 
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

smime.p7s
Description: S/MIME cryptographic signature


R: R: R: R: Problems with tomcat in debian

2008-09-04 Thread Leandro Dardini
I don't know if a file is needed, but I usually create it and all runs well.

This is mine for lambda probe, named probebinj.xml





Leandro 

> -Messaggio originale-
> Da: marcos gonzalez [mailto:[EMAIL PROTECTED] 
> Inviato: giovedì 4 settembre 2008 11.35
> A: Tomcat Users List
> Oggetto: Re: R: R: R: Problems with tomcat in debian
> 
> Well, this file not exists, each application needs and xml file there?
> 
> There isn't a default configuration to load all the new applications?
> 
> Thanks
> 
> Best Regards
> 
> 2008/9/4 Leandro Dardini <[EMAIL PROTECTED]>
> 
> > Look at tomcat/conf/Catalina/localhost/sample.xml. There is 
> a field, 
> > docBase="..." you can specify where you application lies. 
> The path="/..."
> > is
> > related on how you call it.
> >
> > Leandro
> >
> > > -Messaggio originale-
> > > Da: marcos gonzalez [mailto:[EMAIL PROTECTED]
> > > Inviato: giovedì 4 settembre 2008 11.21
> > > A: Tomcat Users List
> > > Oggetto: Re: R: R: Problems with tomcat in debian
> > >
> > > Thanks but nots the solution. really I don't know where I can 
> > > configure the default path for the applications
> > >
> > > Best Regards
> > >
> > > 2008/9/4 Leandro Dardini <[EMAIL PROTECTED]>
> > >
> > > > Try putting a "index.jsp" in your context and access 
> > > > http://localhost:8180/sample/index.jsp
> > > >
> > > > Leandro
> > > >
> > > > > -Messaggio originale-
> > > > > Da: marcos gonzalez [mailto:[EMAIL PROTECTED]
> > > > > Inviato: giovedì 4 settembre 2008 10.57
> > > > > A: Tomcat Users List
> > > > > Oggetto: Re: R: Problems with tomcat in debian
> > > > >
> > > > > Hi
> > > > >
> > > > > Im using only Tomcat, not apache. I can access to
> > > manager, how I can
> > > > > test the sampel application using this interface?
> > > > >
> > > > > Best Regards
> > > > >
> > > > > 2008/9/4 Leandro Dardini <[EMAIL PROTECTED]>
> > > > >
> > > > > >
> > > > > >
> > > > > > > -Messaggio originale-
> > > > > > > Da: marcos gonzalez [mailto:[EMAIL PROTECTED]
> > > > > > > Inviato: giovedì 4 settembre 2008 10.41
> > > > > > > A: Tomcat Users List
> > > > > > > Oggetto: Problems with tomcat in debian
> > > > > > >
> > > > > > > Hi
> > > > > > >
> > > > > > > Im installing Tomcat5.5 and works correctly, but when
> > > I put the
> > > > > > > sample application in the webapps folder 
> > > > > > > /usr/share/tomcat5.5/webapps I can't access. I access
> > > > > using the path
> > > > > > > in Firefox http://localhost:8180/sample. The
> > > > > > > 404 error appears.
> > > > > > >
> > > > > > > Any idea?
> > > > > > >
> > > > > > > Best Regards
> > > > > > >
> > > > > >
> > > > > > Did you jkmount the sample application?
> > > > > >
> > > > > > The 404 error is the standard apache or tomcat version?
> > > > > >
> > > > > > Can you see the sample application in the manager interface?
> > > > > >
> > > > > > Leandro
> > > > > >
> > > > >
> > > >
> > >
> >
> 


smime.p7s
Description: S/MIME cryptographic signature


R: R: R: Problems with tomcat in debian

2008-09-04 Thread Leandro Dardini
Look at tomcat/conf/Catalina/localhost/sample.xml. There is a field,
docBase="..." you can specify where you application lies. The path="/..." is
related on how you call it.

Leandro 

> -Messaggio originale-
> Da: marcos gonzalez [mailto:[EMAIL PROTECTED] 
> Inviato: giovedì 4 settembre 2008 11.21
> A: Tomcat Users List
> Oggetto: Re: R: R: Problems with tomcat in debian
> 
> Thanks but nots the solution. really I don't know where I can 
> configure the default path for the applications
> 
> Best Regards
> 
> 2008/9/4 Leandro Dardini <[EMAIL PROTECTED]>
> 
> > Try putting a "index.jsp" in your context and access 
> > http://localhost:8180/sample/index.jsp
> >
> > Leandro
> >
> > > -Messaggio originale-
> > > Da: marcos gonzalez [mailto:[EMAIL PROTECTED]
> > > Inviato: giovedì 4 settembre 2008 10.57
> > > A: Tomcat Users List
> > > Oggetto: Re: R: Problems with tomcat in debian
> > >
> > > Hi
> > >
> > > Im using only Tomcat, not apache. I can access to 
> manager, how I can 
> > > test the sampel application using this interface?
> > >
> > > Best Regards
> > >
> > > 2008/9/4 Leandro Dardini <[EMAIL PROTECTED]>
> > >
> > > >
> > > >
> > > > > -Messaggio originale-
> > > > > Da: marcos gonzalez [mailto:[EMAIL PROTECTED]
> > > > > Inviato: giovedì 4 settembre 2008 10.41
> > > > > A: Tomcat Users List
> > > > > Oggetto: Problems with tomcat in debian
> > > > >
> > > > > Hi
> > > > >
> > > > > Im installing Tomcat5.5 and works correctly, but when 
> I put the 
> > > > > sample application in the webapps folder 
> > > > > /usr/share/tomcat5.5/webapps I can't access. I access
> > > using the path
> > > > > in Firefox http://localhost:8180/sample. The
> > > > > 404 error appears.
> > > > >
> > > > > Any idea?
> > > > >
> > > > > Best Regards
> > > > >
> > > >
> > > > Did you jkmount the sample application?
> > > >
> > > > The 404 error is the standard apache or tomcat version?
> > > >
> > > > Can you see the sample application in the manager interface?
> > > >
> > > > Leandro
> > > >
> > >
> >
> 


smime.p7s
Description: S/MIME cryptographic signature


R: R: Problems with tomcat in debian

2008-09-04 Thread Leandro Dardini
Try putting a "index.jsp" in your context and access
http://localhost:8180/sample/index.jsp

Leandro

> -Messaggio originale-
> Da: marcos gonzalez [mailto:[EMAIL PROTECTED] 
> Inviato: giovedì 4 settembre 2008 10.57
> A: Tomcat Users List
> Oggetto: Re: R: Problems with tomcat in debian
> 
> Hi
> 
> Im using only Tomcat, not apache. I can access to manager, 
> how I can test the sampel application using this interface?
> 
> Best Regards
> 
> 2008/9/4 Leandro Dardini <[EMAIL PROTECTED]>
> 
> >
> >
> > > -Messaggio originale-
> > > Da: marcos gonzalez [mailto:[EMAIL PROTECTED]
> > > Inviato: giovedì 4 settembre 2008 10.41
> > > A: Tomcat Users List
> > > Oggetto: Problems with tomcat in debian
> > >
> > > Hi
> > >
> > > Im installing Tomcat5.5 and works correctly, but when I put the 
> > > sample application in the webapps folder 
> > > /usr/share/tomcat5.5/webapps I can't access. I access 
> using the path 
> > > in Firefox http://localhost:8180/sample. The
> > > 404 error appears.
> > >
> > > Any idea?
> > >
> > > Best Regards
> > >
> >
> > Did you jkmount the sample application?
> >
> > The 404 error is the standard apache or tomcat version?
> >
> > Can you see the sample application in the manager interface?
> >
> > Leandro
> >
> 


smime.p7s
Description: S/MIME cryptographic signature


R: R: Monitor and report number of concurrent user

2008-09-04 Thread Leandro Dardini
Top posting, ok, if you like it...

About sharing how I did it, in attach there is the very dirty nagios probe I
write (cut away the .txt). Messages are in italian, sorry, nobody is perfect
;-) The probe get current thread and request count and busy thread. I use
nagiostat to graph them and forecast my horsepower needs.

The lambda probe uses the standard tomcat-users.xml file, so you can use the
same "manager" user and password you use for the manager interface. Lambda
probe adds some new roles for intermediate security. 

Feel free to query me on problems.

Leandro
 

> -Messaggio originale-
> Da: Nix Hanwei [mailto:[EMAIL PROTECTED] 
> Inviato: giovedì 4 settembre 2008 10.28
> A: Tomcat Users List
> Oggetto: Re: R: Monitor and report number of concurrent user
> 
> Hi Leandro,
> 
> That's really cool idea you had used.  Do you mind sharing 
> abit more on how you did it?
> 
> A newbie question here.. I downloaded and expanded probe.war 
> file.  May I know the default user and password?
> 
> Thank you in advance.
> wannabe
> 
> 
> 
> - Original Message 
> From: Leandro Dardini <[EMAIL PROTECTED]>
> To: Tomcat Users List 
> Sent: Thursday, 4 September 2008 15:31:43
> Subject: R: Monitor and report number of concurrent user
> 
> 
> 
> > -Messaggio originale-
> > Da: Nix Hanwei [mailto:[EMAIL PROTECTED]
> > Inviato: giovedì 4 settembre 2008 5.19
> > A: Tomcat Users List
> > Oggetto: Monitor and report number of concurrent user
> > 
> > Hi Gurus,
> > 
> > May I know if there's scripts or suggestions for reporting 
> concurrent 
> > user in tomcat?
> > 
> > Thanks in advance,
> > wannabe
> > 
> > 
> 
> The easy and dirty way is to query the manager application 
> and grab the current session, running threads and other vars 
> you are interested in. Be warned the manager application is 
> not so easy to parse.
> The correct path instead is to use JMX. JMX can be used to 
> monitor all aspect of tomcat, like threads, sessions, etc. 
> etc. If you use a jdk >= 1.5 then start adding 
> -Dcom.sun.management.jmxremote to your JAVA_OPTIONS and then 
> look at 
> http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.htm
> l and http://java.sun.com/jmx for details. There is already a 
> nagios probe to get data via jmx 
> http://www.nagiosexchange.org/cgi-bin/page.cgi?g=2338.html;d=1
> 
> I personally use the lambda probe application to monitor my 
> tomcat farm from nagios. It is way too easy to parse.
> 
> Leandro
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To 
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
>   
> __
> Search, browse and book your hotels and flights through Yahoo! Travel.
> http://sg.travel.yahoo.com
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To 
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
#!/bin/sh
#
HOST=$1
PORT=$2
WARNING=$3
CRITICAL=$4
ERRORE="";

if [ $# -ne 4 ];
then
echo "Parametri NON corretti!!"
echo "   "
exit -1
fi


if [ $PORT -eq 80 ]; then
wget -q "$HOST":$PORT/probebinj/status.htm --http-user=manager  
--http-passwd=** -O /tmp/nagios/tomcat_thread_"$HOST"_$PORT ;
else
wget -q "$HOST":$PORT/probebinj/status.htm --http-user=manager  
--http-passwd=** -O /tmp/nagios/tomcat_thread_"$HOST"_$PORT ;
fi

if [ ! -f  /tmp/nagios/tomcat_thread_"$HOST"_$PORT ]; then
echo "Impossibile scrivere il file"
exit 2;
fi

ALL_THREADS=`cat /tmp/nagios/tomcat_thread_"$HOST"_$PORT`

if [ "${ALL_THREADS}" == "" ]; then
echo "Impossibile Connettersi con il Lambda Probe"
exit 2;
fi

if [ ! -w /tmp/nagios/tomcat_thread_"$HOST"_$PORT ]; then
echo "Errore Salvataggio File"
exit 2;
fi

THREAD_COUNT=`grep "Current thread count" 
/tmp/nagios/tomcat_thread_"$HOST"_$PORT | tail -1 |  cut -d\; -f 2` ;
THREAD_BUSY=`grep "Current threads busy" 
/tmp/nagios/tomcat_thread_"$HOST"_$PORT | tail -1 |  cut -d\; -f 2` ;
REQUEST_COUNT=`grep "Request count" /tmp/nagios/tomcat_thread_"$HOST"_$PORT | 
tail -1 |  cut -d\; -f 2` ;

ERRORE=0 ;

if [ $THREAD_BUSY -ge $WARNING ]; then
   ERRORE=1 ;
   if [ $THREAD_BUSY -ge $CRITICAL ]; then

R: Problems with tomcat in debian

2008-09-04 Thread Leandro Dardini
 

> -Messaggio originale-
> Da: marcos gonzalez [mailto:[EMAIL PROTECTED] 
> Inviato: giovedì 4 settembre 2008 10.41
> A: Tomcat Users List
> Oggetto: Problems with tomcat in debian
> 
> Hi
> 
> Im installing Tomcat5.5 and works correctly, but when I put 
> the sample application in the webapps folder 
> /usr/share/tomcat5.5/webapps I can't access. I access using 
> the path in Firefox http://localhost:8180/sample. The
> 404 error appears.
> 
> Any idea?
> 
> Best Regards
> 

Did you jkmount the sample application?

The 404 error is the standard apache or tomcat version?

Can you see the sample application in the manager interface?

Leandro


smime.p7s
Description: S/MIME cryptographic signature


R: Monitor and report number of concurrent user

2008-09-04 Thread Leandro Dardini
 

> -Messaggio originale-
> Da: Nix Hanwei [mailto:[EMAIL PROTECTED] 
> Inviato: giovedì 4 settembre 2008 5.19
> A: Tomcat Users List
> Oggetto: Monitor and report number of concurrent user
> 
> Hi Gurus,
> 
> May I know if there's scripts or suggestions for reporting 
> concurrent user in tomcat?
> 
> Thanks in advance,
> wannabe
> 
> 

The easy and dirty way is to query the manager application and grab the current 
session, running threads and other vars you are interested in. Be warned the 
manager application is not so easy to parse.
The correct path instead is to use JMX. JMX can be used to monitor all aspect 
of tomcat, like threads, sessions, etc. etc. If you use a jdk >= 1.5 then start 
adding -Dcom.sun.management.jmxremote to your JAVA_OPTIONS and then look at 
http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html and 
http://java.sun.com/jmx for details. There is already a nagios probe to get 
data via jmx http://www.nagiosexchange.org/cgi-bin/page.cgi?g=2338.html;d=1

I personally use the lambda probe application to monitor my tomcat farm from 
nagios. It is way too easy to parse.

Leandro

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



R: R: R: Newer version of mod_jk much slower than 1.2.13

2008-08-25 Thread Leandro Dardini
> -Messaggio originale-
> Da: Rainer Jung [mailto:[EMAIL PROTECTED] 
> Inviato: venerdì 22 agosto 2008 21.09
> A: Tomcat Users List
> Oggetto: Re: R: R: Newer version of mod_jk much slower than 1.2.13
> 
> Hi Leandro,
> 
> Leandro Dardini schrieb:
> > LoadModule jk_module modules/mod_jk.so
> > 
> > JkWorkersFile /etc/httpd/conf/workers.properties
>  > JkLogFile /etc/httpd/logs/mod_jk.log
>  > JkLogLevel info
> 
> OK
> 
> > About the trace level, full it is over 700Kbyte (gzipped), 
> I send it 
> > directly to you. Thank you very much if you can look at it.
> > 
> > 
> > Looking to tcpdump flow of packets between client and apache web 
> > server, I notice a lots of small packets. With older version of 
> > mod_jk, there are instead fewer packets of bigger size.
> 
> Yes, that's the problem, but I don't see, how mod_jk 
> influences that, it's a decision of the backend how to chunk 
> the data. Maybe we now stream them back sooner than before, 
> but I doubt it.
> 
> I asked about a log file for the old and for the new version. 
> Could you provide the one for the old version too?
> 
> There are 10630 packets received by mod_jk from the backend, 
> and 6608 of those are empty (no data, only AJP protocol header).
> 
> The first packet is received after about 200 milliseconds, 
> each further packet takes 1-2 milliseconds. I want to compare 
> with the log when you use 1.2.13. If possible please send the 
> exact same request with the same httpd and the same backend, 
> only using 1.2.13 instead of 1.2.26.
> 
> Regards,
> 
> Rainer
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To 
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

The saga continues. Privately I send you the mod_jk.log using the latest 
versione of mod_jk with trace debug. 

A very big thank you.

Leandro

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



R: R: Newer version of mod_jk much slower than 1.2.13

2008-08-22 Thread Leandro Dardini



-Messaggio originale-
Da: Rainer Jung [mailto:[EMAIL PROTECTED]
Inviato: ven 22/08/2008 14.21
A: Tomcat Users List
Oggetto: Re: R: Newer version of mod_jk much slower than 1.2.13
 
> I get rid of the balancer and set in apache configuration file:
> 
> JkMount /eltbinj/* ajp13w_01_01
> 
> With the 1.2.13 the result is obviously the same high speed (I unset the lang 
> for not italian (lucky) people):
...
> 13:13:00 (630.19 KB/s) - `/dev/null' saved [53048]
> 
> With the 1.2.26 the result is the same:
...
> 13:14:53 (7.35 KB/s) - `/dev/null' saved [53048]
> 
> So in conclusion, it is not a matter of load balancer.

Thanks for helping narrowing it down, also the information about it only 
happening for dynamic content is interesting (maybe it has to do with 
chunked encoding).

I could analyze the packet flow between Apache and Tomcat. If you set 
JkLogLevel to trace (and if trace doesn't exist for 1.2.13 to debug 
there), you get very long log output. If you do the wget test once with 
each version and with the increased log level, I could have a look at 
those log files. They will contain a full packet dump of the 
communication and at least for 1.2.26 millisecond timestamps.

Nevertheless I'm still curious about your JK directives for Apache. I 
guess JkMount is not everything ;)

Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sorry for the ugly mailer, but I am using a webmail now from home. About the jk 
directives for apache, here they are:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel info

About the trace level, full it is over 700Kbyte (gzipped), I send it directly 
to you. Thank you very much if you can look at it.

172.16.1.49 is the host making the wget

193.43.107.13 is the apache server 

193.43.107.16 is the tomcat server

A piece following:

[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [debug] 
init_ws_service::mod_jk.c (888): Service protocol=HTTP/1.0 method=GET 
host=(null) a
ddr=172.16.1.49 name=elenco1.comune.prato.it port=80 auth=(null) user=(null) 
laddr=193.43.107.14 raddr=172.16.1.49 uri=/eltbinj/servlet/ricer
caelenco
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
get_endpoint::jk_ajp13_worker.c (73): enter
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_get_endpoint::jk_ajp_common.c (2552): enter
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [debug] 
ajp_get_endpoint::jk_ajp_common.c (2579): acquired connection pool slot=0
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_get_endpoint::jk_ajp_common.c (2582): exit
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
get_endpoint::jk_ajp13_worker.c (75): exit
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_service::jk_ajp_common.c (1966): enter
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_marshal_into_msgb::jk_ajp_common.c (373): enter
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [debug] 
ajp_marshal_into_msgb::jk_ajp_common.c (553): ajp marshaling done
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_marshal_into_msgb::jk_ajp_common.c (554): exit
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [debug] 
ajp_service::jk_ajp_common.c (2050): processing ajp13w_01_01 with 2 retries
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_send_request::jk_ajp_common.c (1263): enter
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_next_connection::jk_ajp_common.c (737): enter
[Fri Aug 22 18:10:57.827 2008] [23127:2537062720] [trace] 
ajp_next_connection::jk_ajp_common.c (764): exit
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [debug] 
ajp_send_request::jk_ajp_common.c (1352): (ajp13w_01_01) all endpoints are 
disconne
cted, detected by connect check (0), cping (0), send (0)
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [trace] 
ajp_connect_to_endpoint::jk_ajp_common.c (859): enter
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [trace] 
jk_open_socket::jk_connect.c (426): enter
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [debug] 
jk_open_socket::jk_connect.c (448): socket TCP_NODELAY set to On
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [debug] 
jk_open_socket::jk_connect.c (462): socket SO_KEEPALIVE set to On
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [debug] 
jk_open_socket::jk_connect.c (513): timeout 1 set for socket=17
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [debug] 
jk_open_socket::jk_connect.c (548): trying to connect socket 17 to 
193.43.107.16:8009
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [trace] 
nb_connect::jk_connect.c (218): enter
[Fri Aug 22 18:10:57.828 2008] [23127:2537062720] [trace] 
nb_connect::jk_connect.c (264): exit
[Fri Aug 22 18:10:57.828 2008] [2

R: Newer version of mod_jk much slower than 1.2.13

2008-08-22 Thread Leandro Dardini
> -Messaggio originale-
> Da: Rainer Jung [mailto:[EMAIL PROTECTED] 
> Inviato: venerdì 22 agosto 2008 12.15
> A: Tomcat Users List
> Oggetto: Re: Newer version of mod_jk much slower than 1.2.13
> 
> Can you throw our the load balancer and retry with only one 
> direct worker? That would be helpful.
> 
> Also: please post your platform (type/version) and your JK 
> directives (for Apache).
> 
> The 7 seconds is by far to long for 50KB.
> 
> Regards,
> 
> Rainer
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To 
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

I get rid of the balancer and set in apache configuration file:

JkMount /eltbinj/* ajp13w_01_01

With the 1.2.13 the result is obviously the same high speed (I unset the lang 
for not italian (lucky) people):

[EMAIL PROTECTED] ~]# time wget -O /dev/null 
http://elenco.comune.prato.it/eltbinj/servlet/ricercaelenco
--13:13:00--  http://elenco.comune.prato.it/eltbinj/servlet/ricercaelenco
   => `/dev/null'
Resolving elenco.comune.prato.it... 193.43.107.15
Connecting to elenco.comune.prato.it|193.43.107.15|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[ <=>   
] 53,048--.--K/s

13:13:00 (630.19 KB/s) - `/dev/null' saved [53048]


real0m0.168s
user0m0.000s
sys 0m0.002s

With the 1.2.26 the result is the same:

[EMAIL PROTECTED] ~]# time wget -O /dev/null 
http://elenco1.comune.prato.it/eltbinj/servlet/ricercaelenco
--13:14:46--  http://elenco1.comune.prato.it/eltbinj/servlet/ricercaelenco
   => `/dev/null'
Resolving elenco1.comune.prato.it... 193.43.107.14
Connecting to elenco1.comune.prato.it|193.43.107.14|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[<=>
] 53,048 7.36K/s

13:14:53 (7.35 KB/s) - `/dev/null' saved [53048]


real0m7.113s
user0m0.020s
sys 0m0.092s

So in conclusion, it is not a matter of load balancer.

However I get a bit further with tests: it seems the slowdown happens only when 
tomcat is spending some time building the answer. The "ricercaelenco" servlet 
perform a query on a database. I try pulling a generic file from tomcat and the 
result are pretty the same:

[EMAIL PROTECTED] ~]# time wget -O /dev/null 
http://elenco.comune.prato.it/eltbinj/htdocs/test.dat
--13:18:21--  http://elenco.comune.prato.it/eltbinj/htdocs/test.dat
   => `/dev/null'
Resolving elenco.comune.prato.it... 193.43.107.15
Connecting to elenco.comune.prato.it|193.43.107.15|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 102,400,000 (98M) [text/plain]

100%[==>]
 102,400,0008.06M/sETA 00:00

13:18:34 (7.53 MB/s) - `/dev/null' saved [10240/10240]


real0m13.034s
user0m0.107s
sys 0m0.448s
[EMAIL PROTECTED] ~]# time wget -O /dev/null 
http://elenco1.comune.prato.it/eltbinj/htdocs/test.dat
--13:18:38--  http://elenco1.comune.prato.it/eltbinj/htdocs/test.dat
   => `/dev/null'
Resolving elenco1.comune.prato.it... 193.43.107.14
Connecting to elenco1.comune.prato.it|193.43.107.14|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 102,400,000 (98M) [text/plain]

100%[==>]
 102,400,0006.88M/sETA 00:00

13:18:52 (6.70 MB/s) - `/dev/null' saved [10240/10240]


real0m14.601s
user0m0.097s
sys 0m0.435s

About my environment, all is running on Redhat ES4 64bit on X86_64 platform. 
There are two machine running "stock redhat" apache 2.0.52 and (now) one 
machine running "stock apache.org" tomcat 5.5.26. Following the java options on 
starting tomcat:

JAVA_OPTS="-Xms1024M -Xmx1024M -XX:MaxPermSize=512M 
-Dcom.sun.management.jmxremote -XX:GCTimeRatio=99 -verbose:gc"

Leandro

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Newer version of mod_jk much slower than 1.2.13

2008-08-21 Thread Leandro Dardini
orker.wlbsafe.socket_timeout=1

worker.wlbig.type=lb
worker.wlbig.sticky_session=1
worker.wlbig.balance_workers=ajp13w_ig_01_01,ajp13w_ig_02_01

worker.wlbip.type=lb
#worker.wlbip.sticky_session=1
worker.wlbip.balance_workers=ajp13w_ip_01_01,ajp13w_ip_02_01

worker.wlbis.type=lb
worker.wlbis.sticky_session=1
worker.wlbis.balance_workers=ajp13w_is_01_01,ajp13w_is_02_01

worker.wlbsondaggi.type=lb
worker.wlbsondaggi.sticky_session=1
worker.wlbsondaggi.balance_workers=ajp13w_sondaggi_01_01,ajp13w_sondaggi
_02_01

worker.wlbws.type=lb
worker.wlbws.balance_workers=ajp13w_ws_01_01,ajp13w_ws_02_01
worker.wlbws.socket_timeout=1

worker.wlbgeoserver.type=lb
worker.wlbgeoserver.sticky_session=1
worker.wlbgeoserver.balance_workers=ajp13w_geoserver_01_01,ajp13w_geoser
ver_02_01

#
# Define status worker
#

worker.jkstatus.type=status

---------

Thank you for your patient.

Leandro

-
Dott. Leandro Dardini
Sistema Informativo
Comune di Prato
Via Cairoli, 16
59100 Prato PO
Tel: +39 05741835216
Fax: +39 05721835212 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]