Re: Need Help - Mod_jk/Apache - Mutiple Content issue

2009-09-10 Thread Rainer Jung
On 10.09.2009 06:30, balakarthik.baska...@wipro.com wrote:
 Hi Rainer,
 
 I did try with the recovery_option as 7 and I was able to see a partial
 content being sent even in that case.Also,this configuration is what we
 tried in prod as well(we removed socket_timeout,had reply_timeout to 3
 mins and recovery_options to 7).But still multiple content was
 seen.So,hope this partial content was the one that was served to akamai
 and guess its messed up there.

Partial content is possible. We can't take it back, once it is sent to
the client, and we can't fix, if the backend doesn't send all the response.

Partial content should not lead to dublicate content though.

Partial content can be detected by the client, because either the
content length is not right, or the chunked encoded transfer ends
prematurely. The client (akamai) should then not serve this partial content.

 Also,when this option is set,the session failover behaviour gets
 completely ruled out as we make the worker not to retry and this will
 not try to contact the other worker and thereby the other app instance.

No, failover should still work.

 Pfa the configuration files that I used in my local setup.

They didn't make it to the list. You can try to post inline.

Regards,

Rainer

 -Original Message-
 From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
 Sent: Wednesday, September 09, 2009 11:39 PM
 To: users@tomcat.apache.org
 Subject: Re: Need Help - Mod_jk/Apache - Mutiple Content issue
 
 On 09.09.2009 16:11, balakarthik.baska...@wipro.com wrote:
 Thanks for your reply.I am able to simulate the problem with 1.2.28 as
 
 well.This is the mod_jk version that I used in my local setup.Our prod
 
 version has 1.2.27.So regardless of the version,the issue is seen.
 
 OK
 
 Pfa the detailed debug logs of mod_jk for different combinations that 
 I tried out and when the issue occured.
 
 Thanks.
 
 The reason is in your configuration. There is one switch that is much
 recommended and form the logs it seems you already found and tried it:
 the recovery_options.
 
 See:
 
 http://tomcat.apache.org/connectors-doc/reference/workers.html
 
 and also look carefully at:
 
 http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html
 
 You should set recovery_options to 7. This switch is exactly for
 disabling request retries in case Tomcat already replied, or at least
 the request was send to Tomcat. It should fix your problem.
 
 So maybe we are back to the beginning: why don't you post your config,
 so we can see, if there is more potential for optimization.
 
 From the timestamps in the jk log I can see e.g., that you are using a
 hard configured time stamp format. That's not to good, because that way
 you don't see the milliseconds, that are logged since a couple of
 versions by default.
 
 The other main scenario apart from the one explained below that I am 
 seeing is when I tried setting up a JBOSS cluster node setup of two 
 nodes with session replication (with socket_timeout not set or default
 
 to infinite).Node 1 app code is made to take a longer time to 
 respond.When the node1 has started writing a huge chunk,I abruptly 
 kill the node 1 and I see mod_jk failing over the request to node2.But
 
 the end result is the data written by node1 until it has been killed 
 clubbed with the data written by node2 is seen in the browser.
 
 Will also be fixed by recovery_options.
 
 This is where we are not able to make a decision of even having 
 socket_timeout to be infinite or to a defined limit(as we never know 
 how long/when the root cause of the delay might occur) as there may be
 
 lot of possibility of failover and we suscpect the multiple content 
 issue would be coming up when failover happens.The worst part is when 
 akamai comes into picture where I hope this partial content is cached 
 in their edge servers and completely messes up by showing the content 
 to the users.So for all other subsequent requests,the data which is 
 served from akamai cache is the messedup multiple content thereby 
 completely degrading the customer experience.
 
 See above. I generally am not in favor of the socket_timeout. Even after
 your original problem goes away by using recovery_options, the behaviour
 of the general socket_timeout is not very nice. I would stick with a
 couple of the other timeouts.
 
 Regards,
 
 Rainer
 
 -Original Message-
 From: Rainer Jung [mailto:rainer.j...@kippdata.de]
 Sent: Wednesday, September 09, 2009 7:16 PM
 To: Tomcat Users List
 Subject: Re: Need Help - Mod_jk/Apache - Mutiple Content issue

 Hi,

 On 09.09.2009 06:56, balakarthik.baska...@wipro.com wrote:
 Hi,
 In our production envt,we are making use of a configuration of 
 Apache(2.2.10-1)+Mod_jk(1.2.27)+JBOSS(4.0.5)+ATG 2007.1.
  
 We are facing a problem where multiple content is being displayed to 
 the customer.It was observed that the pages were being periodically 
 rendered or rendered multiple times.The page was rendered with a 
 

