Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Filip Hanik Mailing Lists
Pretty much you're guaranteed to have a network problem at that point. You see 
Java caches DNS translations forever, and yanking VPN like that may change 
around IPs but the JVM is not aware of that. Wireshark would tell you that. Now 
relying in VPN is never a good thing, but maybe it's required. You could try
1. Use IP instead of host name in your jdbc URL
2. Configure the JRE to not cache dns lookups, (network.properties)


The error you see tells you that:
1. The pool doesn't have any idle established connections idle=0
2. The pool doesn't have any connections used by other threads busy=0
3. There is currently 1 thread trying to activate a connection size=1. The size 
is an atomic counter to protect against overuse in a lock free way. 


Filip



Hi Filip,

Today I have been trying to recreate the issue by disconnecting from the
vpn, as:
1.  Start app.  Pool creates some connections via the vpn.
2.  Test app a bit to execute sql queries.
3.  Shut down the vpn
4.  Force some more queries.  Predictably, connections fail and exceptions
show up in the logs.
5.  Restore vpn connection
6.  Check if pool creates new connections, which it does not.

I also upgraded to the latest pool available in maven
central: tomcat-jdbc-7.0.26.jar

I understand this could still be a connection leak in my application.  But
the new pool version logs an error I don't understand:
... stack trace ...
Caused by: java.sql.SQLException: [scheduler-low-1] Timeout: Pool empty.
Unable to fetch a connection in 10 seconds, none available[size:1; busy:0;
idle:0; lastwait:1].
... more trace ...

The relevant part of my current pool DataSource configuration:
removeAbandonedTimeout="10"
removeAbandoned="true"
logAbandoned="true"

defaultAutoCommit="false"
maxActive="1" maxIdle="1" minIdle="1" maxWait="1"
testOnBorrow="true"
validationQuery="SELECT 1"

I also have yet to see any "abandoned" log messages.

Should the pool always have at least 1 busy or idle connection?  If not
would it create another?

Thanks,
Colin




On Thu, Mar 22, 2012 at 11:11 AM, Filip Hanik Mailing Lists <
devli...@hanik.com> wrote:

> > Ultimately tho I'd still like to see some debug logging from the pool
> > itself.  Is there a simple way to turn it on?
>
> not to the problem you are looking at. if a connection got taken out of
> the pool, and it passed validation, then everything is ok.
> at this point the SQLException you get has all the data, and the problem
> is probably at the network level
>
> the fact that you see that for 2 hours and problem goes away with restart,
> that can only be the app holding on to the flawed connection, cause there
> would have been several validations during the 2 hour period :) I think
> there is a loop somewhere that when it fails it just retries and retries,
> logAbandoned will show that though.
>
> Filip
>
>
>
>
> - Original Message -
> > From: "Colin Ingarfield" 
> > To: "Tomcat Users List" 
> > Sent: Thursday, March 22, 2012 8:06:14 AM
> > Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat
> 6.0.32)
> >
> > Ah, Wireshark.  My friend calls it the "universal debugger". :)
> >
> > I will set the validation interval to 1 and keep an eye on the
> > network to
> > see what's going on.  I may also install MySql locally so I can kill
> > it
> > easily to try and simulation connection timeouts.  I won't really
> > feel this
> > is resolved until I can recreate the original issue.
> >
>
> >
> > Thanks,
> > Colin
> >
> > On Wed, Mar 21, 2012 at 11:20 AM, Filip Hanik Mailing Lists <
> > devli...@hanik.com> wrote:
> >
> > > it will take a while to see the abandoned log. I'm not implying
> > > every
> > > request hogs the connection, but that you could have ended up in a
> > > scenario
> > > where that did happen.
> > > otherwise, you would have not seen the problem for 2 hours and to
> > > go away
> > > when the system was restarted, as it should have failed on
> > > validation.
> > >
> > > You can enable validation every single time by doing
> > >
> > > validationInterval="1"
> > >
> > > after that, if it was me, I'd start pulling in something like
> > > Wireshark to
> > > see what is going on
> > >
> > > Filip
> > >
> > > - Original Message -
> > > > From: "Colin Ingarfield" 
> > > > To: "Tomcat Users List" 
> > > > Sent: Wednesday, March 21, 2012 10:11:43 AM
> > > > Subject: Re: how to enable debug logging for Tomcat jdbc pool
> > > > (Tomcat
> > > 6.0.32)
> > > >
> > > > I added the 3 abandoned settings but I don't see any indication
> > > > in
> > > > the
> > > > tomcat log that connections are being abandoned.  I also made the
> > > > max
> > > > pool
> > > > size pretty small.. my application would have failed quickly if
> > > > all
> > > > the
> > > > connections we're being incorrectly held up.
> > > >
> > > > Anything else I can try?  Thanks again for your  help.
> > > >
> > > > -- Colin
> > > >
> > > > On Wed, Mar 21, 2012 at 10:41 AM, Filip Hanik Mailing Lists <
> > > > devli...@hanik

Re: chunked encoding

2012-03-22 Thread Konstantin Kolinko
2012/3/23 Alex Samad - Yieldbroker :
> Hi
>
> I saw a thread earlier about chunked encoding and why
> a) it might be better to use that
> b) that it is not experimental any more
>
>
> Can somebody explain what it is, why it might be better and maybe some pro's 
> and con's and how not experimental is it.
>
> Even some pointers to papers, wiki's, blog that have been written would be 
> cool.
>

1. http://en.wikipedia.org/wiki/Chunked_transfer_encoding
2. RFC 2616 (the specification of HTTP/1.1 protocol)

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



chunked encoding

2012-03-22 Thread Alex Samad - Yieldbroker
Hi

I saw a thread earlier about chunked encoding and why
a) it might be better to use that
b) that it is not experimental any more


Can somebody explain what it is, why it might be better and maybe some pro's 
and con's and how not experimental is it.

Even some pointers to papers, wiki's, blog that have been written would be cool.

Current got ajp, with keep alive connections between iis and jboss

Alex

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



Re: Can't get past 404 error

2012-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 3/22/12 4:31 PM, David kerber wrote:
> P.S. If you want to review the details of my answers to Chris' 
> questions, they are in-line below.  I was checking things and
> answering the questions as I went along, so had most of them
> answered when I finally got things running.

Glad you got things working. See below for misc. comments:

>> If you have a WAR file, it should be inside there in 
>> META-INF/context.xml.
> 
> Ok, I haven't tried that.  I eventually need to deploy this same
> app as a different context path, so I probably won't put the
> context.xml in the .war file.

I would argue that you should put it into your WAR file and then copy
the WAR file around to different names for different contexts. You get
much more freedom that way.

> Yes, that's correct.  I'm not actually using the AJP connector
> AFAIK, but left it there since that's the default.  I have now
> removed it, just to clean things up a bit more.

Depending on certain factors, removing the AJP connector can save you
some (always idle) threads, a socket-binding and a bunch of file
descriptors. I think it makes sense to disable anything you aren't
using in general.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rnuwACgkQ9CaO5/Lv0PDMmgCfQJ/c0ZNfx7JmXS2xhTDONC1b
YTIAn1w/jEGN9uUWFITk8PB/7OzyDXZO
=gSjt
-END PGP SIGNATURE-

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



Re: Setup of workers.properties with multiple host and TC instances

2012-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

On 3/22/12 5:08 PM, Martin Registe, Jr. wrote:
>> First question: do all httpd instances know about all Tomcat
>> instances? Or, does httpd only know about the two instances that
>> are co-located with it on the same physical server?
> 
> Httpd only know about the two instances that re collocated with it
> on the same physical server

Okay.

>> If https only knows about its local 2 Tomcat instances, then
>> you'll only need 2 workers, etc. I have no idea how this could
>> possibly work with sticky sessions unless the hw lb knows how to
>> dispatch to the right http/2xTomcat physical server, in which
>> case you are wasting your time with all these extra processes.
> 
> The hw loadbalancer sends the traffic to 10.17.75.61 port 80... 
> apache takes it and using the workers.properties file sends it to
> one of TC instances then apache sends it back through the hw lb it
> has a sessionid and jvm tag on in the host header so it knows which
> jvm it came from

So, when a client first arrives, they are randomly-assigned an httpd
instance and then randomly-assigned a Tomcat instance that "belongs"
to that httpd instance. The hw lb later uses the "Host" header to
determine which httpd instance gets subsequent requests?

The "Host" header should include the IP address or hostname of the
target server. Are you telling the client that the Host changes when
they are assigned a Tomcat server? I still don't understand why you
don't just have a more-connected cluster where all httpds are
connected directly to all Tomcats.

>> What about ? It would be nice to confirm that your
>> jvmRoute(s) is(are) set correctly.
> 
> TC1 jvmRoute="jvm1"> TC2 defaultHost="localhost" jvmRoute="jvm2">

Looks good.

> My next thoughts I don't know exactly how this is working but it
> definitely is working and doesn't seem to be getting sessions
> jumping from one jvm to the other (on the same physical server).

Uh... okay. I thought you were coming here for help. Do you not
actually have a problem? If your boss simply suspects that there is a
problem, make him prove it via observations. You can't prove a
negative so it's his job to show you a problem, not your job to prove
that no problem exists.

> I will play around with the configuration some more but this has
> been working for over a year. You are saying if I just go with
> 
> worker.jvm1.type=ajp13 worker.jvm1.host=localhost 
> worker.jvm1.port=8019 worker.jvm1.lbfactor=10
> 
> worker.jvm2.type=ajp13 worker.jvm2.host=localhost 
> worker.jvm2.port=8029 worker.jvm2.lbfactor=10
> 
> worker.part.type=lb worker.part.balance_workers=jvm1,jvm2 
> worker.part.sticky_session=1
> 
> everything will continue to work, correct?

It should: you are simply balancing between two Tomcat instances and
using sticky sessions. It's about as simple a configuration as you can
have.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rneAACgkQ9CaO5/Lv0PA2GACeP3uB1M6znUXhcZO+FWxk5I8Y
tJ0AoK6MLicNEz/68bsJs0ZB50xJ9GGf
=pndJ
-END PGP SIGNATURE-

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



RE: Setup of workers.properties with multiple host and TC instances

2012-03-22 Thread Martin Registe, Jr.
Chris,

Let me see if I've got this straight. You've got:
* A hw load-balancer out front
* 5 physical servers each running:
 - 1 Apache httpd
 - 2 Tomcats

This allows you to have physical-server redundancy (x5) and also the ability to 
take one TC instance down on each server for maintenance while leaving the 
other one running. Right?

Answer
Yes this is correct

First question: do all httpd instances know about all Tomcat instances? Or, 
does httpd only know about the two instances that are co-located with it on 
the same physical server?

Answer
Httpd only know about the two instances that re collocated with it on the same 
physical server

If https only knows about its local 2 Tomcat instances, then you'll only need 2 
workers, etc. I have no idea how this could possibly work with sticky sessions 
unless the hw lb knows how to dispatch to the right http/2xTomcat physical 
server, in which case you are wasting your time with all these extra processes.

Answer
The hw loadbalancer sends the traffic to 10.17.75.61 port 80...
apache takes it and using the workers.properties file sends it to one of TC 
instances 
then apache sends it back through the hw lb it has a sessionid and jvm tag on 
in the host header so it knows which jvm it came from

What about ? It would be nice to confirm that your jvmRoute(s)
is(are) set correctly.

Answer
TC1
TC2

That depends. The host should always be "localhost", since your httpd instances 
only talk to the co-located Tomcats, right?

Answer
Yes

My next thoughts
I don't know exactly how this is working but it definitely is working and 
doesn't seem to be getting sessions jumping from one jvm to the other (on the 
same physical server).  I will play around with the configuration some more but 
this has been working for over a year.  You are saying if I just go with 

worker.jvm1.type=ajp13
worker.jvm1.host=localhost
worker.jvm1.port=8019
worker.jvm1.lbfactor=10

worker.jvm2.type=ajp13
worker.jvm2.host=localhost
worker.jvm2.port=8029
worker.jvm2.lbfactor=10

worker.part.type=lb
worker.part.balance_workers=jvm1,jvm2
worker.part.sticky_session=1
 