Re: bypassing a servlet mapping to /*

2009-09-10 Thread Leon Rosenberg
Thanx Chuck, Martin.

chucks solution came first, so I tried it first, and it worked, but
not the way i actually expected.
If I add ALL mappings to the web.xml - it works:

servlet-mapping
servlet-namejsp/servlet-name
url-pattern/net/java/dev/moskito/webui/jsp/Producers.jsp/url-pattern
/servlet-mapping
servlet-mapping
servlet-namejsp/servlet-name
url-pattern/net/java/dev/moskito/webui/jsp/ProducersXML.jsp/url-pattern
/servlet-mapping
...

But If I add only the path:
servlet-mapping
servlet-namejsp/servlet-name
url-pattern/net/java/dev/moskito/webui/jsp/*/url-pattern
/servlet-mapping

it doesn't, and I don't understand why?
Shouldn't the most 'matching' mapping win?

For  /net/java/dev/moskito/webui/jsp/ProducersXML.jsp
Shouldn't
 url-pattern/net/java/dev/moskito/webui/jsp/ProducersXML.jsp/url-pattern
win over
 url-pattern/*/url-pattern

regards
Leon

On Wed, Sep 9, 2009 at 9:07 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com]
 Subject: bypassing a servlet mapping to /*

 /net/java/dev/moskito/webui/jsp/Producers.jsp
 now the request is processed by the servlet engine and is grabed by
 the spring dispatcher with an error:

 You can always put the complete mapping for the .jsp entries of interest into 
 WEB-INF/web.xml and direct it to Tomcat's JSP servlet; since the longest 
 match wins, that will override the Spring mapping.

  - 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 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: bypassing a servlet mapping to /*

2009-09-10 Thread Caldarale, Charles R
 From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com]
 Subject: Re: bypassing a servlet mapping to /*
 
 But If I add only the path:
 servlet-mapping
 servlet-namejsp/servlet-name
 url-pattern/net/java/dev/moskito/webui/jsp/*/url-pattern
 /servlet-mapping
 
 it doesn't, and I don't understand why?
 Shouldn't the most 'matching' mapping win?

Yes.

What are the actual URLs being used here?

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



Re: bypassing a servlet mapping to /*

2009-09-10 Thread Leon Rosenberg
On Thu, Sep 10, 2009 at 2:56 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com]
 Subject: Re: bypassing a servlet mapping to /*

 But If I add only the path:
 servlet-mapping
     servlet-namejsp/servlet-name
     url-pattern/net/java/dev/moskito/webui/jsp/*/url-pattern
 /servlet-mapping

 it doesn't, and I don't understand why?
 Shouldn't the most 'matching' mapping win?

 Yes.

 What are the actual URLs being used here?

the first request comes as
/mui/mskShowAllProducers and is mapped to a filter, which, after
performing some tasks, calls:


if (forward!=null){

req.getRequestDispatcher(forward.getPath()).forward(req, res);
}   

forward.getPath() would be -
/net/java/dev/moskito/webui/jsp/Producer.jsp - a string field.