everything will continue to work, correct?

Thanks,
Martin

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



Re: Can't get past 404 error

2012-03-22 Thread David kerber
I'm being a bad boy by top-posting the final result here, because it 
turned out that none of the suggestions that Chris so kindly made after 
reading my long OP was the actual answer, but it pointed me to the 
problem which is now fixed and everything works.


I had upgraded the TC version from 5 to 6 to 7 over the course of the 
last year or so, and the last upgrade was long enough ago that I had 
forgotten about it when I wrote the OP.  When Chris mentioned copying 
web.xml from _HOME to _BASE, that got me to looking more closely at what 
I had copied over, and at that point noticed that I still had old stuff 
in _BASE\conf and that _BASE\shared existed and _BASE\lib did not. 
Copying those two directories over from _HOME got things working.



Thanks for your patience, Chris - it got me to the answer even though it 
was in a roundabout way.  As I thought it might, a 2nd set of eyes 
brought up some points that put me on the right track.


Dave


P.S. If you want to review the details of my answers to Chris' 
questions, they are in-line below.  I was checking things and answering 
the questions as I went along, so had most of them answered when I 
finally got things running.



On 3/22/2012 3:48 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 3/22/12 11:21 AM, David kerber wrote:

[I] can't get my opening page to load from:

http://localhost:81/SiteData/Login.jsp

Catalina_home is defined in tomcat7w as: -Dcatalina.home=C:\Program
Files\Apache Software Foundation\Tomcat 7.0

Catalina_base is -Dcatalina.base=c:\TomcatClients\Pelican

The application I'm testing is loaded from SiteData.war, which is
located in catalina.base\webapps.  The other one that is loading
below is failing too.


So you have C:\TomcatClients\Pelican\webapps\SiteData.war?


Yes





I have put a context.xml file in several different places:
catalina.base\webapps\SiteData\META-INF,


If you have a WAR file, it should be inside there in META-INF/context.xml.


Ok, I haven't tried that.  I eventually need to deploy this same app as 
a different context path, so I probably won't put the context.xml in the 
.war file.






catalina.home\conf\Catalina\localhost


I don't think you want anything at all in catalina.home.


This amounted to throwing things against the wall and seeing what stuck. 
 So far nothing has.






catalina.base\conf\Catalina\localhost


If you put it there, it should be called SiteData.xml. You have to
understand that this will trump the one in the WAR file unless you
undeploy and re-deploy.


It is; I forgot to specify that.





It contains:




If it's in your WAR file, you don't need docBase and should remove it.


Ok.





I initially had

path="/SiteData"

in the context entry, but reading the docs told me I needed to
remove it.


Good. It's never needed and may only confuse things.


  


So you have an HTTP connector and an AJP connector. Your URL above
shows that you are trying to access the file using port :81 and so are
trying to hit Tomcat directly, right?


Yes, that's correct.  I'm not actually using the AJP connector AFAIK, 
but left it there since that's the default.  I have now removed it, just 
to clean things up a bit more.






Log files:

localhost_access_log.: 127.0.0.1 - - [22/Mar/2012:10:57:59
-0400] "GET /SiteData/Login.jsp HTTP/1.1" 404 952


Is this log file from Tomcat or httpd?


Tomcat.  No httpd on this system.





catalina..log (note the "INFO: No global web.xml found"; is
that a problem?); the stderr log has the exact same info.

INFO: Deploying configuration descriptor
C:\TomcatClients\Pelican\conf\Catalina\localhost\SiteData.xml


Tomcat is certainly trying to deploy your webapp:


Mar 22, 2012 11:12:20 AM org.apache.catalina.startup.ContextConfig
getDefaultWebXmlFragment INFO: No global web.xml found


That probably is a problem. Is there a web.xml file in either of these
locations?

C:\TomcatClients\Pelican\conf\web.xml
C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\web.xml


There was in CATALINA_HOME\conf, but not CATALINA_BASE\conf, so I copied 
it there.





When I use CATALINA_BASE, I always make sure that I copy
CATALINA_HOME/conf/web.xml to CATALINA_BASE/conf/web.xml -- I'm not
sure if Tomcat will properly fall-back from CATALINA_BASE to
CATALINA_HOME but this is how we've been doing things for years... the
behavior may have changed.

If you don't have a global web.xml, then you won't have the JSPServlet
configured. I would have expected you to get JSP source sent to the
client in that case, but that's not what you are observing. Instead,
you're getting a 404.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rghAACgkQ9CaO5/Lv0PBEogCgqV8RU6WfCGHEH7pk6/Khjzai
NQEAoIEMt2zXeP5dzlr8TCBGKiUYIRXa
=c7X5
-END PGP SIGNATURE-

---

Re: Can't get past 404 error

2012-03-22 Thread Konstantin Kolinko
2012/3/22 Christopher Schultz :
>
>> Mar 22, 2012 11:12:20 AM org.apache.catalina.startup.ContextConfig
>> getDefaultWebXmlFragment INFO: No global web.xml found
>
> That probably is a problem. Is there a web.xml file in either of these
> locations?
>
> C:\TomcatClients\Pelican\conf\web.xml
> C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\web.xml
>
> When I use CATALINA_BASE, I always make sure that I copy
> CATALINA_HOME/conf/web.xml to CATALINA_BASE/conf/web.xml -- I'm not
> sure if Tomcat will properly fall-back from CATALINA_BASE to
> CATALINA_HOME but this is how we've been doing things for years... the
> behavior may have changed.
>

All of "/conf" folder is read from CATALINA_BASE.  None of it is read
from CATALINA_HOME.

Best regards,
Konstantin Kolinko

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



Re: [OT] Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread BFinkeldei
New Question that is related to the bin folder:

I extracted the missing items from the bin. and restarted and now Tom cat 
won't load any JSP's.  It will load servlets...just not jsp's

getting the following error:

It's throwing a 404 with this message: The requested resource (Servlet jsp 
is not available) is not available.



In the localhost.log and tomcat7-stdout..log  it throws this error.

SEVERE: Servlet /servlets-examples threw load() exception
java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.jasper.servlet.JspServlet




Brad Finkeldei
Systems Programmer 

Re: java.lang.IllegalStateException Question

2012-03-22 Thread Lobb, Janos

On Mar 22, 2012, at 11:31 AM, Pid wrote:

> On 22/03/2012 17:05, André Warnier wrote:
>> Pid wrote:
>>> On 22/03/2012 15:47, Lobb, Janos wrote:
 On Mar 22, 2012, at 7:40 AM, André Warnier wrote:
 
> Martin Gainty wrote:
>> Mitch
>> One possible cause
>> FE Application creates session
>> passes queryString or posted Data (hopefully in Sesion) to backend
>> Axis WebService
>> Objects are serialized to disk with existing JSESSIONID
>> FE times out
>> back end responds to a disconnected session and tries to re-create
>> session with old JSESSIONID
>> Illegal StateException is thrown when client tries to (re)create
>> new session with old serialized JSESSIONID
> +1
> I would add that the "illegal state" indicated by the error message
> is a special tomcat quantum state, resulting from a situation in
> which the response, while not being totally sent yet, is in fact
> partially sent already, causing a certain amount of probabilistic
> confusion a the level of the event horizon.
> This is caught by a hidden class in Tomcat, invoking a singleton
> object which writes a generally nonsensical message in one of the
> logs, chosen at random.
> Due to the nature of the error, it is of course extremely hard to
> reproduce, as one can find out either the exact time of the event,
> or its location, but not both.
> 
 Even if it is an "illegal state" it still should be either "clean" or
 "mixed".  If clean, then Integrate(fn*(q,p)fn(q,p)dpdq
 should give the exact probability and if it is in "mixed" then the
 diagonal fnm density matrix elements should do similarly.  Of course
 if it is at the event horizon, then all bets are off, because there
 is still now good theory combining quantum states with gravity :-)
>>> 
>>> All of this is irrelevant if the OP is not using the
>>> Http11QuantumConnector.
>>> 
>> 
>> He did not give us details of his configuration, so Janos and I were
>> talking in all generality.
>> 
>> Is the Http11QuantumConnector (finally) released ? 
> 
> I can't tell if it's in trunk or not.  I can look, but I can't check it
> out.  If I check it out, it's often not actually usable because the
> initInternal() method causes it to change state.
> 
> 
> 
> p
> 
>> The last time I
>> tested it, it was starting threads in random parallel universes, which
>> made it hard to collect the results and clean up afterward (and never
>> mind finding the logs).  Granted, heap memory was not an issue anymore,
>> but still I would not call this production-level code.
>> 
>> I think what we really need is a network trace. But a simple
>> back-of-the-hand calculation shows that to determine the precise cause
>> with a 3-sigma level of certainty, we would need a network trace
>> covering at least 7 X 10 exp 24 seconds, which unfortunately exceeds the
>> current high estimate of the age of the Universe by several magnitudes. 
>> The same calculation shows that Konstantin's earlier explanation has a
>> 99.87% probability of being closer to the truth.  So before setting up
>> the network trace, we would recommend to the OP to check Konstantin's
>> hypothesis, just in case.

Just a note to André.  I think Bell already closed out the "hidden class" case, 
minimum the local one, the one built into Tomcat.  So nonsensicality must be an 
"out from this world" experience.


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



Re: Setup of workers.properties with multiple host and TC instances

2012-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

On 3/22/12 1:18 PM, Martin Registe, Jr. wrote:
> How many *tomcat instances* do you have running ? And can you
> explain, in general terms, what you are trying to do ?
> 
> @Andre
> 
> I am trying to run two reduant tomcat instances that are each 
> running two reduant hosts on the same phyiscal server. I have 
> detailed it below.

Let me see if I've got this straight. You've got:

* A hw load-balancer out front
* 5 physical servers each running:
   - 1 Apache httpd
   - 2 Tomcats

This allows you to have physical-server redundancy (x5) and also the
ability to take one TC instance down on each server for maintenance
while leaving the other one running. Right?

I would argue that you should just take a whole server out of the lb
pool when you want to service it and not bother at all with httpd. If
your hw lb can't properly do stick-sessions, well then you'll still
have to have httpd involved but maybe you can eliminate one of the TC
instances per server by removing the one going down for maintenance
from the mod_jk worker pool.

Anyhow: your picture looks like this to me (hope the formatting
translates well):

/- x.y.145.61 : httpd + 2x Tomcat
lb < - x.y.154.62 : httpd + 2x Tomcat
 ...
\- x.y.154.65 : httpd + 2x Tomcat

First question: do all httpd instances know about all Tomcat
instances? Or, does httpd only know about the two instances that are
co-located with it on the same physical server?

If httpd knows about all Tomcat instances (x10), then you'll need
every httpd to have a workers.properties file with 10 workers defined
and all of them pooled. They all need distinct jvmRoutes.

If https only knows about its local 2 Tomcat instances, then you'll
only need 2 workers, etc. I have no idea how this could possibly work
with sticky sessions unless the hw lb knows how to dispatch to the
right http/2xTomcat physical server, in which case you are wasting
your time with all these extra processes.

> Then in the server.xml file OnTC1 for jvmRoute=jvm1 OnTC2 for
> jvmRoute=jvm2 And I have host entries for both in each server.xml 
>  autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 
> There are prameter and other stuff 
> 
>  autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 
> There are parameters and other stuff 

What about ? It would be nice to confirm that your jvmRoute(s)
is(are) set correctly.

> We have two redunant tomcat instances running on the same box.  So
> as long as there is not a problem on the physical server one of
> the tomcat instances will always be taking traffic.  There is a hw 
> loadbalancer that sits in front of all of this and there are 5
> other servers setup the same way the hw loadbalancer just directs
> traffic to the particular physical server where apache takes over.
> Each apache only works with its local (2)  tomcat instances.

That should have been the first thing you said.

If httpd only knows about its local 2 Tomcat instances, how do sticky
sessions work?

> In the workers.properties if I change .61 to 
> worker.jvm3.type=ajp13 worker.jvm3.host=10.17.75.61 
> worker.jvm3.port=8019 worker.jvm3.lbfactor=10
> 
> worker.jvm4.type=ajp13 worker.jvm4.host=10.17.75.61 
> worker.jvm4.port=8019 worker.jvm4.lbfactor=10
> 
> and add them to the lb setting worker.part.type=lb 
> worker.part.balance_workers=jvm1,jvm2,jvm3,jvm4 
> worker.part.sticky_session=1
> 
> will traffic get to right host?

That depends. The host should always be "localhost", since your httpd
instances only talk to the co-located Tomcats, right?

> Even though there is no jvmRoute for jvm3 and jvm4.

If httpd gets a request with a session id including a jvmroute, it
will attempt to locate the right worker and send the request to it. IF
you don't have a jvmRoute configured, then it won't work at all.

> I am trying to find a way, or prove that apache won't take a .61 
> request and send it to one of the .145 hosts or visa versa.

httpd will only send requests to Tomcat instances defined in
workers.properties. So, if you have 2 workers which are load-balanced,
you'll only be able to send traffic to those two workers.

You said this initially:

> My boss thinks that this is causing sessions to jump between the
> two ip addresses on the same jvm.

First, it shouldn't matter which IP address gets used since the
requests all go to the same place. Second, there's no reason to have a
hostname other than "localhost" when you are communicating between
httpd and Tomcat on the same physical server. Why bother with IP
addresses? Third, I would be more worried in your environment about
requests being served by a random httpd/2xTomcat team by your hw lb.

I'm totally confused, here.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rhd4ACgkQ9CaO5/Lv0PBPgQCfTreX+vpBaKj03rN8ojsTWtOZ

Re: Can't get past 404 error

2012-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 3/22/12 11:21 AM, David kerber wrote:
> [I] can't get my opening page to load from:
> 
> http://localhost:81/SiteData/Login.jsp
> 
> Catalina_home is defined in tomcat7w as: -Dcatalina.home=C:\Program
> Files\Apache Software Foundation\Tomcat 7.0
> 
> Catalina_base is -Dcatalina.base=c:\TomcatClients\Pelican
> 
> The application I'm testing is loaded from SiteData.war, which is 
> located in catalina.base\webapps.  The other one that is loading
> below is failing too.

So you have C:\TomcatClients\Pelican\webapps\SiteData.war?

> I have put a context.xml file in several different places: 
> catalina.base\webapps\SiteData\META-INF,

If you have a WAR file, it should be inside there in META-INF/context.xml.

> catalina.home\conf\Catalina\localhost

I don't think you want anything at all in catalina.home.

> catalina.base\conf\Catalina\localhost

If you put it there, it should be called SiteData.xml. You have to
understand that this will trump the one in the WAR file unless you
undeploy and re-deploy.

> It contains:
> 
>  reloadable="true" crossContext="false" 

If it's in your WAR file, you don't need docBase and should remove it.

> I initially had
> 
> path="/SiteData"
> 
> in the context entry, but reading the docs told me I needed to
> remove it.

Good. It's never needed and may only confuse things.

>  redirectPort="8443" />  redirectPort="8443" />

So you have an HTTP connector and an AJP connector. Your URL above
shows that you are trying to access the file using port :81 and so are
trying to hit Tomcat directly, right?

> Log files:
> 
> localhost_access_log.: 127.0.0.1 - - [22/Mar/2012:10:57:59
> -0400] "GET /SiteData/Login.jsp HTTP/1.1" 404 952

Is this log file from Tomcat or httpd?

> catalina..log (note the "INFO: No global web.xml found"; is
> that a problem?); the stderr log has the exact same info.
> 
> INFO: Deploying configuration descriptor 
> C:\TomcatClients\Pelican\conf\Catalina\localhost\SiteData.xml

Tomcat is certainly trying to deploy your webapp:

> Mar 22, 2012 11:12:20 AM org.apache.catalina.startup.ContextConfig 
> getDefaultWebXmlFragment INFO: No global web.xml found

That probably is a problem. Is there a web.xml file in either of these
locations?

C:\TomcatClients\Pelican\conf\web.xml
C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\web.xml

When I use CATALINA_BASE, I always make sure that I copy
CATALINA_HOME/conf/web.xml to CATALINA_BASE/conf/web.xml -- I'm not
sure if Tomcat will properly fall-back from CATALINA_BASE to
CATALINA_HOME but this is how we've been doing things for years... the
behavior may have changed.

If you don't have a global web.xml, then you won't have the JSPServlet
configured. I would have expected you to get JSP source sent to the
client in that case, but that's not what you are observing. Instead,
you're getting a 404.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rghAACgkQ9CaO5/Lv0PBEogCgqV8RU6WfCGHEH7pk6/Khjzai
NQEAoIEMt2zXeP5dzlr8TCBGKiUYIRXa
=c7X5
-END PGP SIGNATURE-

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



Re: [OT] Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread Pid
On 22/03/2012 20:03, André Warnier wrote:
> bfinkel...@aaamissouri.com wrote:
>> my system time was messed up and ahead.  I think this could have
>> caused the issue.  I updated my system time.
>>
> Good that you waited before posting this message, or you could have
> ended up ahead of yourself. Did you have a look over your shoulder ?

That would only work if he was the first one.  He should check in front
as well.


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: java.lang.IllegalStateException Question

2012-03-22 Thread Pid
On 22/03/2012 21:12, Mark Eggers wrote:
>> 
>> From: Christopher Schultz 
>> To: Tomcat Users List  
>> Sent: Thursday, March 22, 2012 5:35 AM
>> Subject: Re: java.lang.IllegalStateException Question
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Mark,
>>
>> On 3/22/12 8:15 AM, Mark Thomas wrote:
>>> On 22/03/2012 11:40, André Warnier wrote:
 Martin Gainty wrote:
> Mitch One possible cause
>
> FE Application creates session passes queryString or posted
> Data (hopefully in Sesion) to backend Axis WebService Objects
> are serialized to disk with existing JSESSIONID FE times out 
> back end responds to a disconnected session and tries to
> re-create session with old JSESSIONID Illegal StateException is
> thrown when client tries to (re)create new session with old
> serialized JSESSIONID
>
 +1 I would add that the "illegal state" indicated by the error
 message is a special tomcat quantum state, resulting from a
 situation in which the response, while not being totally sent
 yet, is in fact partially sent already, causing a certain amount
 of probabilistic confusion a the level of the event horizon. This
 is caught by a hidden class in Tomcat, invoking a singleton
 object which writes a generally nonsensical message in one of the
 logs, chosen at random. Due to the nature of the error, it is of
 course extremely hard to reproduce, as one can find out either
 the exact time of the event, or its location, but not both.
>>>
>>> And for those of your reading the archives not familiar with some
>>> of our better known characters, Martin - as usual - is talking
>>> complete and utter nonsense and André - if it wasn't obvious - is
>>> taking the mickey.
>>
>> And for those reading the archives who aren't familiar with British
>> slang, "taking the mickey" means - if it wasn't obvious - "making fun
>> of him".
>>
>>> If you need the real answer, take a look at Konstantin's earlier
>>> reply. If you want a good laugh, then this thread certainly has
>>> some potential.
>>
>> There's a QED joke in there somewhere, but my energy level this
>> morning is too low to allow for a change in states.
>>
>> - -chris
> 
> 
> You could always tunnel.

Not *always*, surely?


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: java.lang.IllegalStateException Question

2012-03-22 Thread Mark Eggers
>
> From: Christopher Schultz 
>To: Tomcat Users List  
>Sent: Thursday, March 22, 2012 5:35 AM
>Subject: Re: java.lang.IllegalStateException Question
> 
>-BEGIN PGP SIGNED MESSAGE-
>Hash: SHA1
>
>Mark,
>
>On 3/22/12 8:15 AM, Mark Thomas wrote:
>> On 22/03/2012 11:40, André Warnier wrote:
>>> Martin Gainty wrote:
 Mitch One possible cause
 
 FE Application creates session passes queryString or posted
 Data (hopefully in Sesion) to backend Axis WebService Objects
 are serialized to disk with existing JSESSIONID FE times out 
 back end responds to a disconnected session and tries to
 re-create session with old JSESSIONID Illegal StateException is
 thrown when client tries to (re)create new session with old
 serialized JSESSIONID
 
>>> +1 I would add that the "illegal state" indicated by the error
>>> message is a special tomcat quantum state, resulting from a
>>> situation in which the response, while not being totally sent
>>> yet, is in fact partially sent already, causing a certain amount
>>> of probabilistic confusion a the level of the event horizon. This
>>> is caught by a hidden class in Tomcat, invoking a singleton
>>> object which writes a generally nonsensical message in one of the
>>> logs, chosen at random. Due to the nature of the error, it is of
>>> course extremely hard to reproduce, as one can find out either
>>> the exact time of the event, or its location, but not both.
>> 
>> And for those of your reading the archives not familiar with some
>> of our better known characters, Martin - as usual - is talking
>> complete and utter nonsense and André - if it wasn't obvious - is
>> taking the mickey.
>
>And for those reading the archives who aren't familiar with British
>slang, "taking the mickey" means - if it wasn't obvious - "making fun
>of him".
>
>> If you need the real answer, take a look at Konstantin's earlier
>> reply. If you want a good laugh, then this thread certainly has
>> some potential.
>
>There's a QED joke in there somewhere, but my energy level this
>morning is too low to allow for a change in states.
>
>- -chris


You could always tunnel.

/mde/

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



RE: Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread Caldarale, Charles R
> From: bfinkel...@aaamissouri.com [mailto:bfinkel...@aaamissouri.com] 
> Subject: RE: Catalina.bat Not in BIN folder install of 7.0.23

> Since I already installed it yesterday  can i just extract the zip 
> file over my current install and remake my changes?

In all the excitement about time travel, I guess we forgot to answer your 
question...

Yes, you can do that.  Or, even more simply, just pull the .bat scripts out of 
the .zip file and put them in Tomcat's bin directory.

 - 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: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Colin Ingarfield
Hi Filip,

Today I have been trying to recreate the issue by disconnecting from the
vpn, as:
1.  Start app.  Pool creates some connections via the vpn.
2.  Test app a bit to execute sql queries.
3.  Shut down the vpn
4.  Force some more queries.  Predictably, connections fail and exceptions
show up in the logs.
5.  Restore vpn connection
6.  Check if pool creates new connections, which it does not.

I also upgraded to the latest pool available in maven
central: tomcat-jdbc-7.0.26.jar

I understand this could still be a connection leak in my application.  But
the new pool version logs an error I don't understand:
... stack trace ...
Caused by: java.sql.SQLException: [scheduler-low-1] Timeout: Pool empty.
Unable to fetch a connection in 10 seconds, none available[size:1; busy:0;
idle:0; lastwait:1].
... more trace ...

The relevant part of my current pool DataSource configuration:
removeAbandonedTimeout="10"
removeAbandoned="true"
logAbandoned="true"

defaultAutoCommit="false"
maxActive="1" maxIdle="1" minIdle="1" maxWait="1"
testOnBorrow="true"
validationQuery="SELECT 1"

I also have yet to see any "abandoned" log messages.

Should the pool always have at least 1 busy or idle connection?  If not
would it create another?

Thanks,
Colin




On Thu, Mar 22, 2012 at 11:11 AM, Filip Hanik Mailing Lists <
devli...@hanik.com> wrote:

> > Ultimately tho I'd still like to see some debug logging from the pool
> > itself.  Is there a simple way to turn it on?
>
> not to the problem you are looking at. if a connection got taken out of
> the pool, and it passed validation, then everything is ok.
> at this point the SQLException you get has all the data, and the problem
> is probably at the network level
>
> the fact that you see that for 2 hours and problem goes away with restart,
> that can only be the app holding on to the flawed connection, cause there
> would have been several validations during the 2 hour period :) I think
> there is a loop somewhere that when it fails it just retries and retries,
> logAbandoned will show that though.
>
> Filip
>
>
>
>
> - Original Message -
> > From: "Colin Ingarfield" 
> > To: "Tomcat Users List" 
> > Sent: Thursday, March 22, 2012 8:06:14 AM
> > Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat
> 6.0.32)
> >
> > Ah, Wireshark.  My friend calls it the "universal debugger". :)
> >
> > I will set the validation interval to 1 and keep an eye on the
> > network to
> > see what's going on.  I may also install MySql locally so I can kill
> > it
> > easily to try and simulation connection timeouts.  I won't really
> > feel this
> > is resolved until I can recreate the original issue.
> >
>
> >
> > Thanks,
> > Colin
> >
> > On Wed, Mar 21, 2012 at 11:20 AM, Filip Hanik Mailing Lists <
> > devli...@hanik.com> wrote:
> >
> > > it will take a while to see the abandoned log. I'm not implying
> > > every
> > > request hogs the connection, but that you could have ended up in a
> > > scenario
> > > where that did happen.
> > > otherwise, you would have not seen the problem for 2 hours and to
> > > go away
> > > when the system was restarted, as it should have failed on
> > > validation.
> > >
> > > You can enable validation every single time by doing
> > >
> > > validationInterval="1"
> > >
> > > after that, if it was me, I'd start pulling in something like
> > > Wireshark to
> > > see what is going on
> > >
> > > Filip
> > >
> > > - Original Message -
> > > > From: "Colin Ingarfield" 
> > > > To: "Tomcat Users List" 
> > > > Sent: Wednesday, March 21, 2012 10:11:43 AM
> > > > Subject: Re: how to enable debug logging for Tomcat jdbc pool
> > > > (Tomcat
> > > 6.0.32)
> > > >
> > > > I added the 3 abandoned settings but I don't see any indication
> > > > in
> > > > the
> > > > tomcat log that connections are being abandoned.  I also made the
> > > > max
> > > > pool
> > > > size pretty small.. my application would have failed quickly if
> > > > all
> > > > the
> > > > connections we're being incorrectly held up.
> > > >
> > > > Anything else I can try?  Thanks again for your  help.
> > > >
> > > > -- Colin
> > > >
> > > > On Wed, Mar 21, 2012 at 10:41 AM, Filip Hanik Mailing Lists <
> > > > devli...@hanik.com> wrote:
> > > >
> > > > > Got it, thank you.
> > > > > The other way this can happen is if the application checks out
> > > > > a
> > > > > connection and then never returns it, and expects it to be
> > > > > used.
> > > > > For this you will want to enable
> > > > >
> > > > > removeAbandonedTimeout="60"
> > > > > removeAbandoned="true"
> > > > > logAbandoned="true"
> > > > >
> > > > > this should tell you pretty quickly if you got a component that
> > > > > is
> > > > > hogging
> > > > > the connection. So test that first. Now if that is the case,
> > > > > there
> > > > > is a way
> > > > > to fix that:
> > > > >
> > > > > 1. remove the above settings
> > > > > 2. compile and configure the interceptor described in:
> > > > >   https://issues.apa

Re: [OT] Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread André Warnier

bfinkel...@aaamissouri.com wrote:
my system time was messed up and ahead.  I think this could have caused 
the issue.  I updated my system time.


Good that you waited before posting this message, or you could have ended up ahead of 
yourself. Did you have a look over your shoulder ?


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



RE: Setup of workers.properties with multiple host and TC instances

2012-03-22 Thread Martin Registe, Jr.
How many *tomcat instances* do you have running ?
And can you explain, in general terms, what you are trying to do ?

@Andre

I am trying to run two reduant tomcat instances that are each running two 
reduant hosts on the same phyiscal server.  I have detailed it below.  

On one physical server I am running two tomcat instances
TC1 - 8019 .145\.61
TC2 - 8029 145.\.61