and if i use mapping with asterisk (/net/java/dev/moskito/webui/jsp/*)
, i see log errors from dispatcher servlet that it doesn't know how to
map
/net/java/dev/moskito/webui/jsp/Producer.jsp.
if i use direct mapping /net/java/dev/moskito/webui/jsp/Producer.jsp
in the web.xml (namely define EACH jsp, EACH image and EACH other
item)
it works.

regards
Leon


  - 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 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: Need Help - Mod_jk/Apache - Mutiple Content issue

2009-09-10 Thread André Warnier

balakarthik.baska...@wipro.com wrote:
...
Just jumping in here, but doesn't that request to /test/test.jsp appear 
to be looping ? or is that by design ?


ReplyTimeout_Analysis.txt :

[Thu Sep 10 14:46:47 2009][5024:2952] [debug] jk_ajp_common.c (1259): 
00f06D 20 74 65 73 74 69 6E 63 6C 75 64 65 31 20 50  - m.testinclude1.P
[Thu Sep 10 14:46:47 2009][5024:2952] [debug] jk_ajp_common.c (1259): 
010061 67 65 0D 0A 48 65 6C 6C 6F 6F 6F 6F 6F 20 66  - age..Hello.f
[Thu Sep 10 14:46:47 2009][5024:2952] [debug] jk_ajp_common.c (1259): 
011072 6F 6D 20 74 65 73 74 69 6E 63 6C 75 64 65 31  - rom.testinclude1



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



Re: bypassing a servlet mapping to /*

2009-09-10 Thread André Warnier

Leon Rosenberg wrote:


and if i use mapping with asterisk (/net/java/dev/moskito/webui/jsp/*)
, i see log errors from dispatcher servlet that it doesn't know how to
map
/net/java/dev/moskito/webui/jsp/Producer.jsp.


Yep (from a dummie) : does that not indeed look like the dispatcher 
thingie you're using does not know how to map wildcards ?



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



RE: Need Help - Mod_jk/Apache - Mutiple Content issue

2009-09-10 Thread balakarthik.baskaran
No I explicitly made it to loop so that I can write a content for a time longer 
than the reply_timout setting to simulate and look at the behaviour.

Regards,
Bala

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Thursday, September 10, 2009 6:54 PM
To: Tomcat Users List
Subject: Re: Need Help - Mod_jk/Apache - Mutiple Content issue

balakarthik.baska...@wipro.com wrote:
...
Just jumping in here, but doesn't that request to /test/test.jsp appear to be 
looping ? or is that by design ?

ReplyTimeout_Analysis.txt :

[Thu Sep 10 14:46:47 2009][5024:2952] [debug] jk_ajp_common.c (1259):
00f06D 20 74 65 73 74 69 6E 63 6C 75 64 65 31 20 50  - m.testinclude1.P
[Thu Sep 10 14:46:47 2009][5024:2952] [debug] jk_ajp_common.c (1259):
010061 67 65 0D 0A 48 65 6C 6C 6F 6F 6F 6F 6F 20 66  - age..Hello.f
[Thu Sep 10 14:46:47 2009][5024:2952] [debug] jk_ajp_common.c (1259):
011072 6F 6D 20 74 65 73 74 69 6E 63 6C 75 64 65 31  - rom.testinclude1


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


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com

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



Re: Need Help - Mod_jk/Apache - Mutiple Content issue

2009-09-10 Thread André Warnier

balakarthik.baska...@wipro.com wrote:

No I explicitly made it to loop so that I can write a content for a time longer 
than the reply_timout setting to simulate and look at the behaviour.


Ok, but does a reply timeout really apply in that case ?
I would intuitively think that a reply timeout would be irrelevant as 
soon as the first byte of the reply arrives.  How long the response is 
after that, should not matter.

No ?

As I mentioned, I was just jumping in in the middle. Disregard my 
comments if they are not relevant.  I was just looking at the logs and 
trying to figure out what the problem is.


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



RE: bypassing a servlet mapping to /*

2009-09-10 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: bypassing a servlet mapping to /*
 
 Yep (from a dummie) : does that not indeed look like the dispatcher
 thingie you're using does not know how to map wildcards ?

Indeed it does.  But my understanding of the dispatcher is that it should be 
using the mappings in web.xml, which certainly appear to cover the case of 
interest.

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



RE: Need Help - Mod_jk/Apache - Mutiple Content issue

2009-09-10 Thread balakarthik.baskaran
Yes you are right.I think I didn't mention it clearly.I am having this while 
loop for writing a huge chunk of data followed by a thread that sleeps for some 
time and that is where I am expecting my reply_timeout to be timed out and the 
data written till the sleep of the thread is seen in the browser and the log 
file.

Regards,
Bala

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Thursday, September 10, 2009 7:06 PM
To: Tomcat Users List
Subject: Re: Need Help - Mod_jk/Apache - Mutiple Content issue

balakarthik.baska...@wipro.com wrote:
 No I explicitly made it to loop so that I can write a content for a time 
 longer than the reply_timout setting to simulate and look at the behaviour.

Ok, but does a reply timeout really apply in that case ?
I would intuitively think that a reply timeout would be irrelevant as soon as 
the first byte of the reply arrives.  How long the response is after that, 
should not matter.
No ?

As I mentioned, I was just jumping in in the middle. Disregard my comments if 
they are not relevant.  I was just looking at the logs and trying to figure out 
what the problem is.

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


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com

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



Re: Need Help - Mod_jk/Apache - Mutiple Content issue

2009-09-10 Thread André Warnier

balakarthik.baska...@wipro.com wrote:

Yes you are right.I think I didn't mention it clearly.I am having this while 
loop for writing a huge chunk of data followed by a thread that sleeps for some 
time and that is where I am expecting my reply_timeout to be timed out and the 
data written till the sleep of the thread is seen in the browser and the log 
file.


Ok, now I do understand better, I think.
There is a request.
The Tomcat app starts answering (a long chunk of data), then crashes.
This is simulated by your test script, which sends a long chunk of data, 
then sleeps (to simulate a crash).
Eventually, some timeout occurs, which (may) cause another element to 
consider this Tomcat unresponsive, and switch the request to another one.

This other one then restarts the request from the beginning.
The final result being that the requesting browser first received an 
incomplete chunk of data from the first webapp, and now starts receiving 
the same data (again) from another webapp.


Again intuitively, I don't know how any server-side scheme is going to 
solve that.
When the first webapp starts answering, that Tomcat has to start sending 
the answer back to the client.  If it then crashes, it is too late to 
call it back; the data is already on the wire to the client.
It would be in my view the client's responsibility to ensure that it 
discards any incomplete data received.

But I don't know of any browser for instance, which does that.
They all start to try to display the data as soon as they have the 
beginning of it.


I think that if you really need this, then you would have to insert some 
other item between Tomcat and the client, which acts as a proxy, and 
only starts sending the response to the client when it is sure that it 
has received and buffered a complete response from the server.

But then, this item becomes the weak link.  It could also crash..
Or else you need an applet at the client side, which does the same thing.


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



Tomcat 6 Clustering with session replication problem

2009-09-10 Thread Davy NESTOR
Hello

I'm trying to set up a session replciation between my tomcat hosts.
I have to use the static method to describe the member of the cluster.

I had the same error that this thread:
http://www.opensubscriber.com/message/users@tomcat.apache.org/9810630.html

I tried to modify my configuration, each node add the other in the startup
sequence but after that I don't see nothing on the logs and it doesn't seem
that the session are shared when I connect to one server with my web
browser.

This is my configuration:
(on serv-1 for exemple)
Engine name=Catalina defaultHost=localhost jvmRoute=serv2

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=8
Manager
className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/
Channel
className=org.apache.catalina.tribes.group.GroupChannel
Membership
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4
port=45564
frequency=500
dropTime=3000/
Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=ip-serv-2
port=4000
autoBind=100
selectorTimeout=5000
maxThreads=6/
Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
/Sender
Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor
staticOnly=true/
Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
Interceptor
className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
Member
className=org.apache.catalina.tribes.membership.StaticMember
port=4000
host=serv1

uniqueId={10,1,0,113,0,0,0,0,0,0,0,0,0,0,0,0}/
Member
className=org.apache.catalina.tribes.membership.StaticMember
port=4000
host=serv2

uniqueId={10,1,0,115,0,0,0,0,0,0,0,0,0,0,0,0}/
/Interceptor
/Channel
Valve
className=org.apache.catalina.ha.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/
Valve
className=org.apache.catalina.ha.session.JvmRouteBinderValve/
ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/
/Cluster

   Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase /

Host name=localhost appBase=/data/gtube-files/webapps/
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false

Aliasserv.domain.com/Alias



Context path=/ distributable=true docBase=platform debug=5
reloadable=true crossContext=true

/Context

/Host

/Engine


This is what my logs look like:
Sep 10, 2009 5:03:19 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'debug' to '5' did not find a matching property.
Sep 10, 2009 5:03:19 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
Sep 10, 2009 5:03:19 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 301 ms
Sep 10, 2009 5:03:19 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 10, 2009 5:03:19 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Sep 10, 2009 5:03:19 PM org.apache.catalina.ha.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Sep 10, 2009 5:03:19 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/serv-1:4000
Sep 10, 2009 5:03:19 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Sep 10, 2009 5:03:19 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://serv-1:4000,serv-1,4000,
alive=0,id={10 1 0 113 0 0 0 0 0 0 0 0 0 0 0 

Re: mod_jk fails to forward request on high traffic

2009-09-10 Thread John Cherouvim

Thanks guys, that seems to solve the problem.
I also tried Mark's DisableReuse and it works fine, but I reverted since 
the timeouts solution works well and looks better.


Another resource I used to get a better understanding of the issue was 
http://kbase.redhat.com/faq/docs/DOC-15866


Thanks again
Ioannis


André Warnier wrote:

John Cherouvim wrote:
...


Is there a possibility that there is a problem with the fact that I use:
IfModule mpm_prefork_module
   ...
  ServerLimit1024
  MaxClients 1024

and default Connector settings?
Connector port=8010 protocol=AJP/1.3 redirectPort=8443 
address=127.0.0.1 /


Do those 2 need to have the same thread count (MaxClients=maxThreads)?


I think you're on the right track there.
See the previous response from Mark :
...


My guess is that all of your Tomcat AJP threads are tied up with idle
httpd threads.


.. doing nothing.


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




--
Ioannis Cherouvim
Software Engineer
mail: j...@eworx.gr
web: www.eworx.gr


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



Re: An unexpected error has been detected by Java Runtime Environment:

2009-09-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tsirkin,

On 9/5/2009 2:59 PM, Tsirkin Evgeny wrote:
 So,it could be this since this sparc/solaris.
 Anyway it seems i can't do anything about it.

I would ask your hardware vendor to replace either the memory or the
entire machine.

 Another question is :
 Now i have one server running 32 java and another 64 ,would it be a
 problem in cluster?

As long as you are using an all-Java solution (and not some weird binary
clustering layer), it shouldn't be a problem: Java primitives are
defined independently of architecture and even JVM. If a 2-bit JVM
existed (you might call MS's JVM a 2-bit one ha ha), you should be able
to interoperate with it.


- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqpMMEACgkQ9CaO5/Lv0PAEzwCcCl9It/YXRLfHevUaXMuMdz6p
WqMAnjh06wPXMVDsTA1HnRL21Osr9vIB
=Ptj1
-END PGP SIGNATURE-

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



Re: Query on Tomcat Server.xml

2009-09-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bhuvanesh,

On 9/7/2009 12:00 AM, Pattanashetti wrote:
 I wanted to create connector using tomcat Apis.
 
 Connector conn = new Connector();
 conn.setPort(8070);
 
 service.addConnector(conn);
 
 This above code is working fine. I m able to access the appication with this
 connector port (8070).
 
 *But i wanted to configure the Https port in the same manner. *
 
 Connector class does not have* setKeyStoreFile* of 
 *setKeyStorePassword*method.
 
 I tried with connector.setAttribute(keystoreFile, filePath);
 
 But this is not working. :(
 
 Is there any specific way to for creating https connector using tomcat APIs?

I'm not going to read the APIs for you, you can read them yourself:
http://tomcat.apache.org/tomcat-6.0-doc/api/index.html

Specifically, I would look at the packages org.apache.catalina.connector
and org.apache.coyote.http11.

It would also help to look at the code Tomcat uses to build its own
connector objects in the org/apache/catalina/startup/Catalina.java and
org/apache/catalina/startup/ConnectorCreateRule.java files.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqpMrYACgkQ9CaO5/Lv0PC/pwCdEqd/onAuTnLKGnFjJQ9xi9yZ
5cMAoIG57tFJiGK//QOKXW6bpxnwBRde
=GuTF
-END PGP SIGNATURE-

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



Re: mod jk - multiple applications, different server clusers, sticky sessions

2009-09-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 9/7/2009 6:05 AM, Rainer Jung wrote:
 The code of mod_jk (1.2.28) looks for a URL encoded session id (and uses
 that one if it finds one) and otherwise it takes all cookie session ids
 it can find in the order of Cookie headers in the request.
 
 It then uses all the session ids in this order and searches for a usable
 worker (e.g. existing and not being in error or stopped) until it finds
 one or runs out of session ids.

Okay, so if you were foolish enough to have nested webapp paths, then
you'd be okay as long as the worker names didn't conflict, right?

That might mean you'd need different Connectors in order to satisfy
your nested-url-space requirement, but at least the behavior would be
predictable.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqpMzoACgkQ9CaO5/Lv0PBGRwCgtuOqeUYtM5v6k0JTbcw55pY9
Wq0AnjhRVt9s4Easg+e42a9TL66uFGYC
=Z8eI
-END PGP SIGNATURE-

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



Re: Need Help - Mod_jk/Apache - Mutiple Content issue

2009-09-10 Thread Rainer Jung
On 10.09.2009 14:46, balakarthik.baska...@wipro.com wrote:
 Hi Rainer,
 
 I did tried with a lot of combinations for the settings and can see that
 when recovery_options is set,no multiple content is seen and partial
 content is seen followed by an OK message when a huge chunk of data is
 written. However,the failover case didn't at all work out when the
 recovery_options is set.Pfa a doc with the scenarios that I tested and
 the results that I am seeing.
 
 However,in our prod envt,we currently have the reply_timeout and the
 recovery_options setting available and we have reomoved the
 socket_timeout.The recent behaviour that we are observing is,unlike the
 duplicate content with the header that we saw earlier with
 socket_timeout,we are seeing some of the content in the middle of the
 response being duplicated.
 
 We are making use of dynamic includes of the jsp files (with ATG dsp
 tags) and when I tried having the same in my local setup,I could see the
 response being written into the socket once the jsp completes.But not
 able to replicate a scenario of recreating multiple content from the
 middle of the page/content served by a fragment that is included.
 
 Pfa a file with the behaviour that I am noticing from the access and jk
 log files.For the test app,I could see only one GET request and a
 corresponding response in the jk log with the response time.I included
 one image and I can see a corresponding entry for the image as well in
 both files.However,there are no entries seen for the included jsp files.
 
 I am attaching the log entries from our prod envt as well which I took
 when I was able to see a timeout reply in the jk file.However,from the
 access log I couldn't interpret a corresponding entry/behaviour.Could
 you pl help on how the multiple content could have been occuring in the
 middle and your insights from the log files? (Also,pl note that we have
 currenlty turned off akamai in prod and the timeout is seen without
 akamai as well)

Let's start in the right way, first fix the configuration, then do and
analyze the tests, maybe resulting in more config optimization.

Please post your config. I had a quick look at the files you attached,
but it looks very much like we first need to improve the config, before
analyzing behaviour, that will likely not appear with the right config.

 Also,reg your explanation about akamai,I can contact akamai to find out
 if they can handle the prematurely closed data differently.Do you
 remember any setting to the browser to interpret this invalid data based
 on content length/premature closure?(just for testing though wouldn't
 apply to real life scenario)

No there is no such browser setting that I'm aware of. But akamai is not
a browser, its a server that behaves more like a cache. So they need to
solve a server problem, not an end user problem. They should immediately
invalidate content, that was delivered over a connection that had a
protocol abort.

 Thanks much for your help.I can give you a call if you would like to
 discuss this over phone. 

Lets first check the config, maybe then everything will be fine ;)

Regards,

Rainer

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



Re: avoiding ssl vulnerabilities in tomcat

2009-09-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sunil,

On 9/7/2009 10:18 AM, sunil chandran wrote:
 Hello all,
 As per the suggestion from tomcat forum users,I went ahead and installed 
 tomcat4.1.40
 Then i copied the original webapps file from the back up tomcat (old version).
 I tried to start the server. It shows this error

 Sep 7, 2009 10:13:11 PM org.apache.coyote.http11.Http11BaseProtocol
 initINFO: Initializing Coyote HTTP/1.1 on http-8080Sep 7, 2009
 10:13:12 PM org.apache.coyote.http11.Http11BaseProtocol initINFO:
 Initializing Coyote HTTP/1.1 on http-8443Starting service
 Tomcat-StandaloneApache Tomcat/4.1.40Catalina.start:
 LifecycleException:  Context startup failed due to previous
 errorsStopping service Tomcat-StandaloneCatalina.stop:
 LifecycleException:  Coyote connector has not been
 startedLifecycleException:  Coyote connector has not been started

Care to post the error messages from the other log file(s)?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqpM4kACgkQ9CaO5/Lv0PA4zQCfWSzGqfgBKUkMamg597bYZMoq
GxEAnibTiLlMo0SPhWm3YS6Mpp/EHsAo
=Z5Iv
-END PGP SIGNATURE-

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



Re: Database Connection Pooling initialization with dbcp

2009-09-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris,

On 9/9/2009 12:01 PM, Chris Wiley wrote:
 My question is this: Am I to assume that I need to OPEN and CLOSE x
 number of connections in the init section of the servlet to load the pool
 with live connections?

No, this can be done with configuration. Unless you have changed your
config, Tomcat uses commons-dbcp whose configuration reference can be
found here: http://commons.apache.org/dbcp/configuration.html

I think you want to take a look at the initialSize and minIdle
parameters.

Is there any reason why you absolutely need those connections to all be
available right away? Laziness can sometimes be beneficial... :)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqpNdkACgkQ9CaO5/Lv0PAZQACeMOlUmLcr/9eTfUTxeNuv1mpu
0pkAoLg8687dcxFcYa/Ki1aeApv8xELL
=WerZ
-END PGP SIGNATURE-

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



RE: Database Connection Pooling initialization with dbcp

2009-09-10 Thread Chris Wiley
Chris,

I think I am looking at it the wrong way. I have been looking at it as a
collection of static connections that are managed. i.e., putting 8
connections in an array or hashtable and grabbing them when needed and
letting something check them every so often to keep them refreshed. Earlier
in the post, Ziggy suggested that the pooling mechanism is a dynamic caching
system; and looking at it as a caching system is starting to make more sense
to me. The api makes more sense from this perspective. where it just keeps x
number of connections around at any given point in time. I don't have to
have connections from the get go, but it would be nice. That means the first
person to hit the app has to take the hit on the creation of the first
connection or two. Which, I suppose isn't bad.

As far as the initialSize parameter, do I just append those to the
datasource under the Resource element in the web.xml? and will that actually
create some initial connections in the pool? Do I need to set up init-params
and get them that way?  The thing about the configuration reference is that
I could not really tell where in the config to put those various elements,
maybe it doesn't matter.

-Chris



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, September 10, 2009 12:23 PM
To: Tomcat Users List
Cc: chriswile...@gmail.com
Subject: Re: Database Connection Pooling initialization with dbcp

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris,

On 9/9/2009 12:01 PM, Chris Wiley wrote:
 My question is this: Am I to assume that I need to OPEN and CLOSE x
 number of connections in the init section of the servlet to load the pool
 with live connections?

No, this can be done with configuration. Unless you have changed your
config, Tomcat uses commons-dbcp whose configuration reference can be
found here: http://commons.apache.org/dbcp/configuration.html

I think you want to take a look at the initialSize and minIdle
parameters.

Is there any reason why you absolutely need those connections to all be
available right away? Laziness can sometimes be beneficial... :)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqpNdkACgkQ9CaO5/Lv0PAZQACeMOlUmLcr/9eTfUTxeNuv1mpu
0pkAoLg8687dcxFcYa/Ki1aeApv8xELL
=WerZ
-END PGP SIGNATURE-

-
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: Database Connection Pooling initialization with dbcp

2009-09-10 Thread Caldarale, Charles R
 From: Chris Wiley [mailto:cwile...@comcast.net]
 Subject: RE: Database Connection Pooling initialization with dbcp
 
 As far as the initialSize parameter, do I just append those to the
 datasource under the Resource element in the web.xml?

Set the values as additional attributes in the Resource element.  E.g.,

Resource name=jdbc/TestDB auth=Container
  type=javax.sql.DataSource
  initialSize=10 maxActive=100
  maxIdle=30 minIdle=10 maxWait=1
  username=javauser password=javadude
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/

 will that actually create some initial connections in the pool?

It's broken if it doesn't.

You probably also want to specify validationQuery and testOnBorrow, in case the 
DB (or intervening firewall) drops connections on you.

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



Re: 100% usage and hanging on startup of Spring/Hibernate app in Tomcat 5.5 on Ubuntu 7

2009-09-10 Thread Bradley Wagner
I've tried each of the aforementioned GC options individually with the
following other parameters:
JAVA_OPTS=GC Param -Xms368m -Xmx512m -XX:MaxPermSize=128m -XX:+PrintGC
-XX:+PrintGCDetails -Djava.awt.headless=true -Dfile.encoding=UTF-8

The *only option* that did not cause the startup process to halt
indefinitely on startup was the Serial GC option. I tried this one on 4 or 5
successive attempts and the server started up in under 30s. The others
halted indefinitely (i.e. at least 5-10m before I finally killed the
process) during GC as an incomplete GC log statement was the last thing in
the catalina.out file.

- Does this indicate some kind of threading problem in this Java env?
- Does the option DoEscapeAnalysis still use a parallel gc?
- Is the experimental more similar to the parallel or the serial?

Thanks,
Bradley

On Thu, Sep 3, 2009 at 4:24 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Bradley Wagner [mailto:bradley.wag...@hannonhill.com]
  Subject: Re: 100% usage and hanging on startup of Spring/Hibernate app
  in Tomcat 5.5 on Ubuntu 7
 
  And again in a new place on subsequent attempt.

 There's nothing unusual that I can see in the traces, so it looks like you
 will have to try random GC settings until something works (as Mark suggested
 some time ago).  Try turning these tags on, one at a time:

 -XX:+UseParallelGC
 -XX:+UseParallelOldGC
 -XX:+UseSerialGC
 -XX:+DoEscapeAnalysis
 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

 The last one is somewhat experimental, as the parameter implies.

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




RE: 100% usage and hanging on startup of Spring/Hibernate app in Tomcat 5.5 on Ubuntu 7

2009-09-10 Thread Caldarale, Charles R
 From: Bradley Wagner [mailto:bradley.wag...@hannonhill.com]
 Subject: Re: 100% usage and hanging on startup of Spring/Hibernate app
 in Tomcat 5.5 on Ubuntu 7
 
 The *only option* that did not cause the startup process to 
 halt indefinitely on startup was the Serial GC option.

This is really weird.  Might be time to file a bug report with Sun.

 - Does this indicate some kind of threading problem in this Java env?

Hard to tell without a snapshot of what's going on inside the GC code (which is 
all C++, not Java).  Could also be a problem with Ubuntu.

 - Does the option DoEscapeAnalysis still use a parallel gc?

Should be independent of the GC algorithm; it's extra logic in the JIT that 
determines whether or not an object even needs to be allocated, or if it can 
simply reside on the method's stack.

 - Is the experimental more similar to the parallel or the serial?

My understanding is that G1GC is both parallel and concurrent.

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



Re: 100% usage and hanging on startup of Spring/Hibernate app in Tomcat 5.5 on Ubuntu 7

2009-09-10 Thread Bradley Wagner
A couple of other findings:
- Tomcat 5.5.28 out-of-the-box with its default webapps has no problem
starting with the default (parallel) gc
- As soon as I remove the default webapps, add ours, and modify the
context.xml file to provide it a DataSource, Tomcat hangs. We're definitely
loading a lot more into memory and inducing garbage collection with
Hibernate and Spring in the mix. I think I'm going to try a Hibernate or
Spring sample webapp to see if it has similar problems.

On Thu, Sep 10, 2009 at 4:43 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Bradley Wagner [mailto:bradley.wag...@hannonhill.com]
  Subject: Re: 100% usage and hanging on startup of Spring/Hibernate app
  in Tomcat 5.5 on Ubuntu 7
 
  The *only option* that did not cause the startup process to
  halt indefinitely on startup was the Serial GC option.

 This is really weird.  Might be time to file a bug report with Sun.

  - Does this indicate some kind of threading problem in this Java env?

 Hard to tell without a snapshot of what's going on inside the GC code
 (which is all C++, not Java).  Could also be a problem with Ubuntu.

  - Does the option DoEscapeAnalysis still use a parallel gc?

 Should be independent of the GC algorithm; it's extra logic in the JIT that
 determines whether or not an object even needs to be allocated, or if it can
 simply reside on the method's stack.

  - Is the experimental more similar to the parallel or the serial?

 My understanding is that G1GC is both parallel and concurrent.

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




Shared jars

2009-09-10 Thread Tim Berglund
I'm trying to enable the shared classloader on Tomcat 6.0.20 (Java 1.6.0_15
on Mac OSX 10.6). I've put this line in conf/catalina.properties:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

I've dumped a few dozen jars in the shared/lib directory. These are found
when I start Tomcat, but the jars in a deployed WAR are not found. The
problem manifests itself as a ClassNotFoundException on on
org.hibernate.SessionFactory, which is located in the web app's WEB-INF/lib
directory, and not the shared/lib directory. As a test, I added the web
app's lib dir to the shared loader, like this:

shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar,${catalina.base}/webapps/WorkList/WEB-INF/lib/*.jar

That's obviously bad as an actual fix, but the app loads in that
configuration. Any ideas? What I'd like is the shared class loader as a
supplement to the webapp classloader.

Many thanks for your help!

Tim Berglund