On the same physical server I have apache which I have two virtual sites 
running on 
Site1 - 10.17.75.145
Site2 - 10.17.75.61
Inside of each virtal host entry in apache I currently have them both mounting 
jkmount /* part
Then in workers.properties
I have the setup
worker.list=part
#worker.list=worker1, worker2

#
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
#
worker.jvm1.type=ajp13
worker.jvm1.host=10.17.75.145
worker.jvm1.port=8019
worker.jvm1.lbfactor=10

worker.jvm2.type=ajp13
worker.jvm2.host=10.17.75.145
worker.jvm2.port=8029
worker.jvm2.lbfactor=10

worker.jvm1.type=ajp13
worker.jvm1.host=10.17.75.61
worker.jvm1.port=8019
worker.jvm1.lbfactor=10

worker.jvm2.type=ajp13
worker.jvm2.host=10.17.75.61
worker.jvm2.port=8029
worker.jvm2.lbfactor=10

worker.part.type=lb
worker.part.balance_workers=jvm1,jvm2
worker.part.sticky_session=1

Then in the server.xml file
OnTC1 for jvmRoute=jvm1
OnTC2 for jvmRoute=jvm2
And I have host entries for both in each server.xml
  
   There are prameter and other stuff
  

  
There are parameters and other stuff
  

We have two redunant tomcat instances running on the same box.  So as long as 
there is not a problem on the physical server one of the tomcat instances will 
always be taking traffic.  There is a hw loadbalancer that sits in front of all 
of this and there are 5 other servers setup the same way the hw loadbalancer 
just directs traffic to the particular physical server where apache takes over. 
 Each apache only works with its local (2)  tomcat instances.

In the workers.properties if I change .61 to
worker.jvm3.type=ajp13
worker.jvm3.host=10.17.75.61
worker.jvm3.port=8019
worker.jvm3.lbfactor=10

worker.jvm4.type=ajp13
worker.jvm4.host=10.17.75.61
worker.jvm4.port=8019
worker.jvm4.lbfactor=10

and add them to the lb setting
worker.part.type=lb
worker.part.balance_workers=jvm1,jvm2,jvm3,jvm4
worker.part.sticky_session=1

will traffic get to right host?  Even though there is no jvmRoute for jvm3 and 
jvm4.  Does the worker..host=10.17.75.61 play a part in this at all?  

@TM
I looked at the modjk.log and I do see the duplicate errors so I defiantly need 
to fix that.  I should have explained that I am running two reduant tomcat 
instances on the same phyical box and they are listening to 8019 and 8029 
already.  I am trying to find a way, or prove that apache won't take a .61 
request and send it to one of the .145 hosts or visa versa.  Eveything looks to 
be working okay with the current config)other than the duplicate errors in 
the modjk.log file) but I need more info

Thanks,
Martin

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



RE: [OT] Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com] 
> Subject: Re: [OT] Catalina.bat Not in BIN folder install of 7.0.23


> For unexplained reasons also, your response seems to be dated about 
> 16 minutes before the original OP's question.  Spooky.

Odd, because I only answered it 10 minutes before, according to the marc.info 
archive...

> Or is this just because we've just be talking about quantum stuff 
> on the list ? (Or will talk about it shortly).

I think that's "we will have been talking".  (Isn't English wonderful?)

 - 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: [OT] Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread BFinkeldei
my system time was messed up and ahead.  I think this could have caused 
the issue.  I updated my system time.

Brad Finkeldei
Systems Programmer - Websphere
AAA Missouri
12901 N Forty Drive
St. Louis, MO 63141

314-523-7350, extension 8377



André Warnier  
03/22/2012 11:38 AM
Please respond to
"Tomcat Users List" 


To
Tomcat Users List 
cc

Subject
Re: [OT] Catalina.bat Not in BIN folder install of 7.0.23






Pid wrote:
> On 22/03/2012 18:34, bfinkel...@aaamissouri.com wrote:
>> Chuck,
>> Thaks for the info.. Was banging my head up against this cube wall! :)
>>
>> However I don't see a windows installer for the x86 side on the tomcat 
>> site.  Is there  windows installer with all these as well? If so do you 

>> have a link?  can't seem to find one.
> 
> The options are listed under 'Core'.
> 
> Chuck is suggesting you download the zip, rather than the installer, as
> this is version with the .bat files.
> 
>  http://tomcat.apache.org/download-70.cgi
> 

You too..
Guys, have prescient people of the list is definitely an advantage, but it 
doesn't make 
following the conversation any easier.
I just checked, but none of you has anwered /my/ messages ahead of time. 
Is it something 
you can just turn on and off ?

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




Re: [OT] Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread André Warnier

Pid wrote:

On 22/03/2012 18:34, bfinkel...@aaamissouri.com wrote:

Chuck,
Thaks for the info.. Was banging my head up against this cube wall! :)

However I don't see a windows installer for the x86 side on the tomcat 
site.  Is there  windows installer with all these as well? If so do you 
have a link?  can't seem to find one.


The options are listed under 'Core'.

Chuck is suggesting you download the zip, rather than the installer, as
this is version with the .bat files.

 http://tomcat.apache.org/download-70.cgi



You too..
Guys, have prescient people of the list is definitely an advantage, but it doesn't make 
following the conversation any easier.
I just checked, but none of you has anwered /my/ messages ahead of time.  Is it something 
you can just turn on and off ?


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



Re: [OT] Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread André Warnier

Caldarale, Charles R wrote:
From: bfinkel...@aaamissouri.com [mailto:bfinkel...@aaamissouri.com] 
Subject: Catalina.bat Not in BIN folder install of 7.0.23


I just installed Tomcat 7.0.23 and went to configure the 
catalina.bat file on a Windows machine and I can not find

any of the files there.


For reasons that I've never seen explained, the .bat files are not included in 
the .exe downloads, but only in the .zip ones.  Grab that one instead.



For unexplained reasons also, your response seems to be dated about 16 minutes before the 
original OP's question.  Spooky.

I have a friend who works for a hedge fund.  Care to have a chat about this 
off-list ?
Or is this just because we've just be talking about quantum stuff on the list ? (Or will 
talk about it shortly).


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



RE: Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread BFinkeldei
Chuck,
Thanks for the help!  Since I already installed it yesterday  can i just 
extract the zip file over my current install and remake my changes?

Brad Finkeldei
Systems Programmer - Websphere
AAA Missouri
12901 N Forty Drive
St. Louis, MO 63141

314-523-7350, extension 8377

RE: Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread Caldarale, Charles R
> From: bfinkel...@aaamissouri.com [mailto:bfinkel...@aaamissouri.com] 
> Subject: Re: Catalina.bat Not in BIN folder install of 7.0.23

> However I don't see a windows installer for the x86 side on the tomcat 
> site.  Is there  windows installer with all these as well?

Just download the .zip file, expand it to wherever you want, and run the 
install.bat script.

 - 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: Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread Pid
On 22/03/2012 18:34, bfinkel...@aaamissouri.com wrote:
> Chuck,
> Thaks for the info.. Was banging my head up against this cube wall! :)
> 
> However I don't see a windows installer for the x86 side on the tomcat 
> site.  Is there  windows installer with all these as well? If so do you 
> have a link?  can't seem to find one.

The options are listed under 'Core'.

Chuck is suggesting you download the zip, rather than the installer, as
this is version with the .bat files.

 http://tomcat.apache.org/download-70.cgi



p

> Brad Finkeldei
> Systems Programmer - Websphere
> AAA Missouri
> 12901 N Forty Drive
> St. Louis, MO 63141
> 
> 314-523-7350, extension 8377
> 
> 
> 
> bfinkel...@aaamissouri.com 
> 03/22/2012 11:18 AM
> Please respond to
> "Tomcat Users List" 
> 
> 
> To
> users@tomcat.apache.org
> cc
> 
> Subject
> Catalina.bat Not in BIN folder install of 7.0.23
> 
> 
> 
> 
> 
> 
> I just installed Tomcat 7.0.23 and went to configure the catalina.bat file 
> 
> on a Windows machine and I can not find any of the files there.  I don't 
> see it removed in the change log...or i missed that.
> 
> Any idea?
> Where should it be?
> Can I just bring over the catalina.bat file from a 7.0.22 install and use 
> it on 7.0.23?
> 
> Thanks,
> 
> Brad Finkeldei
> 
> 
> 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread BFinkeldei
Chuck,
Thaks for the info.. Was banging my head up against this cube wall! :)

However I don't see a windows installer for the x86 side on the tomcat 
site.  Is there  windows installer with all these as well? If so do you 
have a link?  can't seem to find one.


Brad Finkeldei
Systems Programmer - Websphere
AAA Missouri
12901 N Forty Drive
St. Louis, MO 63141

314-523-7350, extension 8377



bfinkel...@aaamissouri.com 
03/22/2012 11:18 AM
Please respond to
"Tomcat Users List" 


To
users@tomcat.apache.org
cc

Subject
Catalina.bat Not in BIN folder install of 7.0.23






I just installed Tomcat 7.0.23 and went to configure the catalina.bat file 

on a Windows machine and I can not find any of the files there.  I don't 
see it removed in the change log...or i missed that.

Any idea?
Where should it be?
Can I just bring over the catalina.bat file from a 7.0.22 install and use 
it on 7.0.23?

Thanks,

Brad Finkeldei




Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Filip Hanik Mailing Lists
> Ultimately tho I'd still like to see some debug logging from the pool
> itself.  Is there a simple way to turn it on?

not to the problem you are looking at. if a connection got taken out of the 
pool, and it passed validation, then everything is ok.
at this point the SQLException you get has all the data, and the problem is 
probably at the network level

the fact that you see that for 2 hours and problem goes away with restart, that 
can only be the app holding on to the flawed connection, cause there would have 
been several validations during the 2 hour period :) I think there is a loop 
somewhere that when it fails it just retries and retries, logAbandoned will 
show that though.

Filip




- Original Message -
> From: "Colin Ingarfield" 
> To: "Tomcat Users List" 
> Sent: Thursday, March 22, 2012 8:06:14 AM
> Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)
> 
> Ah, Wireshark.  My friend calls it the "universal debugger". :)
> 
> I will set the validation interval to 1 and keep an eye on the
> network to
> see what's going on.  I may also install MySql locally so I can kill
> it
> easily to try and simulation connection timeouts.  I won't really
> feel this
> is resolved until I can recreate the original issue.
> 

> 
> Thanks,
> Colin
> 
> On Wed, Mar 21, 2012 at 11:20 AM, Filip Hanik Mailing Lists <
> devli...@hanik.com> wrote:
> 
> > it will take a while to see the abandoned log. I'm not implying
> > every
> > request hogs the connection, but that you could have ended up in a
> > scenario
> > where that did happen.
> > otherwise, you would have not seen the problem for 2 hours and to
> > go away
> > when the system was restarted, as it should have failed on
> > validation.
> >
> > You can enable validation every single time by doing
> >
> > validationInterval="1"
> >
> > after that, if it was me, I'd start pulling in something like
> > Wireshark to
> > see what is going on
> >
> > Filip
> >
> > - Original Message -
> > > From: "Colin Ingarfield" 
> > > To: "Tomcat Users List" 
> > > Sent: Wednesday, March 21, 2012 10:11:43 AM
> > > Subject: Re: how to enable debug logging for Tomcat jdbc pool
> > > (Tomcat
> > 6.0.32)
> > >
> > > I added the 3 abandoned settings but I don't see any indication
> > > in
> > > the
> > > tomcat log that connections are being abandoned.  I also made the
> > > max
> > > pool
> > > size pretty small.. my application would have failed quickly if
> > > all
> > > the
> > > connections we're being incorrectly held up.
> > >
> > > Anything else I can try?  Thanks again for your  help.
> > >
> > > -- Colin
> > >
> > > On Wed, Mar 21, 2012 at 10:41 AM, Filip Hanik Mailing Lists <
> > > devli...@hanik.com> wrote:
> > >
> > > > Got it, thank you.
> > > > The other way this can happen is if the application checks out
> > > > a
> > > > connection and then never returns it, and expects it to be
> > > > used.
> > > > For this you will want to enable
> > > >
> > > > removeAbandonedTimeout="60"
> > > > removeAbandoned="true"
> > > > logAbandoned="true"
> > > >
> > > > this should tell you pretty quickly if you got a component that
> > > > is
> > > > hogging
> > > > the connection. So test that first. Now if that is the case,
> > > > there
> > > > is a way
> > > > to fix that:
> > > >
> > > > 1. remove the above settings
> > > > 2. compile and configure the interceptor described in:
> > > >   https://issues.apache.org/bugzilla/show_bug.cgi?id=52024
> > > > In this interceptor, when a failure occurs, it automatically
> > > > reconnects
> > > > and retries the operation. And that is the only way to get
> > > > around
> > > > the
> > > > problem (assuming my assumption is correct)
> > > >
> > > >
> > > > Filip
> > > > - Original Message -
> > > > > From: "Colin Ingarfield" 
> > > > > To: users@tomcat.apache.org
> > > > > Sent: Wednesday, March 21, 2012 9:30:46 AM
> > > > > Subject: Re: how to enable debug logging for Tomcat jdbc pool
> > > > > (Tomcat
> > > > 6.0.32)
> > > > >
> > > > > My configuration:
> > > > >
> > > > > > > > > name="jdbc/cdb.mysql"
> > > > > defaultAutoCommit="false"
> > > > > driverClassName="com.mysql.jdbc.Driver"
> > > > > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> > > > > url="jdbc:mysql://X.com/_dev?sessionVariables=TRANSACTION
> > > > > ISOLATION LEVEL READ COMMITTED"
> > > > > username="X"
> > > > > password="X"
> > > > >
> > > > > maxActive="100"
> > > > > maxIdle="100"
> > > > > minIdle="10"
> > > > > initialSize="10"
> > > > > maxWait="1"
> > > > > testOnBorrow="true"
> > > > > type="javax.sql.DataSource"
> > > > > validationQuery="SELECT 1"/>
> > > > >
> > > > >
> > > > > I have testOnBorrow and validationQuery set as you suggest,
> > > > > so I
> > > > > do
> > > > > not
> > > > > think that is the issue.
> > > > >
> > > > > Thanks,
> > > > > Colin
> > > > >
> > > >
> > > > ---

Re: Operation has timed out(3000 ms.).;

2012-03-22 Thread Filip Hanik Mailing Lists
take a look at the  attribute

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-sender.html



- Original Message -
> From: "Dhaval Jaiswal" 
> To: "Tomcat Users List" 
> Sent: Wednesday, March 21, 2012 10:35:14 PM
> Subject: Operation has timed out(3000 ms.).;
> 
> Receiving below errors in catalina log. I have changed the backup
> manager
> value of dropTime="3000" to "1" with restart of tomcats. However,
> still
> it is not taking effect & notifying that Operation has timed out(3000
> ms.)
> Please guide me where should i look to stop this messages.
> 
> 
> SEVERE: Unable to send message through cluster sender.
> org.apache.catalina.tribes.ChannelException: Operation has timed
> out(3000
> ms.).; Faulty members:tcp://{-64, -88, 3, 6}:4000;
> at
> org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(ParallelNioSender.java:97)
> at
> org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessage(PooledParallelSender.java:53)
> at
> org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)
> at
> org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
> at
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)
> 
> 
> 
> 
> --
> *
>   Dhaval Jaiswal
> Database & System
>  E: dhaval.jais...@via.com
> T: +91-80-4043 3000
> M: +91-8095397843
>  www.via.com
>  
> 
> 
>  *
> 

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



RE: Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread Caldarale, Charles R
> From: bfinkel...@aaamissouri.com [mailto:bfinkel...@aaamissouri.com] 
> Subject: Catalina.bat Not in BIN folder install of 7.0.23

> I just installed Tomcat 7.0.23 and went to configure the 
> catalina.bat file on a Windows machine and I can not find
> any of the files there.

For reasons that I've never seen explained, the .bat files are not included in 
the .exe downloads, but only in the .zip ones.  Grab that one instead.

 - 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



Catalina.bat Not in BIN folder install of 7.0.23

2012-03-22 Thread BFinkeldei
I just installed Tomcat 7.0.23 and went to configure the catalina.bat file 
on a Windows machine and I can not find any of the files there.  I don't 
see it removed in the change log...or i missed that.

Any idea?
Where should it be?
Can I just bring over the catalina.bat file from a 7.0.22 install and use 
it on 7.0.23?

Thanks,

Brad Finkeldei



Re: java.lang.IllegalStateException Question

2012-03-22 Thread Pid
On 22/03/2012 17:05, André Warnier wrote:
> Pid wrote:
>> On 22/03/2012 15:47, Lobb, Janos wrote:
>>> On Mar 22, 2012, at 7:40 AM, André Warnier wrote:
>>>
 Martin Gainty wrote:
> Mitch
> One possible cause
> FE Application creates session
> passes queryString or posted Data (hopefully in Sesion) to backend
> Axis WebService
> Objects are serialized to disk with existing JSESSIONID
> FE times out
> back end responds to a disconnected session and tries to re-create
> session with old JSESSIONID
> Illegal StateException is thrown when client tries to (re)create
> new session with old serialized JSESSIONID
 +1
 I would add that the "illegal state" indicated by the error message
 is a special tomcat quantum state, resulting from a situation in
 which the response, while not being totally sent yet, is in fact
 partially sent already, causing a certain amount of probabilistic
 confusion a the level of the event horizon.
 This is caught by a hidden class in Tomcat, invoking a singleton
 object which writes a generally nonsensical message in one of the
 logs, chosen at random.
 Due to the nature of the error, it is of course extremely hard to
 reproduce, as one can find out either the exact time of the event,
 or its location, but not both.

>>> Even if it is an "illegal state" it still should be either "clean" or
>>> "mixed".  If clean, then Integrate(fn*(q,p)fn(q,p)dpdq
>>> should give the exact probability and if it is in "mixed" then the
>>> diagonal fnm density matrix elements should do similarly.  Of course
>>> if it is at the event horizon, then all bets are off, because there
>>> is still now good theory combining quantum states with gravity :-)
>>
>> All of this is irrelevant if the OP is not using the
>> Http11QuantumConnector.
>>
> 
> He did not give us details of his configuration, so Janos and I were
> talking in all generality.
> 
> Is the Http11QuantumConnector (finally) released ? 

I can't tell if it's in trunk or not.  I can look, but I can't check it
out.  If I check it out, it's often not actually usable because the
initInternal() method causes it to change state.



p

> The last time I
> tested it, it was starting threads in random parallel universes, which
> made it hard to collect the results and clean up afterward (and never
> mind finding the logs).  Granted, heap memory was not an issue anymore,
> but still I would not call this production-level code.
> 
> I think what we really need is a network trace. But a simple
> back-of-the-hand calculation shows that to determine the precise cause
> with a 3-sigma level of certainty, we would need a network trace
> covering at least 7 X 10 exp 24 seconds, which unfortunately exceeds the
> current high estimate of the age of the Universe by several magnitudes. 
> The same calculation shows that Konstantin's earlier explanation has a
> 99.87% probability of being closer to the truth.  So before setting up
> the network trace, we would recommend to the OP to check Konstantin's
> hypothesis, just in case.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Can't get past 404 error

2012-03-22 Thread David kerber

Running:
TC 7.0.26 x64 on
Windows server 2008 R2 x64 with
JRE 1.6.0_27 x64


I'm trying to configure my app in the recommended manner, where the 
context is NOT defined in the server.xml (which I've been doing for 
years), and I'm having trouble, getting 404 errors, and can't get my 
opening page to load from:


http://localhost:81/SiteData/Login.jsp

I'm pretty sure it's some stupid little setting I'm missing, but two 
full days haven't turned it up, so I could use a 2nd set of eyes to help 
me find it.  Many details below:


Tomcat was installed using the windows x64 installer, and then I 
unzipped the .zip package over the top so I can get the service.bat 
utilities.


Catalina_home is defined in tomcat7w as:
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0

Catalina_base is
-Dcatalina.base=c:\TomcatClients\Pelican

The application I'm testing is loaded from SiteData.war, which is 
located in catalina.base\webapps.  The other one that is loading below 
is failing too.


I have put a context.xml file in several different places: 
catalina.base\webapps\SiteData\META-INF,

catalina.home\conf\Catalina\localhost
catalina.base\conf\Catalina\localhost
It contains:



I initially had

path="/SiteData"

in the context entry, but reading the docs told me I needed to remove it.



My server.xml, in catalina.base\conf:



  SSLEngine="on" />

  
  className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  

  
  



  

  
  
directory="logs"

   prefix="localhost_access_log." suffix=".txt"
   pattern="%h %l %u %t "%r" %s %b" />
  

  




The context.xml in catalina_base\conf:



WEB-INF/web.xml





My web.xml, from the exploded directories:


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
		xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

SiteData

Process date entry
ObsDateProc
SiteData.ObsDateProc


Process submitted data
SiteDataProc
SiteData.SiteDataProc


Process submitted data
SiteGridProc
SiteData.SiteGridProc


		Manages server settings and properties, and displays 
runtime counters, etc

Manage server configuration
ServerManagement
SiteData.ServerManagement


		Processes admin requests for reports and data 
modifications.

Process administrative request
ProcessAdminRequest
SiteData.ProcessAdminRequest


ObsDateProc
/ObsDateProc


SiteDataProc
/SiteDataProc


SiteGridProc
/SiteGridProc


ServerManagement
/ServerManagement


ProcessAdminRequest
/ProcessAdminRequest


SiteData.SiteDataStartup



SiteData.SessionCountListener



45


Login.jsp





Log files:

localhost_access_log.:
127.0.0.1 - - [22/Mar/2012:10:57:59 -0400] "GET /SiteData/Login.jsp 
HTTP/1.1" 404 952



catalina..log (note the "INFO: No global web.xml found"; is that a 
problem?); the stderr log has the exact same info.


Mar 22, 2012 11:12:19 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.22.
Mar 22, 2012 11:12:19 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters 
[false], random [true].

Mar 22, 2012 11:12:20 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-81"]
Mar 22, 2012 11:12:20 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Mar 22, 2012 11:12:20 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1073 ms
Mar 22, 2012 11:12:20 AM org.apache.catalina.core.StandardService 
startInternal

INFO: Starting service Catalina
Mar 22, 2012 11:12:20 AM org.apache.catalina.core.StandardEngine 
startInternal

INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Mar 22, 2012 11:12:20 AM org.apache.catalina.startup.HostConfig 
deployDescriptor
INFO: Deploying configuration descriptor 
C:\TomcatClients\Pelican\conf\Catalina\localhost\SiteData.xml
Mar 22, 2012 11:12:20 AM org.apache.catalina.startup.ContextConfig 
getDefaultWebXmlFragment

INFO: No g

Re: java.lang.IllegalStateException Question

2012-03-22 Thread André Warnier

Pid wrote:

On 22/03/2012 15:47, Lobb, Janos wrote:

On Mar 22, 2012, at 7:40 AM, André Warnier wrote:


Martin Gainty wrote:

Mitch
One possible cause
FE Application creates session
passes queryString or posted Data (hopefully in Sesion) to backend Axis 
WebService
Objects are serialized to disk with existing JSESSIONID
FE times out
back end responds to a disconnected session and tries to re-create session with 
old JSESSIONID
Illegal StateException is thrown when client tries to (re)create new session 
with old serialized JSESSIONID

+1
I would add that the "illegal state" indicated by the error message is a 
special tomcat quantum state, resulting from a situation in which the response, while not 
being totally sent yet, is in fact partially sent already, causing a certain amount of 
probabilistic confusion a the level of the event horizon.
This is caught by a hidden class in Tomcat, invoking a singleton object which 
writes a generally nonsensical message in one of the logs, chosen at random.
Due to the nature of the error, it is of course extremely hard to reproduce, as 
one can find out either the exact time of the event, or its location, but not 
both.


Even if it is an "illegal state" it still should be either "clean" or "mixed".  If clean, then 
Integrate(fn*(q,p)fn(q,p)dpdq should give the exact probability and if it is in "mixed" then 
the diagonal fnm density matrix elements should do similarly.  Of course if it is at the event horizon, then all bets are 
off, because there is still now good theory combining quantum states with gravity :-)


All of this is irrelevant if the OP is not using the Http11QuantumConnector.



He did not give us details of his configuration, so Janos and I were talking in all 
generality.


Is the Http11QuantumConnector (finally) released ? The last time I tested it, it was 
starting threads in random parallel universes, which made it hard to collect the results 
and clean up afterward (and never mind finding the logs).  Granted, heap memory was not an 
issue anymore, but still I would not call this production-level code.


I think what we really need is a network trace. But a simple back-of-the-hand calculation 
shows that to determine the precise cause with a 3-sigma level of certainty, we would need 
a network trace covering at least 7 X 10 exp 24 seconds, which unfortunately exceeds the 
current high estimate of the age of the Universe by several magnitudes.  The same 
calculation shows that Konstantin's earlier explanation has a 99.87% probability of being 
closer to the truth.  So before setting up the network trace, we would recommend to the OP 
to check Konstantin's hypothesis, just in case.



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



Re: Tomcat 7 - servlet 2.5 app and removed Context disableURLRewriting parameter

2012-03-22 Thread Konstantin Kolinko
2012/3/22 Torsten Krah :
>
> What other ways are there for a 2.5 webapp in a mixed environment (3.0
> webapps and 2.5 ones) where i want to disable url rewriting for the 2.5
> one but leave the default untouched?
>

IIRC it is possible with do in container-independent way by adding a
Filter that intercepts response.encodeURL(),
response.encodeRedirectURL().
There should be some discussion in archives.

> So i am going to open a new feature request, correct?

If you have a patch you can attach it to issue 49811.

Because of Servlet 3.0 spec there is a lot of work in Tomcat to merge
web.xml from various fragments and annotations.  Respecting a Context
option there might be a bit messy. (Just saying, without looking at
the code).

Best regards,
Konstantin Kolinko

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



Re: Tomcat 7 - servlet 2.5 app and removed Context disableURLRewriting parameter

2012-03-22 Thread Torsten Krah
Am Donnerstag, den 22.03.2012, 14:25 + schrieb Mark Thomas:
> You can, but it will be closed as WONTFIX. The reason it was only
> added
> to 6.0.x was that that in 7.0.x there are other ways of achieving the
> same result and supporting this additional option as well would result
> in some unnecessarily messy, hard to maintain code.

What other ways are there for a 2.5 webapp in a mixed environment (3.0
webapps and 2.5 ones) where i want to disable url rewriting for the 2.5
one but leave the default untouched?

> 
> If the 7.0.x options don't work for you, why not use 6.0.x?

Because i want to use the thread vanishing features tobe able to let the
gc collect my class loader in case a thread local is left over by a
webapp and 6.0.x does not have this feature.
And 7.0.x does support 2.5 webapps, does it?

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: Tomcat 7 - servlet 2.5 app and removed Context disableURLRewriting parameter

2012-03-22 Thread Mark Thomas
On 22/03/2012 14:14, Torsten Krah wrote:
> Am Donnerstag, den 22.03.2012, 17:43 +0400 schrieb Konstantin Kolinko:
>> 2012/3/22 Torsten Krah :
>>> Hi,
>>>
>>> i am using tomcat 7 to run my servlet 2.5 webapps.
>>> Im Tomcat 6 it was possible to tell the Context via
>>> "disableURLRewriting" that i want to track session only via Cookie.
>>> This parameter is removed and doc tells me to use
>>
>> It was not removed.  It was never present in 7.0.
> 
> Ok, than it was never ported ;-).
> 
>> It is a recent addition that was done to 6.0 only (issue 49811).
>>
>>>
>>> COOKIE
>>>
>>> at session-config element in web.xml.
>>>
>>> But this is not a valid attribute there in a 2.5 webapp.
>>>
>>> I am unable to switch to 3.0 yet. So how to disable URL rewriting in
>>> tomcat 7 with a 2.5 webapp?
>>>
>>
>> You can edit site-wide defaults  (conf/web.xml).
> 
> I am unable to control this site-wide default. I am not allowed and even
> if i am to do, i may break other apps.
> Im Tomcat 6 you can control it via parameter, in tomcat 7 you can't
> control it for apps which are not Servlet 3.0, right?
> 
> So i am going to open a new feature request, correct?

You can, but it will be closed as WONTFIX. The reason it was only added
to 6.0.x was that that in 7.0.x there are other ways of achieving the
same result and supporting this additional option as well would result
in some unnecessarily messy, hard to maintain code.

If the 7.0.x options don't work for you, why not use 6.0.x?

Mark

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



Re: Tomcat 7 - servlet 2.5 app and removed Context disableURLRewriting parameter

2012-03-22 Thread Torsten Krah
Am Donnerstag, den 22.03.2012, 17:43 +0400 schrieb Konstantin Kolinko:
> 2012/3/22 Torsten Krah :
> > Hi,
> >
> > i am using tomcat 7 to run my servlet 2.5 webapps.
> > Im Tomcat 6 it was possible to tell the Context via
> > "disableURLRewriting" that i want to track session only via Cookie.
> > This parameter is removed and doc tells me to use
> 
> It was not removed.  It was never present in 7.0.

Ok, than it was never ported ;-).

> It is a recent addition that was done to 6.0 only (issue 49811).
> 
> >
> > COOKIE
> >
> > at session-config element in web.xml.
> >
> > But this is not a valid attribute there in a 2.5 webapp.
> >
> > I am unable to switch to 3.0 yet. So how to disable URL rewriting in
> > tomcat 7 with a 2.5 webapp?
> >
> 
> You can edit site-wide defaults  (conf/web.xml).

I am unable to control this site-wide default. I am not allowed and even
if i am to do, i may break other apps.
Im Tomcat 6 you can control it via parameter, in tomcat 7 you can't
control it for apps which are not Servlet 3.0, right?

So i am going to open a new feature request, correct?

> 
> Best regards,
> Konstantin Kolinko
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



smime.p7s
Description: S/MIME cryptographic signature


Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Colin Ingarfield
Ah, Wireshark.  My friend calls it the "universal debugger". :)

I will set the validation interval to 1 and keep an eye on the network to
see what's going on.  I may also install MySql locally so I can kill it
easily to try and simulation connection timeouts.  I won't really feel this
is resolved until I can recreate the original issue.

Ultimately tho I'd still like to see some debug logging from the pool
itself.  Is there a simple way to turn it on?

Thanks,
Colin

On Wed, Mar 21, 2012 at 11:20 AM, Filip Hanik Mailing Lists <
devli...@hanik.com> wrote:

> it will take a while to see the abandoned log. I'm not implying every
> request hogs the connection, but that you could have ended up in a scenario
> where that did happen.
> otherwise, you would have not seen the problem for 2 hours and to go away
> when the system was restarted, as it should have failed on validation.
>
> You can enable validation every single time by doing
>
> validationInterval="1"
>
> after that, if it was me, I'd start pulling in something like Wireshark to
> see what is going on
>
> Filip
>
> - Original Message -
> > From: "Colin Ingarfield" 
> > To: "Tomcat Users List" 
> > Sent: Wednesday, March 21, 2012 10:11:43 AM
> > Subject: Re: how to enable debug logging for Tomcat jdbc pool (Tomcat
> 6.0.32)
> >
> > I added the 3 abandoned settings but I don't see any indication in
> > the
> > tomcat log that connections are being abandoned.  I also made the max
> > pool
> > size pretty small.. my application would have failed quickly if all
> > the
> > connections we're being incorrectly held up.
> >
> > Anything else I can try?  Thanks again for your  help.
> >
> > -- Colin
> >
> > On Wed, Mar 21, 2012 at 10:41 AM, Filip Hanik Mailing Lists <
> > devli...@hanik.com> wrote:
> >
> > > Got it, thank you.
> > > The other way this can happen is if the application checks out a
> > > connection and then never returns it, and expects it to be used.
> > > For this you will want to enable
> > >
> > > removeAbandonedTimeout="60"
> > > removeAbandoned="true"
> > > logAbandoned="true"
> > >
> > > this should tell you pretty quickly if you got a component that is
> > > hogging
> > > the connection. So test that first. Now if that is the case, there
> > > is a way
> > > to fix that:
> > >
> > > 1. remove the above settings
> > > 2. compile and configure the interceptor described in:
> > >   https://issues.apache.org/bugzilla/show_bug.cgi?id=52024
> > > In this interceptor, when a failure occurs, it automatically
> > > reconnects
> > > and retries the operation. And that is the only way to get around
> > > the
> > > problem (assuming my assumption is correct)
> > >
> > >
> > > Filip
> > > - Original Message -
> > > > From: "Colin Ingarfield" 
> > > > To: users@tomcat.apache.org
> > > > Sent: Wednesday, March 21, 2012 9:30:46 AM
> > > > Subject: Re: how to enable debug logging for Tomcat jdbc pool
> > > > (Tomcat
> > > 6.0.32)
> > > >
> > > > My configuration:
> > > >
> > > > > > > name="jdbc/cdb.mysql"
> > > > defaultAutoCommit="false"
> > > > driverClassName="com.mysql.jdbc.Driver"
> > > > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> > > > url="jdbc:mysql://X.com/_dev?sessionVariables=TRANSACTION
> > > > ISOLATION LEVEL READ COMMITTED"
> > > > username="X"
> > > > password="X"
> > > >
> > > > maxActive="100"
> > > > maxIdle="100"
> > > > minIdle="10"
> > > > initialSize="10"
> > > > maxWait="1"
> > > > testOnBorrow="true"
> > > > type="javax.sql.DataSource"
> > > > validationQuery="SELECT 1"/>
> > > >
> > > >
> > > > I have testOnBorrow and validationQuery set as you suggest, so I
> > > > do
> > > > not
> > > > think that is the issue.
> > > >
> > > > Thanks,
> > > > Colin
> > > >
> > >
> > > -
> > > 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 enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Colin Ingarfield
Chris,

On Thu, Mar 22, 2012 at 7:40 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Colin,
>
> On 3/21/12 12:11 PM, Colin Ingarfield wrote:
> > I added the 3 abandoned settings but I don't see any indication in
> > the tomcat log that connections are being abandoned.  I also made
> > the max pool size pretty small.. my application would have failed
> > quickly if all the connections we're being incorrectly held up.
>
> In development, I recommend setting your max connection pool size to
> "1": you'll find potential deadlocks that way, too.
>
>
> http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk9rHbgACgkQ9CaO5/Lv0PCHaQCgnv5/vPGuULmZDHk2/H4/TNcr
> 3nkAmgOKjma3jVulg56+UaZIHFquEsgB
> =8YkY
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Setting the pool size to 1 for dev is a good idea.  I'll try that.

Nice blog post re: jdbc.  Thankfully I use Spring 3 JDBC and it takes care
of all that jdbc grunt work for me.  It's possible my code is doing
something strange that prevents Spring from cleaning up, but I'm not sure
what that would be.

Thanks for the suggestions,
Colin


Re: java.lang.IllegalStateException Question

2012-03-22 Thread Pid
On 22/03/2012 15:47, Lobb, Janos wrote:
> 
> On Mar 22, 2012, at 7:40 AM, André Warnier wrote:
> 
>> Martin Gainty wrote:
>>> Mitch
>>> One possible cause
>>> FE Application creates session
>>> passes queryString or posted Data (hopefully in Sesion) to backend Axis 
>>> WebService
>>> Objects are serialized to disk with existing JSESSIONID
>>> FE times out
>>> back end responds to a disconnected session and tries to re-create session 
>>> with old JSESSIONID
>>> Illegal StateException is thrown when client tries to (re)create new 
>>> session with old serialized JSESSIONID
>> +1
>> I would add that the "illegal state" indicated by the error message is a 
>> special tomcat quantum state, resulting from a situation in which the 
>> response, while not being totally sent yet, is in fact partially sent 
>> already, causing a certain amount of probabilistic confusion a the level of 
>> the event horizon.
>> This is caught by a hidden class in Tomcat, invoking a singleton object 
>> which writes a generally nonsensical message in one of the logs, chosen at 
>> random.
>> Due to the nature of the error, it is of course extremely hard to reproduce, 
>> as one can find out either the exact time of the event, or its location, but 
>> not both.
>>
> Even if it is an "illegal state" it still should be either "clean" or 
> "mixed".  If clean, then Integrate(fn*(q,p)fn(q,p)dpdq should 
> give the exact probability and if it is in "mixed" then the diagonal fnm 
> density matrix elements should do similarly.  Of course if it is at the event 
> horizon, then all bets are off, because there is still now good theory 
> combining quantum states with gravity :-)

All of this is irrelevant if the OP is not using the Http11QuantumConnector.


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: java.lang.IllegalStateException Question

2012-03-22 Thread Lobb, Janos

On Mar 22, 2012, at 7:40 AM, André Warnier wrote:

> Martin Gainty wrote:
>> Mitch
>> One possible cause
>> FE Application creates session
>> passes queryString or posted Data (hopefully in Sesion) to backend Axis 
>> WebService
>> Objects are serialized to disk with existing JSESSIONID
>> FE times out
>> back end responds to a disconnected session and tries to re-create session 
>> with old JSESSIONID
>> Illegal StateException is thrown when client tries to (re)create new session 
>> with old serialized JSESSIONID
> +1
> I would add that the "illegal state" indicated by the error message is a 
> special tomcat quantum state, resulting from a situation in which the 
> response, while not being totally sent yet, is in fact partially sent 
> already, causing a certain amount of probabilistic confusion a the level of 
> the event horizon.
> This is caught by a hidden class in Tomcat, invoking a singleton object which 
> writes a generally nonsensical message in one of the logs, chosen at random.
> Due to the nature of the error, it is of course extremely hard to reproduce, 
> as one can find out either the exact time of the event, or its location, but 
> not both.
> 
Even if it is an "illegal state" it still should be either "clean" or "mixed".  
If clean, then Integrate(fn*(q,p)fn(q,p)dpdq should give the 
exact probability and if it is in "mixed" then the diagonal fnm density matrix 
elements should do similarly.  Of course if it is at the event horizon, then 
all bets are off, because there is still now good theory combining quantum 
states with gravity :-)


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



Re: Tomcat 7 - servlet 2.5 app and removed Context disableURLRewriting parameter

2012-03-22 Thread Konstantin Kolinko
2012/3/22 Torsten Krah :
> Hi,
>
> i am using tomcat 7 to run my servlet 2.5 webapps.
> Im Tomcat 6 it was possible to tell the Context via
> "disableURLRewriting" that i want to track session only via Cookie.
> This parameter is removed and doc tells me to use

It was not removed.  It was never present in 7.0.
It is a recent addition that was done to 6.0 only (issue 49811).

>
> COOKIE
>
> at session-config element in web.xml.
>
> But this is not a valid attribute there in a 2.5 webapp.
>
> I am unable to switch to 3.0 yet. So how to disable URL rewriting in
> tomcat 7 with a 2.5 webapp?
>

You can edit site-wide defaults  (conf/web.xml).

Best regards,
Konstantin Kolinko

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



Tomcat 7 - servlet 2.5 app and removed Context disableURLRewriting parameter

2012-03-22 Thread Torsten Krah
Hi,

i am using tomcat 7 to run my servlet 2.5 webapps.
Im Tomcat 6 it was possible to tell the Context via
"disableURLRewriting" that i want to track session only via Cookie.
This parameter is removed and doc tells me to use 

COOKIE

at session-config element in web.xml.

But this is not a valid attribute there in a 2.5 webapp.

I am unable to switch to 3.0 yet. So how to disable URL rewriting in
tomcat 7 with a 2.5 webapp?

regards

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: how to enable debug logging for Tomcat jdbc pool (Tomcat 6.0.32)

2012-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Colin,

On 3/21/12 12:11 PM, Colin Ingarfield wrote:
> I added the 3 abandoned settings but I don't see any indication in
> the tomcat log that connections are being abandoned.  I also made
> the max pool size pretty small.. my application would have failed
> quickly if all the connections we're being incorrectly held up.

In development, I recommend setting your max connection pool size to
"1": you'll find potential deadlocks that way, too.

http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rHbgACgkQ9CaO5/Lv0PCHaQCgnv5/vPGuULmZDHk2/H4/TNcr
3nkAmgOKjma3jVulg56+UaZIHFquEsgB
=8YkY
-END PGP SIGNATURE-

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



Re: java.lang.IllegalStateException Question

2012-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 3/22/12 8:15 AM, Mark Thomas wrote:
> On 22/03/2012 11:40, André Warnier wrote:
>> Martin Gainty wrote:
>>> Mitch One possible cause
>>> 
>>> FE Application creates session passes queryString or posted
>>> Data (hopefully in Sesion) to backend Axis WebService Objects
>>> are serialized to disk with existing JSESSIONID FE times out 
>>> back end responds to a disconnected session and tries to
>>> re-create session with old JSESSIONID Illegal StateException is
>>> thrown when client tries to (re)create new session with old
>>> serialized JSESSIONID
>>> 
>> +1 I would add that the "illegal state" indicated by the error
>> message is a special tomcat quantum state, resulting from a
>> situation in which the response, while not being totally sent
>> yet, is in fact partially sent already, causing a certain amount
>> of probabilistic confusion a the level of the event horizon. This
>> is caught by a hidden class in Tomcat, invoking a singleton
>> object which writes a generally nonsensical message in one of the
>> logs, chosen at random. Due to the nature of the error, it is of
>> course extremely hard to reproduce, as one can find out either
>> the exact time of the event, or its location, but not both.
> 
> And for those of your reading the archives not familiar with some
> of our better known characters, Martin - as usual - is talking
> complete and utter nonsense and André - if it wasn't obvious - is
> taking the mickey.

And for those reading the archives who aren't familiar with British
slang, "taking the mickey" means - if it wasn't obvious - "making fun
of him".

> If you need the real answer, take a look at Konstantin's earlier
> reply. If you want a good laugh, then this thread certainly has
> some potential.

There's a QED joke in there somewhere, but my energy level this
morning is too low to allow for a change in states.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rHJ4ACgkQ9CaO5/Lv0PAS+QCguSGGM/PswFotvNUTGXdlJcZ8
T/EAn3/CBEhlZ7lA4ZiytSvEkIGKUXHQ
=5hAX
-END PGP SIGNATURE-

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



Re: Session replication problem

2012-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andy,

On 3/22/12 4:16 AM, Andy Chapman wrote:
> 1. The Tomcat versions are different (7.0.4 and 7.0.20)

Note that Tomcat 7.0.6 was the first non-beta version of Tomcat 7. You
should definitely upgrade the 7.0.4 version to 7.0.20 and I suspect
things will start working better.

> 2. The Java versions are different (1.6.0_22 for i386_and 1.6.0_27
> for x64)

That might have been an issue, but the exception clearly shows
Tomcat's SerialMessageImpl class. Perhaps there will be other problems
after this one is cleared-up, but most Serializable classes in the JDK
are cross-version-compatible.

> 3. One server is 32 bit CentOS and the other 64 bit

Should never be an issue: bytecode is host architecture agnostic
(that's the whole point).

Upgrade Tomcat and see if that helps.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rGi4ACgkQ9CaO5/Lv0PCdIQCgs5KjeWFCKtGojufvbqusujXG
i0AAn3S6povTIUumL7VZtKllfhoDgD1H
=0+Te
-END PGP SIGNATURE-

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



Re: java.lang.IllegalStateException Question

2012-03-22 Thread Mark Thomas
On 22/03/2012 11:40, André Warnier wrote:
> Martin Gainty wrote:
>> Mitch
>> One possible cause
>>
>> FE Application creates session
>> passes queryString or posted Data (hopefully in Sesion) to backend
>> Axis WebService
>> Objects are serialized to disk with existing JSESSIONID
>> FE times out
>> back end responds to a disconnected session and tries to re-create
>> session with old JSESSIONID
>> Illegal StateException is thrown when client tries to (re)create new
>> session with old serialized JSESSIONID
>>
> +1
> I would add that the "illegal state" indicated by the error message is a
> special tomcat quantum state, resulting from a situation in which the
> response, while not being totally sent yet, is in fact partially sent
> already, causing a certain amount of probabilistic confusion a the level
> of the event horizon.
> This is caught by a hidden class in Tomcat, invoking a singleton object
> which writes a generally nonsensical message in one of the logs, chosen
> at random.
> Due to the nature of the error, it is of course extremely hard to
> reproduce, as one can find out either the exact time of the event, or
> its location, but not both.

And for those of your reading the archives not familiar with some of our
better known characters, Martin - as usual - is talking complete and
utter nonsense and André - if it wasn't obvious - is taking the mickey.

If you need the real answer, take a look at Konstantin's earlier reply.
If you want a good laugh, then this thread certainly has some potential.

Mark

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



Re: java.lang.IllegalStateException Question

2012-03-22 Thread André Warnier

Martin Gainty wrote:

Mitch
One possible cause

FE Application creates session
passes queryString or posted Data (hopefully in Sesion) to backend Axis 
WebService
Objects are serialized to disk with existing JSESSIONID
FE times out
back end responds to a disconnected session and tries to re-create session with 
old JSESSIONID
Illegal StateException is thrown when client tries to (re)create new session 
with old serialized JSESSIONID


+1
I would add that the "illegal state" indicated by the error message is a special tomcat 
quantum state, resulting from a situation in which the response, while not being totally 
sent yet, is in fact partially sent already, causing a certain amount of probabilistic 
confusion a the level of the event horizon.
This is caught by a hidden class in Tomcat, invoking a singleton object which writes a 
generally nonsensical message in one of the logs, chosen at random.
Due to the nature of the error, it is of course extremely hard to reproduce, as one can 
find out either the exact time of the event, or its location, but not both.



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



Re: How to generate heap dump in Tomcat 5.5 (Windows)

2012-03-22 Thread Konstantin Kolinko
2012/3/22 Adrian Zara :
>
> Hi guys,
>
> Good afternoon!
>
> How can I generate a heap dump from tomcat 5.5 (windows version). I have 
> downloaded an Eclipse Memory Ananlyzer and the input is .hprof file. Kindly 
> advise.

There are instructions in the Eclipse MAT help,
http://wiki.eclipse.org/index.php/MemoryAnalyzer#Getting_a_Heap_Dump

Best regards,
Konstantin Kolinko

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



RE: java.lang.IllegalStateException Question

2012-03-22 Thread Martin Gainty

Mitch
One possible cause

FE Application creates session
passes queryString or posted Data (hopefully in Sesion) to backend Axis 
WebService
Objects are serialized to disk with existing JSESSIONID
FE times out
back end responds to a disconnected session and tries to re-create session with 
old JSESSIONID
Illegal StateException is thrown when client tries to (re)create new session 
with old serialized JSESSIONID

Martin Gainty 
__ 
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.


> Date: Thu, 22 Mar 2012 10:43:44 +
> Subject: java.lang.IllegalStateException Question
> From: mitchell.sm...@cwc.com
> To: users@tomcat.apache.org
> 
> Hi,
> 
> Tomcat 5.5.35
> JAVA 5
> 
> I am seeing:
> 
> > [ERROR] org.apache.catalina.core.ContainerBase.[Catalina].[localhost] -
> > Exception Processing ErrorPage[exceptionType=java.lang.Exception,
> > location=/base/errors/runtimeError.iface]
> > java.lang.IllegalStateException
> > at org.apache.coyote.Response.reset(Response.java:297)
> 
> 
> I have looked in to this issue and found multiple comments relating to the
> maxPostSize Attribute in the connector.
> 
> Can someone provide me with a simple explaination of the cause of this
> error, by default this value is 2mb, does this error indicate that
> somewhere a large data packet is being sent to my web app? Or could it be
> that when communicating to a webservice layer it is posting / receiving a
> large packet?
> 
> Background, this error is appearing in the frontend application servers,
> the webapplication utalises a set of axis2 webservices.
> 
> Any info or assistance would be greatly appreciated.
> 
> Thanks
> -- 
> *Mitchell Smith
> *
> 
> The information contained in this email (and any attachments) is confidential 
> and may be privileged. If you are not the intended recipient
> and have received this email in error, please notify the sender immediately 
> by reply email and delete the message and any attachments.
> If you are not the named addressee, you must not copy, disclose, forward or 
> otherwise use the information contained in this email.
> Cable & Wireless Communications Plc and its affiliates reserve the right to 
> monitor all email communications through their networks to
> ensure regulatory compliance.
>  
> Cable & Wireless Communications Plc is a company registered in England & 
> Wales with number:
> 07130199 and offices located at 3rd Floor, 26 Red Lion Square, London WC1R 4HQ
  

Re: java.lang.IllegalStateException Question

2012-03-22 Thread Konstantin Kolinko
2012/3/22 Smith, Mitchell :
> Tomcat 5.5.35
> JAVA 5
>
> I am seeing:
>
>> [ERROR] org.apache.catalina.core.ContainerBase.[Catalina].[localhost] -
>> Exception Processing ErrorPage[exceptionType=java.lang.Exception,
>> location=/base/errors/runtimeError.iface]
>> java.lang.IllegalStateException
>>         at org.apache.coyote.Response.reset(Response.java:297)
>
>
> I have looked in to this issue and found multiple comments relating to the
> maxPostSize Attribute in the connector.
>

Sounds dubious. I do not remember such relation.


> Can someone provide me with a simple explaination of the cause of this
> error, by default this value is 2mb, does this error indicate that
> somewhere a large data packet is being sent to my web app? Or could it be
> that when communicating to a webservice layer it is posting / receiving a
> large packet?
>
> Background, this error is appearing in the frontend application servers,
> the webapplication utalises a set of axis2 webservices.
>
> Any info or assistance would be greatly appreciated.
>

Response.java, line 297:

// Reset the stream
if (commited) {
//String msg = sm.getString("servletOutputStreamImpl.reset.ise");
throw new IllegalStateException();
}

The "committed" state means that you have already sent some data to
the client and cannot "take it back" from the wire.

In your case (judging by the message "Exception Processing ErrorPage")
I would guess that an error occurred too late in processing, when some
data has already been sent. Thus the ErrorPage for that error cannot
be displayed properly.

Best regards,
Konstantin Kolinko

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



java.lang.IllegalStateException Question

2012-03-22 Thread Smith, Mitchell
Hi,

Tomcat 5.5.35
JAVA 5

I am seeing:

> [ERROR] org.apache.catalina.core.ContainerBase.[Catalina].[localhost] -
> Exception Processing ErrorPage[exceptionType=java.lang.Exception,
> location=/base/errors/runtimeError.iface]
> java.lang.IllegalStateException
> at org.apache.coyote.Response.reset(Response.java:297)


I have looked in to this issue and found multiple comments relating to the
maxPostSize Attribute in the connector.

Can someone provide me with a simple explaination of the cause of this
error, by default this value is 2mb, does this error indicate that
somewhere a large data packet is being sent to my web app? Or could it be
that when communicating to a webservice layer it is posting / receiving a
large packet?

Background, this error is appearing in the frontend application servers,
the webapplication utalises a set of axis2 webservices.

Any info or assistance would be greatly appreciated.

Thanks
-- 
*Mitchell Smith
*

The information contained in this email (and any attachments) is confidential 
and may be privileged. If you are not the intended recipient
and have received this email in error, please notify the sender immediately by 
reply email and delete the message and any attachments.
If you are not the named addressee, you must not copy, disclose, forward or 
otherwise use the information contained in this email.
Cable & Wireless Communications Plc and its affiliates reserve the right to 
monitor all email communications through their networks to
ensure regulatory compliance.
 
Cable & Wireless Communications Plc is a company registered in England & Wales 
with number:
07130199 and offices located at 3rd Floor, 26 Red Lion Square, London WC1R 4HQ


Re: Setup of workers.properties with multiple host and TC instances

2012-03-22 Thread Mladen Turk

You should learn how to quote messages ;)

On 03/21/2012 08:22 PM, Martin Registe, Jr. wrote:

Please note that I have two different IP addresses running under the same 
worker.

You will need one worker per host:port thus in your case 4 of them not 2.


> Okay so I broke them up and created another lb group (not sure if I had to do 
that) it looks like this
> worker.list=part, myxx ...

You have typo here. Should be
worker.list=part,myxx
(no spaces around coma)


> I looked online and through my Apache Tomcat book ...

1. You will need to set jvmRoute to match the lb worker name inside Engine
   (either 'part' or 'myxx')
2. You can have only one Engine
3. Use two separate physical tomcat instances
   one listening on port 8019 and other on 8029
   and one having jvmRoute="part" and other jvmRoute="myxx"

Simple :)


Regards
--
^TM

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



Re: Setup of workers.properties with multiple host and TC instances

2012-03-22 Thread André Warnier

Martin Registe, Jr. wrote:

-Original Message-
From: Mladen Turk [mailto:mt...@apache.org] 
Sent: Wednesday, March 21, 2012 2:09 PM

To: users@tomcat.apache.org
Subject: Re: Setup of workers.properties with multiple host and TC instances

On 03/21/2012 07:47 PM, Martin Registe, Jr. wrote:

Hi All,


Please note that I have two different IP addresses running under the same 
worker.


You will need one worker per host:port thus in your case 4 of them not 2.


My boss thinks that this is causing sessions to jump between the two ip 
addresses on the same jvm.


You only have contract for two instances. The latest one will overwrite the 
first setting.




From Martin's messages above, I believe that there is some confusion as to what "workers" 
are, and also about what exactly you are trying to achieve.

In any case, "workers" do not need to be defined in Tomcat's server.xml.

@Martin :
How many *tomcat instances* do you have running ?
And can you explain, in general terms, what you are trying to do ?


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



Re: Session replication problem

2012-03-22 Thread Mark Thomas
On 22/03/2012 08:16, Andy Chapman wrote:
> Hi All,
> 
> I'm using tribes session replication between two Tomcat 7 servers and
> getting errors as below. There are various possible causes:
> 
> 1. The Tomcat versions are different (7.0.4 and 7.0.20)

It is this one.

Mark

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



How to generate heap dump in Tomcat 5.5 (Windows)

2012-03-22 Thread Adrian Zara

Hi guys,

Good afternoon!

How can I generate a heap dump from tomcat 5.5 (windows version). I have 
downloaded an Eclipse Memory Ananlyzer and the input is .hprof file. Kindly 
advise.

Thank you in advance.

Best regards,
Adrian

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



Session replication problem

2012-03-22 Thread Andy Chapman

Hi All,

I'm using tribes session replication between two Tomcat 7 servers and 
getting errors as below. There are various possible causes:


1. The Tomcat versions are different (7.0.4 and 7.0.20)
2. The Java versions are different (1.6.0_22 for i386_and 1.6.0_27 for x64)
3. One server is 32 bit CentOS and the other 64 bit
4. Something else

Obviously, everything should be the same in an ideal world and I should 
be on the latest Java and Tomcat versions but if the OS (32 vs 64 bit) 
is the problem there is little point me starting the upgrades on the 
other stuff as I'll need to replace some tin.


I thought the problem was bound to be the JVM versions being different 
and there being a default serialVersionUID somewhere. However I've tried 
a few different versions of Tomcat 7 and Java 6 talking to each other in 
a sandbox environment and I don't get the errors. This is possibly 
because I can't exactly duplicate the various version numbers of the 
problem environment in the sandbox.


Interestingly, the errors at each end are exactly the same; both ends of 
the cluster link complain of the same incoming serialVersionUID.


Suggestions for locating the problem much appreciated. Also, if there is 
a way to log information about the incoming serialized class so I can 
figure out which class is the problem.


Cheers


SEVERE: Unable to deserialize 
message:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{172, 
20, 12, 9}:4000,{172, 20, 12, 9},4000, alive=3408387, securePort=-1, UDP 
Port=-1, id={-79 85 122 -111 63 -9 75 88 -88 126 125 -55 80 -79 115 95 
}, payload={}, command={}, domain={}, ]; id={109 33 -19 38 45 -50 70 -79 
-120 -113 -88 -125 -118 -67 126 34 }; sent=2012-03-09 02:53:23.878]
java.io.InvalidClassException: 
org.apache.catalina.ha.session.SessionMessageImpl; local class 
incompatible: stream classdesc serialVersionUID = -544811529010945101, 
local class serialVersionUID = 1
at 
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at 
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:568)
at 
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:554)
at 
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:261)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:113)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at 
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:253)
at 
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:287)
at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:212)
at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:101)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)