RE: redirect paramter in the jk_workers file

2009-09-02 Thread Dhiraj Rajput
Hi Rainer,

Yes , it support to the 1.29 mod jk.

But here issue is different, I am using the JDBC store for the clustering.

Suppose my application is running fine and that instant if node1 is goes
offline 

It need near about 10 - 20 sec to push the session in to DB and in between
these 10 sec I f I try to do anything in my application , the application
kick back me on login page.

To overcome from this login page issue I am thinking to use the redirect
parameter for two nodes.

In this case , can you please tell me wheather this is sutaible and how it
works.

-Original Message-
From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
Sent: Wednesday, September 02, 2009 11:28 PM
To: Tomcat Users List
Subject: Re: redirect paramter in the jk_workers file

Your mailer uses a very unfriendly way of formatting your messages. So I
do top posting.

Yes, as you can read on

http://tomcat.apache.org/connectors-doc/reference/workers.html

the atribute redirect is supported since version 1.2.9. For a two node
load balancer, you don't need it though. If you have many nodes in a
load balancer, the redirect expresses, which one you prefer for the
failover. If you dont specify it, the load balancer will use some other
working node according to its load values.

Regards,

Rainer


On 02.09.2009 06:51, Dhiraj Rajput wrote:
> Hi Chris,
> 
>  
> 
> I have below mention tag in my jk workers file.
> 
>  
> 
>  
> 
>  
> 
> orker.tomcat.type=lb
> 
> worker.tomcat.socket_keepalive=1
> 
> worker.tomcat.socket_timeout=300
> 
> worker.tomcat.connection_pool_size=50
> 
> worker.tomcat.connection_pool_timeout=600
> 
> worker.tomcat.balance_workers=tomcatnode1,tomcatnode2
> 
> worker.tomcat.sticky_session=true
> 
> worker.tomcatnode1.port=9732
> 
> worker.tomcatnode1.host=10.18.25.160
> 
> worker.tomcatnode1.type=ajp13
> 
> worker.tomcatnode1.socket_keepalive=True
> 
> worker.tomcatnode1.socket_timeout=300
> 
> worker.tomcatnode1.connection_pool_timeout=600
> 
> worker.tomcatnode1.connect_timeout=600
> 
> worker.tomcatnode1.redirect=tomcatnode2
> 
> worker.tomcatnode2.port=9733
> 
> worker.tomcatnode2.host=10.18.25.107
> 
> worker.tomcatnode2.type=ajp13
> 
> worker.tomcatnode2.socket_keepalive=True
> 
> worker.tomcatnode2.socket_timeout=300
> 
> worker.tomcatnode2.connection_pool_timeout=600
> 
> worker.tomcatnode2.redirect=tomcatnode1
> 
>  
> 
>  
> 
> I am not 100% sure how this works and is it really usefull for the
failover.
> 
> Thanks and Regards,
> 
>  
> 
> Dhiraj V Rajput
> 
> Associate System Admin
> 
> Hosting Services Group
> 
> Premier Technology Group Nagpur

> 
> Phone: - USA- 1-626-698-1099
> 
> India Office: 91-712-2446734 ext 30
> 
> cell no : 91-9370315811
> 
>  
> 
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Sent: Tuesday, September 01, 2009 11:22 PM
> To: Tomcat Users List
> Subject: Re: redirect paramter in the jk_workers file
> 
>  
> 
> Hash: SHA1
> 
>  
> 
> Dhiraj,
> 
>  
> 
> On 8/27/2009 8:26 AM, Dhiraj Rajput wrote:
> 
>> I have issue on the redirect tag in jk workers file.
> 
>  
> 
> What is "redirect tag"?
> 
>  
> 
> -chris

-
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



session problem in Tomcat server when system date changes.

2009-09-02 Thread Nagineni

Hi,

I'm quite surprise to see this issue in the tomcat server.While running the
application ,I've changed my system date ahead a day.I observed that tomcat
server started creating new session for the same client.

Any pointers on this to resolve ?Please help me.

Thanks in advance.

Regards,
Naga.

-
Regards,
Naga.
-- 
View this message in context: 
http://www.nabble.com/session-problem-in-Tomcat-server-when-system-date-changes.-tp25270026p25270026.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: EL expressions not evaluation in tag library

2009-09-02 Thread veerabahu

David, Thanks for your kind help
Problem gets resolved once I copied el-api.jar

Thanks,
Veerabahu

David Smith-2 wrote:
> 
> So, you are saying the EL expressions are evaluated, but the standard  
> taglibs aren't?  Can you post a minimum jsp with the problem?  Also  
> get rid of javaee.jar. I believe it duplicates servlet-api classes.
> 
> -- David
> 
> 
> On Sep 2, 2009, at 5:03 AM, veerabahu  
>  wrote:
> 
>>
>>
>> Hi All,
>>
>> We are using EL expression in one of our tag libraries (.tag files),  
>> like {
>>
>> }
>>
>> 1. Made sure that servlets 2.4 is enabled in webapp web.xml like
>> {
>>
>>http://java.sun.com/xml/ns/j2ee";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>>…
>>…
>>
>> }
>>
>> 2. Following jars are available in WEB-INF/lib (in addition to other
>> standard jars)
>>1. javaee.jar
>>2. standard.jar
>>3. jstl.jar
>>4. struts-el-1.2.4.jar
>>
>> Now, when we use EL in my JSP it is getting evaluated and able to  
>> see proper
>> result. But the EL in tag libraries (as shown above) are not getting
>> executed.
>>
>> We are using Tomcat 5.5 with Java1.5. There is more than one webapp  
>> running
>> under same tomcat. All other webapps runs with servlets  
>> specification 2.3 (
>> I mean different DOCTYPE in web.xml)
>>
>> Can you help in identifying the reason for EL not getting executed  
>> ONLY in
>> tag libraries?
>>
>> Thanks,
>> Veerabahu
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/EL-expressions-not-evaluation-in-tag-library-tp25254057p25254057.html
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/EL-expressions-not-evaluation-in-tag-library-tp25254057p25269362.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Apache Server failover and session replication

2009-09-02 Thread Sumedh Sakdeo
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
*How it Works
*

   1. TomcatA starts up
   2. TomcatB starts up (Wait that TomcatA start is complete)
   3. TomcatA receives a request, a session S1 is created.
   4. TomcatA crashes
   5. TomcatB receives a request for session S1
   6. TomcatA starts up
   7. TomcatA receives a request, invalidate is called on the session (S1)
   8. TomcatB receives a request, for a new session (S2)
   9. TomcatA The session S2 expires due to inactivity.

section describes the steps.7-9 steps confusing.
Does tomcat 6 even support such scenario?

--Sumedh



On Thu, Sep 3, 2009 at 6:29 AM, Shaun Senecal wrote:

> After re-reading your initial post, the problems might not be as related as
> I thought since at no point did replication "stop" for me.
>
>
> On Thu, Sep 3, 2009 at 9:56 AM, Shaun Senecal  >wrote:
>
> > We had a similar problem with Tomcat 6 using clustering.  It turns out
> that
> > the SSO information is only propagated while all instances are running.
>  If
> > Instance-A fails, several users then log in to Instance-B, then
> Instance-A
> > comes back up, all of the SSO information for the users that logged in
> > during the downtime is not included in Instance-A so those users are
> forced
> > to re-login once the load balancer sends them to that instance.
> >
> > I wrote a fix for it, which might be useful for you.  However, it hasnt
> > been fully tested and is designed to only share the SSO information at
> > startup, not all Session information.  If Tomcat doenst handle this case,
> > then the fix I wrote should be easily extended to handle that.
>  Basically,
> > when an instance comes up it broadcasts a request for all known SSO
> > information to the cluster.  It then takes the first response it gets and
> > continues processing as normal.
> >
> > Let me know if you dont find a proper solution to the problem and I will
> > try to dig up that fix.  My intention was to post it back to the group,
> but
> > I got sidetracked once we (temporarily) stopped using clustering.
> >
> >
> > Shaun
> >
> >
> > On Thu, Sep 3, 2009 at 3:52 AM, Sumedh Sakdeo  >wrote:
> >
> >> Hi Rainer,
> >>
> >> I am using Tomcat session clustering and Apache Http Server for LB(using
> >> mod_jk module).  Also, using Tomcat 6. I have made appropriate changes
> to
> >> worker.properties and httpd.conf. Also I have made appropriate changes
> to
> >> server.xml on each tomcat.
> >>
> >> Thanks,
> >> Sumedh
> >>
> >> On Thu, Sep 3, 2009 at 12:15 AM, Rainer Jung  >> >wrote:
> >>
> >> > On 02.09.2009 19:57, Sumedh Sakdeo wrote:
> >> > > Hello All,
> >> > > I have a setup with two tomcat instances(A&B). I have
> >> > configured
> >> > > an apache web server 2.2 for load balancing and fail over. Setup
> looks
> >> > fine
> >> > > as per the configurations suggested. Let tomcat A be handling some
> >> > request
> >> > > at sometime. When tomcat instance(A) goes down, the session is
> >> replicated
> >> > to
> >> > > another tomcat instance(B) successfully. Now tomcat instance B is
> >> > handling
> >> > > those requests. Till this point everything goes fine, but when I
> bring
> >> up
> >> > > tomcat instance(A) and after that tomcat instance(B) goes down, the
> >> > session
> >> > > is no longer replicated. What might be the issue? In status page of
> >> > apache
> >> > > server I see even if node status is OK session is not replicated to
> >> fail
> >> > > over node for second time.
> >> >
> >> > How do you replicate? Are you using Tomcat session clustering? Tomcat
> >> > 5.5 or Tomcat 6?
> >> >
> >> > Regards,
> >> >
> >> > Rainer
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >> >
> >> >
> >>
> >
> >
>


Re: Apache Server failover and session replication

2009-09-02 Thread Sumedh Sakdeo
Shaun,
 Yes we have a user session object created when user logs on with proper
credentails.
For ex: At startup of two servers lets say user A has logged in.
As you are saying the SSO information is propagated while all instances are
running. So when for first time when tomcat which was handling request goes
down, this session object is successfully handled by other tomcat instance.
But when first instance comes up, and due to some reason second instance
which was processing sticky requests goes down this session object is lost.
Our problem is that this failback should happen correctly, and we find this
a general requirement, so do tomcat6 support such a scenario?

I have been sratching my head from past few days to fix this. What kind of
solution have you written for this? Could you please share?

Thanks for your time,
Ciao,
Sumedh

On Thu, Sep 3, 2009 at 6:26 AM, Shaun Senecal wrote:

> We had a similar problem with Tomcat 6 using clustering.  It turns out that
> the SSO information is only propagated while all instances are running.  If
> Instance-A fails, several users then log in to Instance-B, then Instance-A
> comes back up, all of the SSO information for the users that logged in
> during the downtime is not included in Instance-A so those users are forced
> to re-login once the load balancer sends them to that instance.
>
> I wrote a fix for it, which might be useful for you.  However, it hasnt
> been
> fully tested and is designed to only share the SSO information at startup,
> not all Session information.  If Tomcat doenst handle this case, then the
> fix I wrote should be easily extended to handle that.  Basically, when an
> instance comes up it broadcasts a request for all known SSO information to
> the cluster.  It then takes the first response it gets and continues
> processing as normal.
>
> Let me know if you dont find a proper solution to the problem and I will
> try
> to dig up that fix.  My intention was to post it back to the group, but I
> got sidetracked once we (temporarily) stopped using clustering.
>
>
> Shaun
>
> On Thu, Sep 3, 2009 at 3:52 AM, Sumedh Sakdeo  >wrote:
>
> > Hi Rainer,
> >
> > I am using Tomcat session clustering and Apache Http Server for LB(using
> > mod_jk module).  Also, using Tomcat 6. I have made appropriate changes to
> > worker.properties and httpd.conf. Also I have made appropriate changes to
> > server.xml on each tomcat.
> >
> > Thanks,
> > Sumedh
> >
> > On Thu, Sep 3, 2009 at 12:15 AM, Rainer Jung  > >wrote:
> >
> > > On 02.09.2009 19:57, Sumedh Sakdeo wrote:
> > > > Hello All,
> > > > I have a setup with two tomcat instances(A&B). I have
> > > configured
> > > > an apache web server 2.2 for load balancing and fail over. Setup
> looks
> > > fine
> > > > as per the configurations suggested. Let tomcat A be handling some
> > > request
> > > > at sometime. When tomcat instance(A) goes down, the session is
> > replicated
> > > to
> > > > another tomcat instance(B) successfully. Now tomcat instance B is
> > > handling
> > > > those requests. Till this point everything goes fine, but when I
> bring
> > up
> > > > tomcat instance(A) and after that tomcat instance(B) goes down, the
> > > session
> > > > is no longer replicated. What might be the issue? In status page of
> > > apache
> > > > server I see even if node status is OK session is not replicated to
> > fail
> > > > over node for second time.
> > >
> > > How do you replicate? Are you using Tomcat session clustering? Tomcat
> > > 5.5 or Tomcat 6?
> > >
> > > Regards,
> > >
> > > Rainer
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
> > >
> >
>


Re: tomcat 4.1.31 problem

2009-09-02 Thread jamez smith
Hi Mark,

Tomcat is only used for local development environment.  In our production,
we use Websphere application server on AIX.  I am also new to this project
and was told I can only use Tomcat 4.1 to setup my local development.

I like to clarify that the JVM 1.4 is no longer supported by Sun?

Thanks,
Jamez.

On Wed, Sep 2, 2009 at 9:52 PM, Mark Thomas  wrote:

> jamez smith wrote:
> >> Good day Chunk,
> >>
> >
>  Have you actually tried compiling under 1.5 or 1.6?  You might be
> >> surprised at how few problems there are.
> >>
> >> I could try to compile under 1.5.  But I dare not to use it in
> production
> >> box, as this project is well controlled by the company.  Every step I do
> >> need to be documented. I have no right to change the fundamental
> framework
> >> or JDK at all. :-(
>
> Here are a few arguments for upgrading the JVM and Tomcat
> - the JVM is no longer supported by Sun
> - the major Tomcat version (4.1.x) is no longer supported by the ASF
> - the minor Tomcat version (4.1.31) has 9 important, 2 moderate and 16
> known, published security vulnerabilities.
>
> If an application is so critical it has to be that tightly controlled, I
> have to wonder why that many security vulnerabilities are not a concern.
>  Can it really be the case that none of them apply in your environment?
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: query on tomcat connector

2009-09-02 Thread Bill Barker

"Bhuvanesh Pattanashetti"  wrote in message 
news:bce69da80909021136n22683ee8jeb4cf1ca927e2...@mail.gmail.com...
> Hello,
>
> i wanted to  create a https connector element at code level(not from
> server.xml).
> using
> http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/connector/Connector.html
> with protocol as Http11NioProtocol.
>
> I was not getting how to relate connector object and "keystore file and
> keypassword"
>

You should use the setAttribute method for anything that doesn't have it's 
own setter.  The 'name' is whatever is in the Tomcat docs for that 
particular connector.

> Any suggestions?
>
> thanks..
> Bhuvan
> 




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



Re: Apache Server failover and session replication

2009-09-02 Thread Shaun Senecal
After re-reading your initial post, the problems might not be as related as
I thought since at no point did replication "stop" for me.


On Thu, Sep 3, 2009 at 9:56 AM, Shaun Senecal wrote:

> We had a similar problem with Tomcat 6 using clustering.  It turns out that
> the SSO information is only propagated while all instances are running.  If
> Instance-A fails, several users then log in to Instance-B, then Instance-A
> comes back up, all of the SSO information for the users that logged in
> during the downtime is not included in Instance-A so those users are forced
> to re-login once the load balancer sends them to that instance.
>
> I wrote a fix for it, which might be useful for you.  However, it hasnt
> been fully tested and is designed to only share the SSO information at
> startup, not all Session information.  If Tomcat doenst handle this case,
> then the fix I wrote should be easily extended to handle that.  Basically,
> when an instance comes up it broadcasts a request for all known SSO
> information to the cluster.  It then takes the first response it gets and
> continues processing as normal.
>
> Let me know if you dont find a proper solution to the problem and I will
> try to dig up that fix.  My intention was to post it back to the group, but
> I got sidetracked once we (temporarily) stopped using clustering.
>
>
> Shaun
>
>
> On Thu, Sep 3, 2009 at 3:52 AM, Sumedh Sakdeo wrote:
>
>> Hi Rainer,
>>
>> I am using Tomcat session clustering and Apache Http Server for LB(using
>> mod_jk module).  Also, using Tomcat 6. I have made appropriate changes to
>> worker.properties and httpd.conf. Also I have made appropriate changes to
>> server.xml on each tomcat.
>>
>> Thanks,
>> Sumedh
>>
>> On Thu, Sep 3, 2009 at 12:15 AM, Rainer Jung > >wrote:
>>
>> > On 02.09.2009 19:57, Sumedh Sakdeo wrote:
>> > > Hello All,
>> > > I have a setup with two tomcat instances(A&B). I have
>> > configured
>> > > an apache web server 2.2 for load balancing and fail over. Setup looks
>> > fine
>> > > as per the configurations suggested. Let tomcat A be handling some
>> > request
>> > > at sometime. When tomcat instance(A) goes down, the session is
>> replicated
>> > to
>> > > another tomcat instance(B) successfully. Now tomcat instance B is
>> > handling
>> > > those requests. Till this point everything goes fine, but when I bring
>> up
>> > > tomcat instance(A) and after that tomcat instance(B) goes down, the
>> > session
>> > > is no longer replicated. What might be the issue? In status page of
>> > apache
>> > > server I see even if node status is OK session is not replicated to
>> fail
>> > > over node for second time.
>> >
>> > How do you replicate? Are you using Tomcat session clustering? Tomcat
>> > 5.5 or Tomcat 6?
>> >
>> > Regards,
>> >
>> > Rainer
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> > For additional commands, e-mail: users-h...@tomcat.apache.org
>> >
>> >
>>
>
>


Re: Apache Server failover and session replication

2009-09-02 Thread Shaun Senecal
We had a similar problem with Tomcat 6 using clustering.  It turns out that
the SSO information is only propagated while all instances are running.  If
Instance-A fails, several users then log in to Instance-B, then Instance-A
comes back up, all of the SSO information for the users that logged in
during the downtime is not included in Instance-A so those users are forced
to re-login once the load balancer sends them to that instance.

I wrote a fix for it, which might be useful for you.  However, it hasnt been
fully tested and is designed to only share the SSO information at startup,
not all Session information.  If Tomcat doenst handle this case, then the
fix I wrote should be easily extended to handle that.  Basically, when an
instance comes up it broadcasts a request for all known SSO information to
the cluster.  It then takes the first response it gets and continues
processing as normal.

Let me know if you dont find a proper solution to the problem and I will try
to dig up that fix.  My intention was to post it back to the group, but I
got sidetracked once we (temporarily) stopped using clustering.


Shaun

On Thu, Sep 3, 2009 at 3:52 AM, Sumedh Sakdeo wrote:

> Hi Rainer,
>
> I am using Tomcat session clustering and Apache Http Server for LB(using
> mod_jk module).  Also, using Tomcat 6. I have made appropriate changes to
> worker.properties and httpd.conf. Also I have made appropriate changes to
> server.xml on each tomcat.
>
> Thanks,
> Sumedh
>
> On Thu, Sep 3, 2009 at 12:15 AM, Rainer Jung  >wrote:
>
> > On 02.09.2009 19:57, Sumedh Sakdeo wrote:
> > > Hello All,
> > > I have a setup with two tomcat instances(A&B). I have
> > configured
> > > an apache web server 2.2 for load balancing and fail over. Setup looks
> > fine
> > > as per the configurations suggested. Let tomcat A be handling some
> > request
> > > at sometime. When tomcat instance(A) goes down, the session is
> replicated
> > to
> > > another tomcat instance(B) successfully. Now tomcat instance B is
> > handling
> > > those requests. Till this point everything goes fine, but when I bring
> up
> > > tomcat instance(A) and after that tomcat instance(B) goes down, the
> > session
> > > is no longer replicated. What might be the issue? In status page of
> > apache
> > > server I see even if node status is OK session is not replicated to
> fail
> > > over node for second time.
> >
> > How do you replicate? Are you using Tomcat session clustering? Tomcat
> > 5.5 or Tomcat 6?
> >
> > Regards,
> >
> > Rainer
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: thread dumps catalina.out

2009-09-02 Thread Jim Cox
Nothing magical to the two terms, just makes it easier to have a
tail/tee combo running while issuing the kill -QUIT cmd (v. via job
control, e.g).

For example, in terminal A:
prompt#tail -f /usr/local/tomcat/logs/catalina.out | tee /tmp/tomcat.dump.A

Now in terminal B:
prompt#ps -aef | egrep '[t]omcat'
root 17660 1  0   Sep 01 ?6:15 /usr/java/bin/java
-Dtomcat=1 -Xmx512m -Djava.awt.headl
root  8918  8899  0 23:41:01 pts/30:00 tee /tmp/tomcat.dump.A
root  8917  8899  0 23:41:01 pts/30:00 tail -f
/usr/local/tomcat/logs/catalina.out
prompt#kill -QUIT 17660
prompt#

After stopping the tail/tee combo in Term A (with Ctrl+C):
prompt#ls -alF /tmp/tomcat.dump.A
-rw-rw-r--   1 adir adir   20096 Sep  2 23:43 /tmp/tomcat.dump.A

prompt#head /tmp/tomcat.dump.A
Full thread dump Java HotSpot(TM) Client VM (1.4.2_13-b06 mixed mode):

"Thread-52" daemon prio=5 tid=0x007dc168 nid=0x40 waiting on condition
[0xd0181000..0xd01819c8]
at java.lang.Thread.sleep(Native Method)
at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:95)

"http80-Monitor" prio=5 tid=0x00355f18 nid=0x39 in Object.wait()
[0xd3081000..0xd30819c8]
at java.lang.Object.wait(Native Method)
- waiting on <0xd9057088> (a
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
at 
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:564)

prompt#tail /tmp/tomcat.dump.A
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)

"VM Thread" prio=5 tid=0x000d1120 nid=0x4 runnable

"VM Periodic Task Thread" prio=10 tid=0x000d8110 nid=0xa waiting on condition
"Suspend Checker Thread" prio=10 tid=0x000d5140 nid=0x7 runnable

prompt#

On Wed, Sep 2, 2009 at 3:09 PM, keeplearning wrote:
>
> Sorry. But I didn't understand how using 2 terminals would help me with the
> questions I posted.
>
>
>
> Jim Cox-2 wrote:
>>
>> FWIW, I usually do a tail/tee on catalina.out in a term, then do the
>> kill -QUIT  from another term, then kill the tail/tee
>> combo which leaves me with a reasonably clean thread dump.
>>
>> For example:
>>
>> Terminal A:
>> prompt$ tail -f /usr/local/tomcat/logs/catalina.out | tee
>> /tmp/tomcat-threads.tmpA
>>
>> Terminal B:
>> prompt$ kill -QUIT 12345
>>
>>
>> On Wed, Sep 2, 2009 at 2:56 PM, keeplearning wrote:
>>>
>>> Hi All,
>>>
>>> I have a quick question about getting thread dumps. I have been told that
>>> if
>>> I do kill -3 , it will send the thread dumps to catalina.out.
>>>
>>> Let say if I run test 1 and take 3 dumps. Then if I run test 2 and 3
>>> more.
>>> Do these get appended to first thread dumps I took?
>>>
>>> If yes, Let say if I run 3 different tests and take 3 dumps each test,
>>> how
>>> should I seperate those dumps as per specific tests. How do you guys
>>> normally do it?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263566.html
>>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263811.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



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

2009-09-02 Thread Mark Thomas
Bradley Wagner wrote:
> Any thoughts on which GC parameters I should change.

See what the default collector is for your platform and switch to s
different one.

Mark




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



reconfiguring tomcat logging

2009-09-02 Thread Chris Cheshire
Whenever tomat compiles a JSP page and there is an error in it (for
instance trying to reference a property on a bean that doesn't exist),
it is throwing (and obscuring) an exception and logging it to
catalina.out and then returning whatever html it has built to the
browser, as in :

Sep 2, 2009 2:07:28 PM org.apache.catalina.core.ApplicationDispatcher
invokeSEVERE: Servlet.service() for servlet jsp threw exception
javax.el.PropertyNotFoundException: Property 'blah' not found on com.foo.bar

(and then a ginormous stack trace)

This would be good if I knew which host actually had this error. I
have one tomcat instance server with a number of hosts, each a sandbox
for a developer.

Is there any way to configure the logging per host such that these
errors that get logged to catalina.out get logged to a host specific
log file instead of catalina.out (or as well as)? I am looking at the
document at http://tomcat.apache.org/tomcat-6.0-doc/logging.html, but
I just don't see/understand what I need to do.

This is not to be confused with logging generated from within my
context - I have that configured via logback going to its own log file
successfully - it's the tomcat engine errors that I need to deal with.

Or, if this isn't possible, is there a way to configure tomcat to
generate that stack trace about the PropertyNotFoundException as the
output html when it tries to compile the JSP instead of obscuring it
and returning a partially complete html page?

Thanks

Chris

Tomcat 6.0.20
CentOS 4
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)

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



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

2009-09-02 Thread Bradley Wagner
Here's the last 100 lines of it. That line with only 3 letters is actually
what is in the file. It's hanging mid-GC call.
2009-09-02 13:58:05,306 INFO  [TableMetadata] : table found:
hhtest.cxml_recyclerecord
2009-09-02 13:58:05,306 INFO  [TableMetadata] : columns: [id,
parentfolderid, unpublishrequestid, recyclestate, recycledby, recycledon]
2009-09-02 13:58:05,308 INFO  [TableMetadata] : table found:
hhtest.cxml_role_group_link
2009-09-02 13:58:05,308 INFO  [TableMetadata] : columns: [roleid, groupname]
2009-09-02 13:58:05,310 INFO  [TableMetadata] : table found:
hhtest.cxml_role_group_site_link
2009-09-02 13:58:05,310 INFO  [TableMetadata] : columns: [id, roleid,
siteid, groupname]
2009-09-02 13:58:05,312 INFO  [TableMetadata] : table found:
hhtest.cxml_role_user_link
2009-09-02 13:58:05,312 INFO  [TableMetadata] : columns: [username, roleid]
2009-09-02 13:58:05,314 INFO  [TableMetadata] : table found:
hhtest.cxml_role_user_site_link
2009-09-02 13:58:05,314 INFO  [TableMetadata] : columns: [id, username,
roleid, siteid]
2009-09-02 13:58:05,316 INFO  [TableMetadata] : table found:
hhtest.cxml_roles
2009-09-02 13:58:05,317 INFO  [TableMetadata] : columns: [sitesabilities,
toolsabilities, globalabilities, id, rolename, securityareaabilities,
global, homeareaabilities, permissionsid, adminareaabilities]
2009-09-02 13:58:05,320 INFO  [TableMetadata] : table found:
hhtest.cxml_site
2009-09-02 13:58:05,320 INFO  [TableMetadata] : columns: [publishevery,
timetopublish, nextversionid, usesscheduledpublishing, defaultmetadatasetid,
prevversionid, baseassetfactorycontainerid, iscurrentversion,
startingpageid, permissionsid, url, id, cssfileid, metadataid, versiondate,
name, path, publisheverytimeunit, cssclasses, lockid]
2009-09-02 13:58:05,322 INFO  [TableMetadata] : table found:
hhtest.cxml_site_roles
2009-09-02 13:58:05,322 INFO  [TableMetadata] : columns: [roleid, siteid]
2009-09-02 13:58:05,325 INFO  [TableMetadata] : table found:
hhtest.cxml_structureddata
2009-09-02 13:58:05,325 INFO  [TableMetadata] : columns: [blockid,
ownerpageid, fileid, id, name, structureddataid, structureddatatype,
groupstructureddataid, symlinkid, textdata, assettype, pageid, textversion]
2009-09-02 13:58:05,329 INFO  [TableMetadata] : table found:
hhtest.cxml_structureddatadefcont
2009-09-02 13:58:05,329 INFO  [TableMetadata] : columns: [nextversionid,
prevversionid, iscurrentversion, permissionsid, id, isroot, metadataid,
versiondate, name, containerid, path, siteid, lockid]
2009-09-02 13:58:05,332 INFO  [TableMetadata] : table found:
hhtest.cxml_structureddatadefinition
2009-09-02 13:58:05,332 INFO  [TableMetadata] : columns: [nextversionid,
prevversionid, iscurrentversion, permissionsid, id, metadataid, versiondate,
name, containerid, path, siteid, xmlid, lockid]
2009-09-02 13:58:05,335 INFO  [TableMetadata] : table found:
hhtest.cxml_systemproperty
2009-09-02 13:58:05,335 INFO  [TableMetadata] : columns: [id, name, value]
2009-09-02 13:58:05,341 INFO  [TableMetadata] : table found:
hhtest.cxml_target
2009-09-02 13:58:05,341 INFO  [TableMetadata] : columns: [publishpath,
nextversionid, lastdatepublished, shouldincludexmldeclaration,
iscurrentversion, id, isroot, versiondate, containerid, name, path, siteid,
destinationcontainertype, shouldincludetargetpath, basefolderid,
removebasefolderfrompubpath, publishevery, timetopublish,
usesscheduledpublishing, prevversionid, permissionsid, extension,
parenttargetid, cssfileid, metadataid, lastpublishedby, serializationtype,
publisheverytimeunit, cssclasses, lockid]
2009-09-02 13:58:05,345 INFO  [TableMetadata] : table found:
hhtest.cxml_transport
2009-09-02 13:58:05,345 INFO  [TableMetadata] : columns: [port,
databasename, nextversionid, ispassive, foreignsiteid, iscurrentversion,
password, id, username, versiondate, containerid, name, path, siteid,
transporttype, initialdirectory, accountid, ftptransversion, prevversionid,
servername, permissionsid, metadataid, directory, issecure, packetsize,
lockid]
2009-09-02 13:58:05,348 INFO  [TableMetadata] : table found:
hhtest.cxml_transportcontainer
2009-09-02 13:58:05,348 INFO  [TableMetadata] : columns: [nextversionid,
prevversionid, iscurrentversion, permissionsid, id, isroot, metadataid,
versiondate, name, containerid, path, siteid, lockid]
2009-09-02 13:58:05,351 INFO  [TableMetadata] : table found:
hhtest.cxml_user
2009-09-02 13:58:05,351 INFO  [TableMetadata] : columns: [isenabled,
username, hash, email, ldapdn, authmode, defaultsiteid, defaultgroup,
password, fullname]
2009-09-02 13:58:05,376 INFO  [TableMetadata] : table found:
hhtest.cxml_workflow
2009-09-02 13:58:05,376 INFO  [TableMetadata] : columns: [historyid,
definitionxml, expirationwarningsent, id, currentstepid, startdate,
relatedentitytype, name, owner, isinitialized, iscompleted, relatedentityid,
enddate, firststepid]
2009-09-02 13:58:05,379 INFO  [TableMetadata] : table found:
hhtest.cxml_workflowaction
2009-09-02 13:58:05,379 INFO  [TableMetadata] : columns: [id,
firsttr

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

2009-09-02 Thread Jason Wright
Hello,

I've an interesting situation with our application clusters. I am running
multiple applications for one of our websites. We don't share sessions
between the different servers; we use sticky sessions instead. Session
replication is difficult because of the large size of our users' sessions.

We use applications A & B. I would like application A to run on servers 1
and 2 and application B to run on servers 3 and 4.

The user initially requests application A and receives a sticky session for
server 1. Later, the user requests application B. Since the sticky session
was set, server 1 is accessed, but application B is not found. If
sticky_session_force is set, then another server is tried; however, the
sticky session will still be set to server 1 and the application B may not
use the same server.

I've thought of 3 possible ways to solve this problem with a preference to
the one I don't know how to do yet.

The first (my preference) is to be able to use multiple sticky sessions, one
for each application. This might involve multiple copies of modjk loaded by
tomcat with multiple workers.properties files, or something like that. I
would have no idea of how to do this. Does anyone know how to do this?

The second way of solving this problem is to use multiple copies of Tomcat
bound to different IP addresses with different configuration files. This
solution would be seen as subdomains to the user.

The third way of solving this problem is to use multiple copies of Tomcat
bound to different ports (same IP address) with different configuration
files. This solution would have the same domain, but different port numbers.


I'm pretty sure that the second and third solutions would work, but I'm not
sure about the first solution. I've searched extensively and haven't found
anyone with the same problem. Has anyone on this list been in this situation
or know the best way to solve this problem?



Thanks in advance,
Jason Wright

-- 


Jason Wright
TCN Systems Administrator
jason.wri...@tcnbroadcasting.com
Office (866) 745-1901 x123
Cell (801) 687-3260


Re: Apache Tomcat ICD-10 compliance

2009-09-02 Thread Mark Thomas
Mokri, Rhonda R wrote:
> Please indicate if there is a document that references Apache Tomcat icd-10 
> support as my searches of the Tomcat FAQ and Tomcat related websites have not 
> produced any hits. My US based employer is a health care based organization 
> that requires that we research every application to determine if there is a 
> roadmap to support the migration to icd-10 by 2013.   My initial response to 
> my employer that there is a low likelihood of any issue with Tomcat and 
> icd-10 was rejected as not being sufficiently 'official'.  Thank you.

It is irrelevant. Tomcat doesn't give two hoots about the data it is
processing. It is the application(s) you choose to run on Tomcat that
would need to be compliant.

Mark




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



Apache Tomcat ICD-10 compliance

2009-09-02 Thread Mokri, Rhonda R
Please indicate if there is a document that references Apache Tomcat icd-10 
support as my searches of the Tomcat FAQ and Tomcat related websites have not 
produced any hits. My US based employer is a health care based organization 
that requires that we research every application to determine if there is a 
roadmap to support the migration to icd-10 by 2013.   My initial response to my 
employer that there is a low likelihood of any issue with Tomcat and icd-10 was 
rejected as not being sufficiently 'official'.  Thank you.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

EMAIL CONFIDENTIALITY NOTICE 

This Email message, and any attachments, may contain confidential 
patient health information that is legally protected. This information 
is intended only for the use of the individual or entity named above. 
The authorized recipient of this information is prohibited from disclosing 
this information to any other party unless required to do so by law 
or regulation and is required to destroy the information after its stated 
need has been fulfilled. If you are not the intended recipient, you are 
hereby notified that any disclosure, copying, distribution, or action 
taken in reliance on the contents of this message is strictly prohibited. 

If you have received this information in error, please notify 
the sender immediately by replying to this message and delete the 
message from your system.


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

2009-09-02 Thread Caldarale, Charles R
> From: Bradley Wagner [mailto:bradley.wag...@hannonhill.com]
> Subject: Re: 100% usage and hanging on startup of Spring/Hibernate app
> in Tomcat 5.5 on Ubuntu 7
> 
> I've also attached the catalina.out log which shows the GC 
> basically freezing.

Unfortunately, that log was stripped; can you post it somewhere?

 - 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: IIS isapi_redirect.dll chunked encoding option

2009-09-02 Thread Andy Wang

Rainer Jung wrote:

Difficult to answer. My feeling is, that the code is fine and the
original contributor Tim Whittington seemed to have used basically the
same code for quite some time.

On the other hand only having it in a separate binary will still prevent
most people to use it, so it might still not be used broadly out in the
field.

At least we are not aware of any problem with the chunked encoding code.

Regards,

Rainer

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

  

Ranier,
Thanks for the generally positive answer :).
We're going to try to enable it out of the box on our IIS configurations 
and see how things go, so pretty soon, there'll be alot more machines 
potentially running with the chunked encoding option.


I haven't looked that closely at the code, but was there enough worry 
that it would cause side effects to make it a compile time AND a 
configuration option?


Andy

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



Re: /context not working -- mod_jk error: no match for /server-status

2009-09-02 Thread Dennis Christopher

Rainer,

Thanks for the reply. I was confused in my orginal post: I am not  
using JBoss at all, only mod_jk.


The file contents are as follows below.

Apache has a hosts directory, but I'm not sure if the files matter.  
They are either the apache .default files or slight modifications of  
them,

e.g. virtual_host_global.conf contains just:

Listen *:80

Dennis


1. uriworkermap.properties -- not used

2. from apache2/httpd.conf:

LoadModule jk_module libexec/apache2/mod_jk.so
.
.

JKWorkersFile /etc/apache2/workers.properties
JKLogFile /var/log/apache2/mod_jk.log
JKLogLevel debug
JKShmFile /var/log/apache2/mod_jk.shm
JKMount /*.jsp JBoss1
JKMount /servlet/* JBoss1
JKMount /examples/* JBoss1
JKMount /picturetalk/* JBoss1
JKMount /sample/* JBoss1

.
.

3. from apache2/workers.properties:

worker.list=JBoss1, JBoss2, loadbalancer, blojsomworker

# 
# First JBoss server
# 
worker.JBoss1.port=8009
worker.JBoss1.host=127.0.0.1
worker.JBoss1.type=ajp13

# Specify the size of the open connection cache.
#worker.JBoss1.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  > lbfactor must be > 0
#  > Low lbfactor means less work done by the worker.
worker.JBoss1.lbfactor=100


# 
# Second JBoss server
# 
#worker.JBoss2.port=9008
#worker.JBoss2.host=localhost
worker.JBoss2.lbfactor=100


# 
# Load Balancer worker
# 

#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
#  > If a worker dies, the load balancer will check its state
#once in a while. Until then all work is redirected to peer
#worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=JBoss1, JBoss2

# 
# Blojsom worker
# 
#
# Worker created specifically for Blojsom.
worker.blojsomworker.port=1279
worker.blojsomworker.host=127.0.0.1
worker.blojsomworker.type=ajp13
worker.blojsomworker.lbfactor=100


# END workers.properties
#

On Sep 2, 2009, at 2:05 PM, Rainer Jung wrote:


On 27.08.2009 15:45, Dennis Christopher wrote:
environment: Tomcat 6.0.18 under apache2 on Mac OS X Server 10.5  
(Leopard).


I am using a mod_jk connector with JBoss.

I am having trouble getting context urls of the form
website.my.com/myapplication honoured (or even localhost/ 
myapplication).

(Safari:File not found).I have googled  the error messages below but
can't find anything applicable to my setup.

The quick start guide at

http://tomcat.apache.org/connectors-doc/generic_howto/quick.html

gives a simple proof of concept for a connector setup (/examples").
However, this does not work,
though I have followed the editing of the configuration files exactly
(using JKMount in the httpd.conf etc)

I get an error in mod_jk.log (set to debug level):

[Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): (TEST)  
Attempting to

map URI '/server-status' from 5 maps
[Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
map_uri_to_worker_ext::jk_uri_worker_map.c (1039): Initial match
value:for URI '/server-status' is -1.
[Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
find_match::jk_uri_worker_map.c (850): Attempting to map context URI
'/examples/*=JBoss1' source 'JkMount'
[Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
find_match::jk_uri_worker_map.c (850): Attempting to map context URI
'/servlet/*=JBoss1' source 'JkMount'
[Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
find_match::jk_uri_worker_map.c (850): Attempting to map context URI
'/sample/*=JBoss1' source 'JkMount'
[Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
find_match::jk_uri_worker_map.c (850): Attempting to map context URI
'/*.jsp=JBoss1' source 'JkMount'
[Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
map_uri_to_worker_ext::jk_uri_worker_map.c (1047): Match value:for  
URI

'/server-status' is -1.
[Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
jk_translate::mod_jk.c (3536): no match for /server-status found

Any help on how to diagnose what the seeming error is pointing to  
would

be much appreciated.


This log snippet is not useful, because the request you used was for
/server-status, which is most likely not a request you want mod_jk to
send to JBoss.

Please post all your JK directives from your httpd.conf and the files
included in that. Also post your workers.properties, and if you use it
the uriworkermap.properties file.

The most common cause why simple setups do not work is the use of
virtual hosts in the Apache configuration. If you have virtual hosts,
you have to put JkMount into the virtual hosts, or you set  
"JkMountCopy

All" in the global part of the configuration.

Regards,

Rainer

-

Re: Can catalina-cluster from Tomcat 5.5 be used in Tomcat 6?

2009-09-02 Thread Rainer Jung
On 01.09.2009 20:16, Florian Kirchhoff wrote:
> I would like to know if it possible to use the legacy clustering module from
> Tomcat 5.5 in Tomcat 6.
> 
> I remember seeing a separate project for this exact purpose but cannot find
> it anymore, does anyone know about this?
> 
> To preempt any question as to why would I not use cluster-ha and
> cluster-tribes, all I can say is that it's not an option in my case.

You can check it out from subversion:

svn checkout
http://svn.apache.org/repos/asf/tomcat/sandbox/tomcat-oacc/trunk/

It comes with ant build file and documentation and is easy to build and
install. We didn't release it yet, so you can't download a binary for it.

The configuration is identical to TC 5.5 cluster and 99% of the code
also (and in sync with the latest cluster code in TC 5.5).

Let us know your experiences with it!

Regards,

Rainer

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



Re: thread dumps catalina.out

2009-09-02 Thread Rainer Jung
On 02.09.2009 21:05, Jim Cox wrote:
> FWIW, I usually do a tail/tee on catalina.out in a term, then do the
> kill -QUIT  from another term, then kill the tail/tee
> combo which leaves me with a reasonably clean thread dump.
> 
> For example:
> 
> Terminal A:
> prompt$ tail -f /usr/local/tomcat/logs/catalina.out | tee
> /tmp/tomcat-threads.tmpA
> 
> Terminal B:
> prompt$ kill -QUIT 12345

Depending on the JVM the dumps usually start with a header like "Full
thread dump..."

Recent Java 6 JVMs also add a timestamp to this header.

Regards,

Rainer

> On Wed, Sep 2, 2009 at 2:56 PM, keeplearning wrote:
>>
>> Hi All,
>>
>> I have a quick question about getting thread dumps. I have been told that if
>> I do kill -3 , it will send the thread dumps to catalina.out.
>>
>> Let say if I run test 1 and take 3 dumps. Then if I run test 2 and 3 more.
>> Do these get appended to first thread dumps I took?
>>
>> If yes, Let say if I run 3 different tests and take 3 dumps each test, how
>> should I seperate those dumps as per specific tests. How do you guys
>> normally do it?
>> --
>> View this message in context: 
>> http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263566.html
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>

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



Re: thread dumps catalina.out

2009-09-02 Thread keeplearning

Sorry. But I didn't understand how using 2 terminals would help me with the
questions I posted.



Jim Cox-2 wrote:
> 
> FWIW, I usually do a tail/tee on catalina.out in a term, then do the
> kill -QUIT  from another term, then kill the tail/tee
> combo which leaves me with a reasonably clean thread dump.
> 
> For example:
> 
> Terminal A:
> prompt$ tail -f /usr/local/tomcat/logs/catalina.out | tee
> /tmp/tomcat-threads.tmpA
> 
> Terminal B:
> prompt$ kill -QUIT 12345
> 
> 
> On Wed, Sep 2, 2009 at 2:56 PM, keeplearning wrote:
>>
>> Hi All,
>>
>> I have a quick question about getting thread dumps. I have been told that
>> if
>> I do kill -3 , it will send the thread dumps to catalina.out.
>>
>> Let say if I run test 1 and take 3 dumps. Then if I run test 2 and 3
>> more.
>> Do these get appended to first thread dumps I took?
>>
>> If yes, Let say if I run 3 different tests and take 3 dumps each test,
>> how
>> should I seperate those dumps as per specific tests. How do you guys
>> normally do it?
>> --
>> View this message in context:
>> http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263566.html
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263811.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



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

2009-09-02 Thread Bradley Wagner
Thanks for the clarification on the initial heap size. I've set both Xms and
Xmx to 512m for the following test.
I was able to reproduce the problem immediately with:
- Xms and Xmx both set to 512m
- Java 1.6 with no JPDA running
- XX:+PrintGCDetails enabled

I've attached the thread dump which I took on the 3rd or 4th attempt after
the process hung. They were all the same on each measure.

I've also attached the catalina.out log which shows the GC basically
freezing.

One thing that it is a little odd is that the Catalina log is basically in
the middle of (or possibly JUST finished) some kind of hibernate
initialization but the blocked thread (the only thread doing anything but
sleeping) doesn't really indicate this.

- Bradley

On Mon, Aug 31, 2009 at 6:19 PM, Leon Rosenberg <
rosenberg.l...@googlemail.com> wrote:

> Hello,
> This indeed sounds like you have problems with one of the spaces,
> please add following option to the JAVA_OPTS (or whatever you are
> using) to seubmit jvm parameters:
> -XX:+PrintGCDetails
>
> And, no tomcat's initial heap size don't default to 64Mb. The JVM
> allocateds a heap dependent on your computer type, for example the 1.5
> VM would identify a 2 core 2 GB machine as 'server' and allocated more
> memory than with 1 core cpu.
>
> http://72.5.124.55/docs/hotspot/gc5.0/ergo5.html
>
> regards
> Leon
>
> P.S. I know the link looks strange it come ups from google:
>
> http://www.google.de/search?q=hotspot+memory+ergonomics&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
>
> P.P.S I had a similar situation once, as a client had set space sizes
> manually (new and old) and the old space was full. The VM was only
> full garbage collecting which led to 100% CPU usage and strange thread
> dumps. The above option would help you in this case to identify the
> full gc runs previously and during the hangup.
>
>
>
> On Mon, Aug 31, 2009 at 11:34 PM, Bradley
> Wagner wrote:
> >>
> >> The other interesting point is that all of those are hung in places
> where
> >
> > they would naturally be allocating an object or have very recently
> allocated
> >
> > an object, and the JVM *might* in theory be growing the heap.  Bradley,
> are
> >
> > your initial and maximum heap sizes identical (I suspect not from your
> >
> > original message)?  If not, what happens if you make them so?
> >
> >
> > From my original post, I'm setting the following memory parameters:
> >
> > -Xmx512M -XX:MaxPermSize=128m
> >
> > so I'm not setting an initial heap size at all. If I remember correctly,
> > Tomcat's initial heap size default's to 64MB or something.
> >
> > I'll try to set the initial and max to the same to see if that has any
> > effect.
> >
> > Thanks,
> > Bradley
> >
> > On Mon, Aug 31, 2009 at 4:59 PM, Peter Crowther <
> peter.crowt...@melandra.com
> >> wrote:
> >
> >> 2009/8/31 Christopher Schultz 
> >>
> >> > -BEGIN PGP SIGNED MESSAGE-
> >> > Hash: SHA1
> >> >
> >> > Bradley,
> >> >
> >> > On 8/31/2009 4:02 PM, Bradley Wagner wrote:
> >> > > Sorry, I should have mentioned this before, but in all cases I tried
> >> the
> >> > > thread dumps 2-3 times at least 30s apart and none of the threads
> have
> >> > > progressed at all.
> >> >
> >> > I agree with Mark: the three threads you showed were different
> >> > (different ids), and showing different call stacks. Are you saying
> that
> >> > each thread dump you took represents multiple thread dumps where that
> >> > particular thread didn't progress /at all/ over your multi-dump
> sample?
> >> >
> >> > You might even want to run strace to see which library function calls
> >> > are actually completing.
> >> >
> >>
> >> Agree.
> >>
> >> The other interesting point is that all of those are hung in places
> where
> >> they would naturally be allocating an object or have very recently
> >> allocated
> >> an object, and the JVM *might* in theory be growing the heap.  Bradley,
> are
> >> your initial and maximum heap sizes identical (I suspect not from your
> >> original message)?  If not, what happens if you make them so?
> >>
> >> - Peter
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Attaching to process ID 26202, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 14.0-b16
Deadlock Detection:

No deadlocks found.

Thread 26216: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
 - java.util.TimerThread.mainLoop() @bci=28, line=483 (Interpreted frame)
 - java.util.TimerThread.run() @bci=1, line=462 (Interpreted frame)


Thread 26215: (state = BLOCKED)
 - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
 - 
com.hannonhill.cascade.model.search.MemoryQueueSearchJobScheduler$ConsumerThread.run()
 @bci=17, line=56 (Interpreted frame)


Thread 26

RE: thread dumps catalina.out

2009-09-02 Thread Caldarale, Charles R
> From: keeplearning [mailto:p_sodh...@yahoo.com]
> Subject: thread dumps catalina.out
> 
> I have been told that if I do kill -3 , it will 
> send the thread dumps to catalina.out.

I prefer to use jstack, since I can control where the output goes for each dump.

 - 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: thread dumps catalina.out

2009-09-02 Thread Jim Cox
FWIW, I usually do a tail/tee on catalina.out in a term, then do the
kill -QUIT  from another term, then kill the tail/tee
combo which leaves me with a reasonably clean thread dump.

For example:

Terminal A:
prompt$ tail -f /usr/local/tomcat/logs/catalina.out | tee
/tmp/tomcat-threads.tmpA

Terminal B:
prompt$ kill -QUIT 12345


On Wed, Sep 2, 2009 at 2:56 PM, keeplearning wrote:
>
> Hi All,
>
> I have a quick question about getting thread dumps. I have been told that if
> I do kill -3 , it will send the thread dumps to catalina.out.
>
> Let say if I run test 1 and take 3 dumps. Then if I run test 2 and 3 more.
> Do these get appended to first thread dumps I took?
>
> If yes, Let say if I run 3 different tests and take 3 dumps each test, how
> should I seperate those dumps as per specific tests. How do you guys
> normally do it?
> --
> View this message in context: 
> http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263566.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: Client SSL certificate chain in Tomcat 6 when using AJP

2009-09-02 Thread Rainer Jung
On 31.08.2009 18:38, iam wrote:
> Bill, Thanks for your prompt response.
> I see that it will be available in Tomcat 6.0.21 onwards. Do you know when 
> will it be available for download ?
> 
> Also, does it resolve the 8k size limit on AJP connector or if there is a way 
> around it ?
> We are using Soap headers and with cert-chain I am thinking this will be a 
> big issue !

Look for max_packet_size on

http://tomcat.apache.org/connectors-doc/reference/workers.html

Regards,

Rainer

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



Re: Jakarta Connector 1.2.28 with Windows Server 2008 32bit, IIS 7.0

2009-09-02 Thread Rainer Jung
What's your configuration? Anything in the log file of the redirector?

You might also double check

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

Regards,

Rainer

On 25.08.2009 13:46, Michael Wall wrote:
> From: Michael Wall 
> Date: Tue, Aug 25, 2009 at 1:05 PM
> Subject: Jakarta Connector 1.2.28 with Windows Server 2008 32bit, IIS 7.0
> To: users@tomcat.apache.org
> 
> 
> 
> Hello
> 
> Can anyone help me found out a solution on this problem?
> 
> 
> I have tried to use  Jakarta Connector 1.2.28 with Windows Server 2008
> 32bit, for SSO through IIS 7.0
> 
> 
> The message I get from IIS is:
> HTTP Error 500.0 - Internal Server Error
> Calling GetFilterVersion on ISAPI filter "C:\ajp\bin\isapi_redirect.dll"
> failed
> 
> Have basically followed the guide in:
> http://www.jboss.org/community/wiki/UsingModjk12WithJBossAndIIS7
> even if I not have jboss ( only tomcat)
> I have checked up the permissions in IIS/Explorer/Registry.
> 
> Regards
> /
> Michael Wall

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



Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Mohit Anchlia
Something like this:

(DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=somesid)))



On Wed, Sep 2, 2009 at 11:53 AM, Mohit Anchlia wrote:
> Did you look at Oracle RAC docs?
>
> On Wed, Sep 2, 2009 at 11:10 AM, Bill Davidson wrote:
>> Tim Funk wrote:
>>>I thought the Oracle JDBC driver allowed for all the nodes to be placed
>>>into the connect string and the driver was smart enough to detect failover.
>>>[So its a configuration exercise on the connection string.]
>>
>> I'm having trouble finding documentation for this capability.  Can you
>> or someone else provide a pointer?
>>
>>
>> -
>> 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



thread dumps catalina.out

2009-09-02 Thread keeplearning

Hi All,

I have a quick question about getting thread dumps. I have been told that if
I do kill -3 , it will send the thread dumps to catalina.out.

Let say if I run test 1 and take 3 dumps. Then if I run test 2 and 3 more.
Do these get appended to first thread dumps I took?

If yes, Let say if I run 3 different tests and take 3 dumps each test, how
should I seperate those dumps as per specific tests. How do you guys
normally do it?
-- 
View this message in context: 
http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263566.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: IIS isapi_redirect.dll chunked encoding option

2009-09-02 Thread Rainer Jung
On 21.08.2009 20:51, Andy Wang wrote:
> What are the general thoughts on the stability of the
> enable_chunked_encoding option for the IIS isapi redirector for tomcat
> and IIS?
> 
> We're running into a scenario where something is causing IIS to not send
> down the complete response.  Haven't figured out exactly the cause yet,
> but the symptoms are the browser never acknowledges a response was
> complete even though tomcat has fully written the response out through
> to the web server.  Wireshark captures show the last few packets not
> being sent so the response is just a little short of what's to be expected.
> 
> One thing we noticed was setting enable_chunked_encoding (with a
> redirectory built for chunked encoding of course) made everything work
> fine so I wanted to get a feel for just how experimental this really is
> and what the general consensus is on it's stability.

Difficult to answer. My feeling is, that the code is fine and the
original contributor Tim Whittington seemed to have used basically the
same code for quite some time.

On the other hand only having it in a separate binary will still prevent
most people to use it, so it might still not be used broadly out in the
field.

At least we are not aware of any problem with the chunked encoding code.

Regards,

Rainer

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



Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Mohit Anchlia
Did you look at Oracle RAC docs?

On Wed, Sep 2, 2009 at 11:10 AM, Bill Davidson wrote:
> Tim Funk wrote:
>>I thought the Oracle JDBC driver allowed for all the nodes to be placed
>>into the connect string and the driver was smart enough to detect failover.
>>[So its a configuration exercise on the connection string.]
>
> I'm having trouble finding documentation for this capability.  Can you
> or someone else provide a pointer?
>
>
> -
> 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: Apache Server failover and session replication

2009-09-02 Thread Sumedh Sakdeo
Hi Rainer,

I am using Tomcat session clustering and Apache Http Server for LB(using
mod_jk module).  Also, using Tomcat 6. I have made appropriate changes to
worker.properties and httpd.conf. Also I have made appropriate changes to
server.xml on each tomcat.

Thanks,
Sumedh

On Thu, Sep 3, 2009 at 12:15 AM, Rainer Jung wrote:

> On 02.09.2009 19:57, Sumedh Sakdeo wrote:
> > Hello All,
> > I have a setup with two tomcat instances(A&B). I have
> configured
> > an apache web server 2.2 for load balancing and fail over. Setup looks
> fine
> > as per the configurations suggested. Let tomcat A be handling some
> request
> > at sometime. When tomcat instance(A) goes down, the session is replicated
> to
> > another tomcat instance(B) successfully. Now tomcat instance B is
> handling
> > those requests. Till this point everything goes fine, but when I bring up
> > tomcat instance(A) and after that tomcat instance(B) goes down, the
> session
> > is no longer replicated. What might be the issue? In status page of
> apache
> > server I see even if node status is OK session is not replicated to fail
> > over node for second time.
>
> How do you replicate? Are you using Tomcat session clustering? Tomcat
> 5.5 or Tomcat 6?
>
> Regards,
>
> Rainer
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: [OT] Apache httpd prefork versus worker MPM

2009-09-02 Thread Rainer Jung
On 19.07.2009 20:46, James Abley wrote:
> James Abley wrote:
>> This assumes that mod_jk is thread-safe and doesn't suffer from the known
>> problems with non-thread-safe modules in worker MPM. Can anyone confirm
>> that's true?

> Answering my own question; from the docs, it looks like mod_jk is built by
> default to be thread-safe, and you need to switch that off using the
> --enable-prefork option at build time. [1]

> [1]
> http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html#configure%20arguments

Don't know, whether this is still relevant after a couple of weeks: yes,
the above is true, at least since a couple of versions of mod_jk.

Previously it tried to detect the MPM during build, but that was broken
for some platforms like AIX, so we thought it's safer to assume a
threaded environment by default, also allowing to switch between the
MPMs without recompilation of mod_jk.

Regards,

Rainer

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



Re: Apache Server failover and session replication

2009-09-02 Thread Rainer Jung
On 02.09.2009 19:57, Sumedh Sakdeo wrote:
> Hello All,
> I have a setup with two tomcat instances(A&B). I have configured
> an apache web server 2.2 for load balancing and fail over. Setup looks fine
> as per the configurations suggested. Let tomcat A be handling some request
> at sometime. When tomcat instance(A) goes down, the session is replicated to
> another tomcat instance(B) successfully. Now tomcat instance B is handling
> those requests. Till this point everything goes fine, but when I bring up
> tomcat instance(A) and after that tomcat instance(B) goes down, the session
> is no longer replicated. What might be the issue? In status page of apache
> server I see even if node status is OK session is not replicated to fail
> over node for second time.

How do you replicate? Are you using Tomcat session clustering? Tomcat
5.5 or Tomcat 6?

Regards,

Rainer

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



Re: Tomcat over AJP with Apache in front SSL Issues

2009-09-02 Thread Rainer Jung
On 14.08.2009 06:53, matt617 wrote:
> 
> I am using Apaches MOD SSL to do the certificate enforcement. It then uses
> the mod proxy to push the certificate info over AJP to my tomcat instance.
> tomcat does not have SSL enables at the container level but my application
> seems to pick up the certificate info jsut fine this way... 
> 
> yes i mean that the browser is prompting the user for their client
> certificate repeatedly, roughly once every 10 minutes, this is the problem i
> have been struggling with.

Hmmm, do your have the SSL session timeout in Apache set to 600 seconds?
It would indicate, that there's a problem with session renegotiation and
client certificates. Usually this should work.

Check the SSL session timeout to see, whether your 10 minutes could come
from the (and choose another value to verify, that the 10 minutes change
accordingly).

If this is true, I would first update to a recent version of Apache and
OpenSSL in order to rule out bugs there.

Another possibility could be a browser bug. Does it happen for varous
browsers, like MSIE and Firefox?

Regards,

Rainer

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



query on tomcat connector

2009-09-02 Thread Bhuvanesh Pattanashetti
Hello,

i wanted to  create a https connector element at code level(not from
server.xml).
using
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/connector/Connector.html
with protocol as Http11NioProtocol.

I was not getting how to relate connector object and "keystore file and
keypassword"

Any suggestions?

thanks..
Bhuvan


Re: Tomcat behind Apache reverse proxy

2009-09-02 Thread Rainer Jung
On 11.08.2009 15:37, Rainer Frey wrote:
> On Tuesday 11 August 2009 10:40:48 Mark Thomas wrote:
>> Rainer Frey wrote:
>>> With AJP,
>>> isn't that information also available in the protocol request and set
>>> automatically by the AJP connector?
>>
>> I believe so.
> 
> I tried, and it works. Does it make sense to set these attributes at all on 
> an 
> APR connector then?

Some general information about this situation is contained in the mod_jk
docs page:

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html

It is mostly about AJP13, HTTP and reverse proxies and not mod_jk specific.

Regards,

Rainer

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



Re: mod_jk mod_proxy configuration generator webapp

2009-09-02 Thread Rainer Jung
Very cool!

On 07.08.2009 20:53, Samuel Mendenhall wrote:
> Here is a webapp I wrote recently: http://lbconfig.appspot.com/   to solve
> the annoying problem of hand writing an optimized configuration for mod_jk
> setup, which for me, I do a lot.   This is by no means feature complete, and
> I welcome suggestions, my email is on the site, but it is a good start,
> considering there isn't a tool out there that I know of to accomplish this.
> 
> I recently added mod_proxy config generation, it is very basic, the meat of
> the what is generated is in the explanation of the math behind the
> configuration, specifically when using the worker mpm.
> 
> Comments and feature requests welcome, hope you guys can benefit from this
> :)
> 
> -Samuel

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



Re: mod_jk, missing uri map

2009-09-02 Thread Rainer Jung
... or try JkMountCopy All

On 13.08.2009 09:28, bazzaP wrote:
> 
> I came across the same error in my mod_jk.log file. It turned out not to be a
> problem with my mod_jk configuration though...I had set the
> transport-guarantee in web.xml to CONFIDENTIAL, but forgotten to configure
> the server certificate. I noticed you are also callling https:// . When I
> changed my transport-guarantee to NONE, it worked. So try doing the same, or
> check your SSL settings in apache?
> 
> 
> Diego Figueroa wrote:
>>
>> Hi,
>>
>> I'm having issues using mod_jk 1.2.28 with Tomcat 6.0.18 and Apache 2.2. 
>> Whenever I call one of the mount points defined on my apache2.conf file I 
>> get the same message in the log file (below). I am including what I 
>> believe are the relevant portions of my config files. Thanks!
>>
>> I call the URL:
>>
>> https://localhost/ceo/servlet/ceo
>>
>> My mod_jk.log shows:
>>
>> [Thu Jun 11 11:34:58 2009] [10331:3075028768] [debug] 
>> jk_child_init::mod_jk.c (3068): Initialized mod_jk/1.2.28
>> [Thu Jun 11 11:35:07 2009] [10075:3075028768] [debug] 
>> jk_translate::mod_jk.c (3419): missing uri map for 
>> localhost:/ceo/servlet/ceo
>> [Thu Jun 11 11:35:07 2009] [10075:3075028768] [debug] 
>> jk_map_to_storage::mod_jk.c (3579): missing uri map for 
>> localhost:/ceo/servlet/ceo
>>
>> My apache2.conf has:
>>
>> --- apache2.conf ---
>> LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
>> JkWorkersFile /etc/apache2/workers.properties
>> JkLogFile /var/log/apache2/mod_jk.log
>> JkLogLevel debug
>> JkShmFile /var/log/apache2/jk.shm
>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>> JkRequestLogFormat "%w %V %T"
>> JkMount /ceo/* ajp13
>> --- apache2.conf ---
>>
>> My worker.properties file:
>>
>> --- workers.properties ---
>> workers.tomcat_home=/home/dfiguero/testbed/apache-tomcat-6.0.18
>> workers.java_home=/usr/lib/jvm/java-6-sun
>> ps=/
>>
>> worker.list=ajp13,jkstatus
>>
>> # defaults
>> worker.ajp13.port=8009
>> worker.ajp13.host=localhost
>> worker.ajp13.type=ajp13
>> worker.ajp13.lbfactor=1
>> worker.ajp13.socket_keepalive=true
>> worker.ajp13.connect_timeout=6
>>
>> # status
>> worker.jkstatus.type=status
>> --- workers.properties ---
>>
>> Finally my server.xml file has (shared among several instances):
>>
>> --- server.xml ---
>> 
>> 
>>
>>   > SSLEngine="on" />
>>   
>>   > />
>>   > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>>
>>
>>   
>> >   type="org.apache.catalina.UserDatabase"
>>   description="User database that can be updated and saved" 
>> factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>>   pathname="${catalina.base}/../shared/conf/tomcat-users.xml" 
>> />
>>   
>>
>>   
>>  
>> >connectionTimeout="6" enableLookups="true"
>>redirectPort="8443" />
>>
>> > enableLookups="true" />
>>
>> 
>>
>>   > resourceName="UserDatabase"/>
>>
>>   > unpackWARs="true" autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>>   
>> 
>>   
>> 
>> --- server.xml ---

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



Re: possibility of runtime replication of jkstatus / mod_jk

2009-09-02 Thread Rainer Jung
On 19.08.2009 15:12, Markus Pohle wrote:
> 
> 
> Hi list members,
> I am Markus Pohle, new subscriber to this list and long time user of
> apache tomcat and tomcat connector (with apache httpd).
> 
> I do have a question according to mod_jk and jkstatus for which I did
> not find any answer or solution, neither on internet/google nor the
> mailing list and I hope, someone of you can help me.
> 
> Here is the scenario:
> 
> - two physical frontend servers, each with one apache httpd webserver
> with mod_jk
> - two physical middle tier servers, each with two apache tomcat servers
> - the two frontend servers use linux-ha and heartbeat for failover
> - mod_jk on the frontend servers are used to connect thru ajp13 to the
> tomcat servers and do simple loadbalancing and failover (for the tomcats)
> 
> - the both frontend servers with apache httpd have same mod_jk
> configuration (of course!)
> 
> now it comes...
> 
> during uptime changes are made to the mod_jk configuration thru the
> jkstatus pages, like disabling or stopping one tomcat node. if that
> happens, the actual jkstatus configuration does not match the static
> mod_jk-conf-file configuration any more. if the first frontend server
> (or the apache httpd server on it) crashes, linux-ha and heartbeat do a
> takeover to the second frontend server and start apache httpd on the
> server. during apache httpd startup it loads its mod_jk configuration,
> but that one differs from the actual jkstatus configuration on the
> crashed first frontend server!
> 
> My problem is, that I do not know how to replicate the actual jkstatus
> config from the first frontend server to the second one so that i case
> of takeover the modified configuration from with jkstatus is being kept.
> 
> Does anybody ever had the same problem? Is there a solution? Any help
> would be realy appreciated!

I don't have a nice answer, but I would

- use a script for the common tasks, like changing the activation state
- use administrative discipline for the unspecific rest of changes

jkstatus uses only GET requests, and the URLs are easy to compose. So
you can have a script using e.g. curl as an http commandline client and
looping over the nodes of your farm to apply chnges for all nodes. The
script can be run on any node, that has web access to jkstatus of all
Apaches. curl also knows how to do basic auth.

I plan to add saving of config changes, but this will not obviously
solve the replication problem. The saved changes will be most likely in
the form of a change protocol which gets replayed (added to the
workers.properties) during startup. So in a distributed situation you
would still need to apply the changes to all nodes.

Farm management is currently not close (in time).

Regards,

Rainer

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



Re: Trying to configure mod_jk

2009-09-02 Thread Rainer Jung
On 26.08.2009 00:20, Troy Bull wrote:
> Greetings
> 
> I have been trying to get this to work for hours and I am stuck.  I
> am trying to configure mod_jk and it works to a point, that is up
> until the back end app does a redirect, the redirected url is passed
> all the way back to the browser, then the browser goes directly
> against the app server bypassing my apache and mod_jk.  Is there a
> way to make mod_jk "fix" this redirected url so that is gets pointed
> back at my proxy server?
> 
> Any help greatly appreciated Thanks troy

Unfortunately the answer is: mod_jk uses the AJP13 protocol, which is a
good way to fix this. More precisely: AJP13 ensures, that the web
container provides the Apache port, protocol and server name to the
webapp, if it asks about this data to produce a self referring URL.

If you use http between Apache and Tomcat instead, you need to set
additional attributes on the Tomcat connector to "fix" the data.

So I would say your webapp is broken, in that it asumes standard data
instead of using the servlet API to ask the container for the needed
data. Maybe there's a config item for your webapp.

Nevertheless you can play tricks, because the redirects are done using a
response header called "Location", which you can rewrite using mod_headers.

Have a look at

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html

and search for "Location", but do also read the rest of the page.

Regards,

Rainer

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



Re: mod_jk and jsessionid issue

2009-09-02 Thread Rainer Jung
On 26.08.2009 11:29, lmk wrote:
> 
> It works using JkStripSession directive.

Then either something is wrong with your JkMount (Apache not using it as
you intended), or the URLs of the images are broken in the sense, that
they are not beginning with /context/.

To sum up the previous discussion:

- if the image requests are not forwarded to Tomcat, then you need
JkStripSession to remove the session id

- if the images get forwarded to Tomcat and do exist, but they are not
served, then there should be some authorization problem with your webapp.

Regards,

Rainer

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



Re: processing precedence for mod_jk config?

2009-09-02 Thread Rainer Jung
On 26.08.2009 15:57, Christopher Schultz wrote:
>> Is this due to the new version of mod_jk and that's
>> just how it behaves, or because I have a very open mapping for the
>> mount directives, or something else I'm just not seeing.
> 
> I don't believe there have been significant changes to the way mod_jk
> works over the years.

I don't understand, what problem you try to fix. The most common use case is

JkMount /myapp/*

which *will* forward requests for forbidden contant, like
/myapp/META-INF/... or /myapp/WEB-INF/... to the web container. This is
OK, because the SPEC says the container is *not* allowed to deliver such
content. You should get an error from the container, right?

As soon as you start to disable forwarding of this stuff, you are more
likely to run into trouble. Because now, if you also put the webapp
somewhere on the disk where the web server can deliver it, you have to
ensure, that the web server does not deliver this content. That's
because the web server is not aware of the special meaning of these URLs.

So why not letting mod_jk forward it?

Finally: Around 1.2.15 there indeed where changes to the interaction of
mod_jk and directory (index) handling. I don't remember the details
right now, but let's first focus on what kind of problem we want to fix
(if there is one).

Regards,

Rainer

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



Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Bill Davidson

Tim Funk wrote:
>I thought the Oracle JDBC driver allowed for all the nodes to be placed
>into the connect string and the driver was smart enough to detect 
failover.

>[So its a configuration exercise on the connection string.]

I'm having trouble finding documentation for this capability.  Can you
or someone else provide a pointer?


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



Re: /context not working -- mod_jk error: no match for /server-status

2009-09-02 Thread Rainer Jung
On 27.08.2009 15:45, Dennis Christopher wrote:
> environment: Tomcat 6.0.18 under apache2 on Mac OS X Server 10.5 (Leopard).
> 
> I am using a mod_jk connector with JBoss.
> 
> I am having trouble getting context urls of the form
> website.my.com/myapplication honoured (or even localhost/myapplication).
> (Safari:File not found).I have googled  the error messages below but
> can't find anything applicable to my setup.
> 
> The quick start guide at
> 
> http://tomcat.apache.org/connectors-doc/generic_howto/quick.html
> 
> gives a simple proof of concept for a connector setup (/examples").
> However, this does not work,
> though I have followed the editing of the configuration files exactly
> (using JKMount in the httpd.conf etc)
> 
> I get an error in mod_jk.log (set to debug level):
> 
> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
> map_uri_to_worker_ext::jk_uri_worker_map.c (1036): (TEST) Attempting to
> map URI '/server-status' from 5 maps
> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
> map_uri_to_worker_ext::jk_uri_worker_map.c (1039): Initial match
> value:for URI '/server-status' is -1.
> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
> find_match::jk_uri_worker_map.c (850): Attempting to map context URI
> '/examples/*=JBoss1' source 'JkMount'
> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
> find_match::jk_uri_worker_map.c (850): Attempting to map context URI
> '/servlet/*=JBoss1' source 'JkMount'
> [Tue Aug 25 12:41:11.783 2009] [211:2688784416] [debug]
> find_match::jk_uri_worker_map.c (850): Attempting to map context URI
> '/sample/*=JBoss1' source 'JkMount'
> [Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
> find_match::jk_uri_worker_map.c (850): Attempting to map context URI
> '/*.jsp=JBoss1' source 'JkMount'
> [Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
> map_uri_to_worker_ext::jk_uri_worker_map.c (1047): Match value:for URI
> '/server-status' is -1.
> [Tue Aug 25 12:41:11.784 2009] [211:2688784416] [debug]
> jk_translate::mod_jk.c (3536): no match for /server-status found
> 
> Any help on how to diagnose what the seeming error is pointing to would
> be much appreciated.

This log snippet is not useful, because the request you used was for
/server-status, which is most likely not a request you want mod_jk to
send to JBoss.

Please post all your JK directives from your httpd.conf and the files
included in that. Also post your workers.properties, and if you use it
the uriworkermap.properties file.

The most common cause why simple setups do not work is the use of
virtual hosts in the Apache configuration. If you have virtual hosts,
you have to put JkMount into the virtual hosts, or you set "JkMountCopy
All" in the global part of the configuration.

Regards,

Rainer

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



Re: Share file between 2 apps

2009-09-02 Thread ramzi khlil
Hi,

There is no way to reload it outside the ClassLoader.

Ramzi

On Wed, Sep 2, 2009 at 2:02 PM, Tim Funk  wrote:

> If the file is loaded via a ClassLoader - then the JVM will cache it and
> you'll need to reload the webppa or restart tomcat.
>
> -Tim
>
> ramzi khlil wrote:
>
>> Hi,
>>
>> Thank you for your response. It's working for me.
>> I have a problem with caching. The server doesn't update the file in temp
>> directory. I set cachingAllowed to false, but it doesn't work for me.
>> Do you have any idea ?
>>
>> Regards
>>
>>
>> On Wed, Sep 2, 2009 at 1:01 PM, Tim Funk  wrote:
>>
>> There are too many unknown constraints to answer - but I'll try.
>>>
>>> In app B - use an init parameter which is a filename where test.xml is
>>> located.
>>>   
>>>   myfile
>>>   /usr/local/more/cowbell/test.xml
>>>   
>>>
>>> Then when app b needs to write the file;
>>> File f = new File(servletContext.getInitParameter("myfile"));
>>> FileWriter fw = new FileWriter(f);
>>> fw.write(stuff);
>>> ...
>>>
>>> If you need to read the file from app B, use a file reader. This is an
>>> easy
>>> way to keep the apps decoupled
>>>
>>>
>  -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Share file between 2 apps

2009-09-02 Thread Tim Funk
If the file is loaded via a ClassLoader - then the JVM will cache it and 
you'll need to reload the webppa or restart tomcat.


-Tim

ramzi khlil wrote:

Hi,

Thank you for your response. It's working for me.
I have a problem with caching. The server doesn't update the file in temp
directory. I set cachingAllowed to false, but it doesn't work for me.
Do you have any idea ?

Regards


On Wed, Sep 2, 2009 at 1:01 PM, Tim Funk  wrote:


There are too many unknown constraints to answer - but I'll try.

In app B - use an init parameter which is a filename where test.xml is
located.
   
   myfile
   /usr/local/more/cowbell/test.xml
   

Then when app b needs to write the file;
File f = new File(servletContext.getInitParameter("myfile"));
FileWriter fw = new FileWriter(f);
fw.write(stuff);
...

If you need to read the file from app B, use a file reader. This is an easy
way to keep the apps decoupled



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



Re: Error when build mod_jk with apache 2.2 under FreeBSD 7.2-STABLE 64bit?!

2009-09-02 Thread Rainer Jung
On 28.08.2009 05:39, James Chang wrote:
> Hi there,
> 
>   I try to buind mod_jk with apache 2.2 (also build from port
> tree but with worker mode)
> from porttree of FreeBSD but I it show me the following error messages:
> =
> /usr/local/lib: file not recognized: File format not recognized
> gmake[1]: *** [mod_jk.la] Error 1
> gmake[1]: Leaving directory
> `/usr/ports/www/mod_jk/work/tomcat-connectors-1.2.28-src/native/apache-2.0'
> gmake: *** [all-recursive] Error 1
> *** Error code 1
> 
> Stop in /usr/ports/www/mod_jk.
> =
> 
>  In Tomcat web site, the FAQ says mod_jk could support apache 2.2
> 
> Could someone give me a hand ?

Yes, mod_jk supports 2.2 since a long time. The build uses the
apache-2.0 directory, because the mod_jk code for 2.0 and for 2.2 is the
same. That's normal.

Please post the steps you did in order to do the build.

If possible also post somewhere the results of configure.

Regards,

Rainer

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



RE: Thread Analyzer

2009-09-02 Thread Caldarale, Charles R
> From: keeplearning [mailto:p_sodh...@yahoo.com]
> Subject: Thread Analyzer
> 
> Could anyone tell me which is a good thread analyzer tool for 
> Sun JVMs?

http://java.sun.com/javase/6/docs/technotes/tools/index.html#monitor
http://java.sun.com/javase/6/docs/technotes/tools/index.html#troubleshoot

 - 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: redirect paramter in the jk_workers file

2009-09-02 Thread Rainer Jung
Your mailer uses a very unfriendly way of formatting your messages. So I
do top posting.

Yes, as you can read on

http://tomcat.apache.org/connectors-doc/reference/workers.html

the atribute redirect is supported since version 1.2.9. For a two node
load balancer, you don't need it though. If you have many nodes in a
load balancer, the redirect expresses, which one you prefer for the
failover. If you dont specify it, the load balancer will use some other
working node according to its load values.

Regards,

Rainer


On 02.09.2009 06:51, Dhiraj Rajput wrote:
> Hi Chris,
> 
>  
> 
> I have below mention tag in my jk workers file.
> 
>  
> 
>  
> 
>  
> 
> orker.tomcat.type=lb
> 
> worker.tomcat.socket_keepalive=1
> 
> worker.tomcat.socket_timeout=300
> 
> worker.tomcat.connection_pool_size=50
> 
> worker.tomcat.connection_pool_timeout=600
> 
> worker.tomcat.balance_workers=tomcatnode1,tomcatnode2
> 
> worker.tomcat.sticky_session=true
> 
> worker.tomcatnode1.port=9732
> 
> worker.tomcatnode1.host=10.18.25.160
> 
> worker.tomcatnode1.type=ajp13
> 
> worker.tomcatnode1.socket_keepalive=True
> 
> worker.tomcatnode1.socket_timeout=300
> 
> worker.tomcatnode1.connection_pool_timeout=600
> 
> worker.tomcatnode1.connect_timeout=600
> 
> worker.tomcatnode1.redirect=tomcatnode2
> 
> worker.tomcatnode2.port=9733
> 
> worker.tomcatnode2.host=10.18.25.107
> 
> worker.tomcatnode2.type=ajp13
> 
> worker.tomcatnode2.socket_keepalive=True
> 
> worker.tomcatnode2.socket_timeout=300
> 
> worker.tomcatnode2.connection_pool_timeout=600
> 
> worker.tomcatnode2.redirect=tomcatnode1
> 
>  
> 
>  
> 
> I am not 100% sure how this works and is it really usefull for the failover.
> 
> Thanks and Regards,
> 
>  
> 
> Dhiraj V Rajput
> 
> Associate System Admin
> 
> Hosting Services Group
> 
> Premier Technology Group Nagpur 
> 
> Phone: - USA- 1-626-698-1099
> 
> India Office: 91-712-2446734 ext 30
> 
> cell no : 91-9370315811
> 
>  
> 
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Sent: Tuesday, September 01, 2009 11:22 PM
> To: Tomcat Users List
> Subject: Re: redirect paramter in the jk_workers file
> 
>  
> 
> Hash: SHA1
> 
>  
> 
> Dhiraj,
> 
>  
> 
> On 8/27/2009 8:26 AM, Dhiraj Rajput wrote:
> 
>> I have issue on the redirect tag in jk workers file.
> 
>  
> 
> What is "redirect tag"?
> 
>  
> 
> -chris

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



Apache Server failover and session replication

2009-09-02 Thread Sumedh Sakdeo
Hello All,
I have a setup with two tomcat instances(A&B). I have configured
an apache web server 2.2 for load balancing and fail over. Setup looks fine
as per the configurations suggested. Let tomcat A be handling some request
at sometime. When tomcat instance(A) goes down, the session is replicated to
another tomcat instance(B) successfully. Now tomcat instance B is handling
those requests. Till this point everything goes fine, but when I bring up
tomcat instance(A) and after that tomcat instance(B) goes down, the session
is no longer replicated. What might be the issue? In status page of apache
server I see even if node status is OK session is not replicated to fail
over node for second time.


Thanks in advance,
Sumedh


Re: REMOVE ME FROM THIS LIST

2009-09-02 Thread Pid

On 02/09/2009 17:09, Chris Lenart wrote:

It iss broke


That's a splendidly informative statement.

Sometimes unsubscribe messages get lost in spam folders, or don't get 
sent because the request is sent from a different address to the one 
that was subscribed.



p





-Original Message-
From: Antonio Petrelli [mailto:antonio.petre...@gmail.com]
Sent: Wednesday, September 02, 2009 10:59 AM
To: Tomcat Users List
Subject: Re: REMOVE ME FROM THIS LIST


2009/9/2:

REMOVE ME FROM THIS LIST



Follow the arrow
  |
  |
  |
\/

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


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




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



Thread Analyzer

2009-09-02 Thread keeplearning

Hi All,

Could anyone tell me which is a good thread analyzer tool for Sun JVMs? We
have Apache and Tomcat in our infrastructure. I could see that for IBM JVMs,
there are tools provided by IBM for thread and heap dump analysis.


-- 
View this message in context: 
http://www.nabble.com/Thread-Analyzer-tp25262470p25262470.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Share file between 2 apps

2009-09-02 Thread ramzi khlil
Hi,

Thank you for your response. It's working for me.
I have a problem with caching. The server doesn't update the file in temp
directory. I set cachingAllowed to false, but it doesn't work for me.
Do you have any idea ?

Regards


On Wed, Sep 2, 2009 at 1:01 PM, Tim Funk  wrote:

> There are too many unknown constraints to answer - but I'll try.
>
> In app B - use an init parameter which is a filename where test.xml is
> located.
>
>myfile
>/usr/local/more/cowbell/test.xml
>
>
> Then when app b needs to write the file;
> File f = new File(servletContext.getInitParameter("myfile"));
> FileWriter fw = new FileWriter(f);
> fw.write(stuff);
> ...
>
> If you need to read the file from app B, use a file reader. This is an easy
> way to keep the apps decoupled
>
> -Tim
>
>
> ramzi khlil wrote:
>
>> Hi All,
>>
>> I need to share a file between two applications, A and B.
>> A: I put my web site under Root folder and it is using test.xml file.
>> B: The second application which generate the xml file is host under
>> webapps
>> application.
>> My question is how to allow to application B to update test.xml ?
>>
>> Regards
>>
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Share file between 2 apps

2009-09-02 Thread Tim Funk

There are too many unknown constraints to answer - but I'll try.

In app B - use an init parameter which is a filename where test.xml is 
located.


myfile
/usr/local/more/cowbell/test.xml


Then when app b needs to write the file;
File f = new File(servletContext.getInitParameter("myfile"));
FileWriter fw = new FileWriter(f);
fw.write(stuff);
...

If you need to read the file from app B, use a file reader. This is an 
easy way to keep the apps decoupled


-Tim

ramzi khlil wrote:

Hi All,

I need to share a file between two applications, A and B.
A: I put my web site under Root folder and it is using test.xml file.
B: The second application which generate the xml file is host under webapps
application.
My question is how to allow to application B to update test.xml ?

Regards



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



Share file between 2 apps

2009-09-02 Thread ramzi khlil
Hi All,

I need to share a file between two applications, A and B.
A: I put my web site under Root folder and it is using test.xml file.
B: The second application which generate the xml file is host under webapps
application.
My question is how to allow to application B to update test.xml ?

Regards


RE: REMOVE ME FROM THIS LIST

2009-09-02 Thread Chris Lenart
It iss broke

-Original Message-
From: Antonio Petrelli [mailto:antonio.petre...@gmail.com] 
Sent: Wednesday, September 02, 2009 10:59 AM
To: Tomcat Users List
Subject: Re: REMOVE ME FROM THIS LIST


2009/9/2  :
> REMOVE ME FROM THIS LIST


Follow the arrow
 |
 |
 |
\/

-
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: REMOVE ME FROM THIS LIST

2009-09-02 Thread Antonio Petrelli
2009/9/2  :
> REMOVE ME FROM THIS LIST


Follow the arrow
 |
 |
 |
\/

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



Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Bill Davidson

Ognjen Blagojevic wrote:
IANA-failover-expert, but one question comes to my mind. What happens 
when the first server is recovered? Some cached connections will still 
point to second server, while newly created connections will go to the 
first one?


Actually, it doesn't switch which is the primary.  It keeps trying
the primary every time and failing over to the secondary every
time the primary fails.  When the primary comes back, it will
get the primary.

Basic logic is this:

try{
   conn = primary.getConnection();
}catch ( SQLException e ){
   conn = secondary.getConnection();
}
return conn;

I'm a little concerned that the first failure might take time
due to having to wait on a timeout or something like that.
That could kill performance, so that's one of the reasons
I'm asking about it here.



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



Re: startup.bat exit code

2009-09-02 Thread ispringer


Eduard Pal wrote:
> 
> It seems that in tomcat 5.0 when i run startup.bat it exists with code
> 1. Does anyone know why?
>  

It's because of a combination of Windows quirks (or some might say flaws).
Whenever one unsets an environment variable (e.g. "set FOO="), the set
command sets the errorlevel (i.e. exit code) to 1. In Windows, commands do
not always set the errorlevel after exiting. When they do not, the
errorlevel keeps its previous value, which is whatever value it was set to
by the last command that did actually set it. For example "echo hello" or
"set FOO=queue" will not set the errorlevel at all. In catalina.bat, the
following line causes the errorlevel to get set to 1:

set JPDA=

None of the commands following that line set the errorlevel (at least not in
the case when the batch file was passed "start" as its first arg), so when
the batch file exits, the errorlevel is still set to 1. If catalina.bat was
called via startup.bat, startup.bat exits after catalina.bat exits and the
errorlevel is still set to 1.

A fix for this would be for catalina.bat to execute a command that is known
to set the errorlevel back to 0 after the "set JPDA=" line. For example:

set JPDA=
rem The above command sets the errorlevel to 1. The ver command will reset
the errorlevel to 0.
ver >nul

-Ian

-- 
View this message in context: 
http://www.nabble.com/startup.bat-exit-code-tp4124264p25258503.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: tomcat 4.1.31 problem

2009-09-02 Thread Mark Thomas
jamez smith wrote:
>> Good day Chunk,
>>
> 
 Have you actually tried compiling under 1.5 or 1.6?  You might be
>> surprised at how few problems there are.
>>
>> I could try to compile under 1.5.  But I dare not to use it in production
>> box, as this project is well controlled by the company.  Every step I do
>> need to be documented. I have no right to change the fundamental framework
>> or JDK at all. :-(

Here are a few arguments for upgrading the JVM and Tomcat
- the JVM is no longer supported by Sun
- the major Tomcat version (4.1.x) is no longer supported by the ASF
- the minor Tomcat version (4.1.31) has 9 important, 2 moderate and 16
known, published security vulnerabilities.

If an application is so critical it has to be that tightly controlled, I
have to wonder why that many security vulnerabilities are not a concern.
 Can it really be the case that none of them apply in your environment?

Mark



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



Re: tomcat 4.1.31 problem

2009-09-02 Thread jamez smith
> Good day Chunk,
>

> >>Have you actually tried compiling under 1.5 or 1.6?  You might be
> surprised at how few problems there are.
>
> I could try to compile under 1.5.  But I dare not to use it in production
> box, as this project is well controlled by the company.  Every step I do
> need to be documented. I have no right to change the fundamental framework
> or JDK at all. :-(
>
   Jamez.


Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Bap

Bill,

If you are using Oracle RAC, then why dont you use a RAC JDBC URL that  
contains both nodes?
A DBCP testOnBorrow will ensure only current transactions on a node  
will fail if one of the nodes goes down, and all new requests for  
connections from the pool will "recover".


Bap.


Quoting Ognjen Blagojevic :


This is interesting topic.

IANA-failover-expert, but one question comes to my mind. What  
happens when the first server is recovered? Some cached connections  
will still point to second server, while newly created connections  
will go to the first one?


Is that acceptable?

Regards,
Ognjen

Bill Davidson wrote:

Tomcat 6.0.20 using DBCP DataSource
Java 1.6.0_16
Oracle 10g with RAC.

I've got two Oracle RAC nodes, mirroring each other.  My current fail-over
method if the primary node fails is to shut down the web servers,  
reconfigure

them to use the secondary node and restart the web servers.  Not pleasant.

I'm thinking I can make a "FailOverDataSource" that implements DataSource
and wraps around DataSource's for each of the two nodes.  Its  
getConnection()
method would try to use the getConnection() from the primary node,  
and if that

fails, it would try the secondary node.  Repeat logic for other DataSource
methods.  Instant automagic fail-over.  I've actually written it,  
and it seems
to get a hold of both DataSource's fine.  I can't kill the primary  
on an active

busy system to do a "real" test though.

I'm thinking I can't be the first person to think of this.  Are  
there any obvious

problems with this idea?

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





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





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



Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Tim Funk
I thought the Oracle JDBC driver allowed for all the nodes to be placed 
into the connect string and the driver was smart enough to detect 
failover. [So its a configuration exercise on the connection string.]


-Tim

Ognjen Blagojevic wrote:

This is interesting topic.

IANA-failover-expert, but one question comes to my mind. What happens 
when the first server is recovered? Some cached connections will still 
point to second server, while newly created connections will go to the 
first one?


Is that acceptable?

Regards,
Ognjen

Bill Davidson wrote:

Tomcat 6.0.20 using DBCP DataSource
Java 1.6.0_16
Oracle 10g with RAC.

I've got two Oracle RAC nodes, mirroring each other.  My current 
fail-over
method if the primary node fails is to shut down the web servers, 
reconfigure
them to use the secondary node and restart the web servers.  Not 
pleasant.


I'm thinking I can make a "FailOverDataSource" that implements DataSource
and wraps around DataSource's for each of the two nodes.  


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



RE: Using multiple DataSource's for fail-over.

2009-09-02 Thread Jason Pyeron

> -Original Message-
> From: Bill Davidson [mailto:bill...@gmail.com] 
> Sent: Tuesday, September 01, 2009 20:18
> To: 'Tomcat Users List'
> Subject: Using multiple DataSource's for fail-over.
> 
> Tomcat 6.0.20 using DBCP DataSource
> Java 1.6.0_16
> Oracle 10g with RAC.
> 
> I've got two Oracle RAC nodes, mirroring each other.  My 
> current fail-over method if the primary node fails is to shut 
> down the web servers, reconfigure them to use the secondary 
> node and restart the web servers.  Not pleasant.
> 
> I'm thinking I can make a "FailOverDataSource" that 
> implements DataSource and wraps around DataSource's for each 
> of the two nodes.  Its
> getConnection()
> method would try to use the getConnection() from the primary 
> node, and if that fails, it would try the secondary node.  
> Repeat logic for other DataSource methods.  Instant automagic 
> fail-over.  I've actually written it, and it seems to get a 
> hold of both DataSource's fine.  I can't kill the primary on 
> an active busy system to do a "real" test though.

Try a software firewall like iptables (linux) or the windows firewall. This way
you can simulate an in communication break, just like swithcing off the server. 

> 
> I'm thinking I can't be the first person to think of this.  
> Are there any obvious problems with this idea?
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 




--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


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



Re: Using multiple DataSource's for fail-over.

2009-09-02 Thread Ognjen Blagojevic

This is interesting topic.

IANA-failover-expert, but one question comes to my mind. What happens 
when the first server is recovered? Some cached connections will still 
point to second server, while newly created connections will go to the 
first one?


Is that acceptable?

Regards,
Ognjen

Bill Davidson wrote:

Tomcat 6.0.20 using DBCP DataSource
Java 1.6.0_16
Oracle 10g with RAC.

I've got two Oracle RAC nodes, mirroring each other.  My current fail-over
method if the primary node fails is to shut down the web servers, 
reconfigure

them to use the secondary node and restart the web servers.  Not pleasant.

I'm thinking I can make a "FailOverDataSource" that implements DataSource
and wraps around DataSource's for each of the two nodes.  Its 
getConnection()
method would try to use the getConnection() from the primary node, and 
if that

fails, it would try the secondary node.  Repeat logic for other DataSource
methods.  Instant automagic fail-over.  I've actually written it, and it 
seems
to get a hold of both DataSource's fine.  I can't kill the primary on an 
active

busy system to do a "real" test though.

I'm thinking I can't be the first person to think of this.  Are there 
any obvious

problems with this idea?

-
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: [OT] How to build cheap storage

2009-09-02 Thread Mark Thomas
Pid wrote:
> Interesting reading:
> 
> http://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage/
> 
> 
> I wonder what performance gain they'd get from a newer version of Tomcat
> and if they're using APR.

:)

I love the fact that the on/off switch ($30) is almost as much as the
boot HDD ($38).

Mark




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



RE: How do I remove 'S' from HTTPS - JAAS configured on tomcat, JSF webapp

2009-09-02 Thread Caldarale, Charles R
> From: Shantanu Upadhyaya [mailto:shantan...@gmail.com]
> Subject: How do I remove 'S' from HTTPS - JAAS configured on tomcat,
> JSF webapp
> 
> How do I remove HTTPS after login in ?

To quote Mark T:

"That is a really bad idea. If the threats to your system are such that
you need to protect the login process using SSL then you should be
providing the same level of protection for your session ID and running
everything post authentication over SSL."

Here's the whole thread:
http://marc.info/?t=12515523731&r=1&w=2

 - 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: tomcat 4.1.31 problem

2009-09-02 Thread Caldarale, Charles R
> From: jamez smith [mailto:jamez...@gmail.com]
> Subject: Re: tomcat 4.1.31 problem
> 
> This project was developed since 2002 and has a lot obsolete methods
> even under JDK 1.4.  It won't be able to compile under higer version
> of JDK.

Have you actually tried compiling under 1.5 or 1.6?  You might be surprised at 
how few problems there are.

 - 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: Not compiling JSP's

2009-09-02 Thread Martin Gainty

difficult without seeing code for problem jsp,accompanying tlds and 
/WEB-INF/web.xml

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.




> From: c...@etrak-plus.com
> To: users@tomcat.apache.org
> Subject: Re: Not compiling JSP's
> Date: Wed, 2 Sep 2009 07:09:25 -0500
> 
> Ron,
> 
> Thanks for your reply.
> 
> The 'one hour off' problem was an install issue by the guy who brought up 
> that server... wait a minute, that was me.
> 
> The mystery is that Tomcat will compile some JSP's just fine but will always 
> stop on the same ones.  On the theory it was memory, I changed the Java 
> memory options to match the current production server... no joy there.  To 
> test the theory the problrm was the last date modified, I made certain the 
> dates on all JSP's were one day before the server date (note that the dates 
> on the JSP's that compiled were within seconds of those that didn't)... no 
> joy here either.  If I copy .java files from development to server, the 
> server will actually remove the .java files from the work directory so no 
> joy there.  If I copy the .java and .class files from the development build 
> directory to the work directory on the server, that appeared to work at one 
> point but now the server removes those files from the work directory.  The 
> JSP's that the server fails on are no larger nor no more complex than those 
> it compiles.
> 
> I am bringing Netbeans up on the server so I can step through what's 
> happening but have not yet got that running.
> 
> Thanks,
> 
> Carl
> 
> - Original Message - 
> From: "Ron McNulty" 
> To: "Tomcat Users List" 
> Sent: Wednesday, September 02, 2009 3:04 AM
> Subject: Re: Not compiling JSP's
> 
> 
> > Hi Carl
> >
> > I've seen problems like this when deploying across time zones (in my case 
> > NZ -> San Francisco), especially if there is a Windows box in the 
> > equation. The "1 hour off" sounds odd - daylight saving problem?
> >
> > Regards
> >
> > Ron
> >
> > - Original Message - 
> > From: "Carl" 
> > To: "Tomcat Users List" 
> > Sent: Wednesday, September 02, 2009 1:12 AM
> > Subject: Re: Not compiling JSP's
> >
> >
> >> Mark,
> >>
> >> Thanks for your reply.
> >>
> >> I checked the modification times and they are all yesterday while the 
> >> system date/time on the server is today (although it was one hour off.)
> >>
> >> I am presently bringing Netbeans up on the test server in an attempt to 
> >> see what is happening.
> >>
> >> If you have any other suggestions, I am all ears.
> >>
> >> Carl
> >>
> >>
> >> - Original Message - 
> >> From: "Mark Thomas" 
> >> To: "Tomcat Users List" 
> >> Sent: Tuesday, September 01, 2009 3:14 AM
> >> Subject: Re: Not compiling JSP's
> >>
> >>
> >>> Carl wrote:
>  Odd that some JSP's get compiled and some won't.  Note that it is 
>  always
>  the same JSP's that will not compile.
> >>>
> >>> File modification times in the future on the JSPs?
> >>>
> >>> One way to find out what is going on is to use remote debugging and your
> >>> favourite IDE to step through the JSP compilation process and see why it
> >>> isn't working.
> >>>
> >>> Mark
> >>>
> >>>
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>
> >>>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> > 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additio

RE: Not compiling JSP's

2009-09-02 Thread Martin Gainty

difficult without seeing code for problem jsp,accompanying tlds and 
/WEB-INF/web.xml

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.




> From: c...@etrak-plus.com
> To: users@tomcat.apache.org
> Subject: Re: Not compiling JSP's
> Date: Wed, 2 Sep 2009 07:09:25 -0500
> 
> Ron,
> 
> Thanks for your reply.
> 
> The 'one hour off' problem was an install issue by the guy who brought up 
> that server... wait a minute, that was me.
> 
> The mystery is that Tomcat will compile some JSP's just fine but will always 
> stop on the same ones.  On the theory it was memory, I changed the Java 
> memory options to match the current production server... no joy there.  To 
> test the theory the problrm was the last date modified, I made certain the 
> dates on all JSP's were one day before the server date (note that the dates 
> on the JSP's that compiled were within seconds of those that didn't)... no 
> joy here either.  If I copy .java files from development to server, the 
> server will actually remove the .java files from the work directory so no 
> joy there.  If I copy the .java and .class files from the development build 
> directory to the work directory on the server, that appeared to work at one 
> point but now the server removes those files from the work directory.  The 
> JSP's that the server fails on are no larger nor no more complex than those 
> it compiles.
> 
> I am bringing Netbeans up on the server so I can step through what's 
> happening but have not yet got that running.
> 
> Thanks,
> 
> Carl
> 
> - Original Message - 
> From: "Ron McNulty" 
> To: "Tomcat Users List" 
> Sent: Wednesday, September 02, 2009 3:04 AM
> Subject: Re: Not compiling JSP's
> 
> 
> > Hi Carl
> >
> > I've seen problems like this when deploying across time zones (in my case 
> > NZ -> San Francisco), especially if there is a Windows box in the 
> > equation. The "1 hour off" sounds odd - daylight saving problem?
> >
> > Regards
> >
> > Ron
> >
> > - Original Message - 
> > From: "Carl" 
> > To: "Tomcat Users List" 
> > Sent: Wednesday, September 02, 2009 1:12 AM
> > Subject: Re: Not compiling JSP's
> >
> >
> >> Mark,
> >>
> >> Thanks for your reply.
> >>
> >> I checked the modification times and they are all yesterday while the 
> >> system date/time on the server is today (although it was one hour off.)
> >>
> >> I am presently bringing Netbeans up on the test server in an attempt to 
> >> see what is happening.
> >>
> >> If you have any other suggestions, I am all ears.
> >>
> >> Carl
> >>
> >>
> >> - Original Message - 
> >> From: "Mark Thomas" 
> >> To: "Tomcat Users List" 
> >> Sent: Tuesday, September 01, 2009 3:14 AM
> >> Subject: Re: Not compiling JSP's
> >>
> >>
> >>> Carl wrote:
>  Odd that some JSP's get compiled and some won't.  Note that it is 
>  always
>  the same JSP's that will not compile.
> >>>
> >>> File modification times in the future on the JSPs?
> >>>
> >>> One way to find out what is going on is to use remote debugging and your
> >>> favourite IDE to step through the JSP compilation process and see why it
> >>> isn't working.
> >>>
> >>> Mark
> >>>
> >>>
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>
> >>>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> > 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additio

Re: Unable to access files outside Webapp directory in tomcat

2009-09-02 Thread Michael Ludwig

asingla4 schrieb:


I'm done with saving the file to C:\files but I don't know how to make
it downloadable when the download button is clicked because the files
folder is outside the webapp directory.


Please read this thread:

providing downloading functionality for a file which is on disk
http://markmail.org/thread/ixx6oxtkdukp4xtf

Especially Chuck's reply:

RE: providing downloading [...] - Caldarale, Charles R
http://markmail.org/message/6e2vxa3eixd5cvgf

--
Michael Ludwig

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



[OT] How to build cheap storage

2009-09-02 Thread Pid

Interesting reading:

http://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage/

I wonder what performance gain they'd get from a newer version of Tomcat 
and if they're using APR.



p

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



Re: EL expressions not evaluation in tag library

2009-09-02 Thread David Smith
So, you are saying the EL expressions are evaluated, but the standard  
taglibs aren't?  Can you post a minimum jsp with the problem?  Also  
get rid of javaee.jar. I believe it duplicates servlet-api classes.


-- David


On Sep 2, 2009, at 5:03 AM, veerabahu  
 wrote:





Hi All,

We are using EL expression in one of our tag libraries (.tag files),  
like {

   
}

1. Made sure that servlets 2.4 is enabled in webapp web.xml like
{
   
   http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
   …
   …
   
}

2. Following jars are available in WEB-INF/lib (in addition to other
standard jars)
   1. javaee.jar
   2. standard.jar
   3. jstl.jar
   4. struts-el-1.2.4.jar

Now, when we use EL in my JSP it is getting evaluated and able to  
see proper

result. But the EL in tag libraries (as shown above) are not getting
executed.

We are using Tomcat 5.5 with Java1.5. There is more than one webapp  
running
under same tomcat. All other webapps runs with servlets  
specification 2.3 (

I mean different DOCTYPE in web.xml)

Can you help in identifying the reason for EL not getting executed  
ONLY in

tag libraries?

Thanks,
Veerabahu

--
View this message in context: 
http://www.nabble.com/EL-expressions-not-evaluation-in-tag-library-tp25254057p25254057.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



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



Re: Not compiling JSP's

2009-09-02 Thread Carl

Ron,

Thanks for your reply.

The 'one hour off' problem was an install issue by the guy who brought up 
that server... wait a minute, that was me.


The mystery is that Tomcat will compile some JSP's just fine but will always 
stop on the same ones.  On the theory it was memory, I changed the Java 
memory options to match the current production server... no joy there.  To 
test the theory the problrm was the last date modified, I made certain the 
dates on all JSP's were one day before the server date (note that the dates 
on the JSP's that compiled were within seconds of those that didn't)... no 
joy here either.  If I copy .java files from development to server, the 
server will actually remove the .java files from the work directory so no 
joy there.  If I copy the .java and .class files from the development build 
directory to the work directory on the server, that appeared to work at one 
point but now the server removes those files from the work directory.  The 
JSP's that the server fails on are no larger nor no more complex than those 
it compiles.


I am bringing Netbeans up on the server so I can step through what's 
happening but have not yet got that running.


Thanks,

Carl

- Original Message - 
From: "Ron McNulty" 

To: "Tomcat Users List" 
Sent: Wednesday, September 02, 2009 3:04 AM
Subject: Re: Not compiling JSP's



Hi Carl

I've seen problems like this when deploying across time zones (in my case 
NZ -> San Francisco), especially if there is a Windows box in the 
equation. The "1 hour off" sounds odd - daylight saving problem?


Regards

Ron

- Original Message - 
From: "Carl" 

To: "Tomcat Users List" 
Sent: Wednesday, September 02, 2009 1:12 AM
Subject: Re: Not compiling JSP's



Mark,

Thanks for your reply.

I checked the modification times and they are all yesterday while the 
system date/time on the server is today (although it was one hour off.)


I am presently bringing Netbeans up on the test server in an attempt to 
see what is happening.


If you have any other suggestions, I am all ears.

Carl


- Original Message - 
From: "Mark Thomas" 

To: "Tomcat Users List" 
Sent: Tuesday, September 01, 2009 3:14 AM
Subject: Re: Not compiling JSP's



Carl wrote:
Odd that some JSP's get compiled and some won't.  Note that it is 
always

the same JSP's that will not compile.


File modification times in the future on the JSPs?

One way to find out what is going on is to use remote debugging and your
favourite IDE to step through the JSP compilation process and see why it
isn't working.

Mark




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





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




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





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



Re: Testing apache

2009-09-02 Thread Given Shirinda
Thanks man,I worked up.

Given

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



Re: Testing apache

2009-09-02 Thread Tim Funk

jvmRoute needs to be unique across all the tomcat instances.

server1:

server2:


To test - tail the access logs on each tomcat and see what appears.

-Tim

given.shiri...@sita.co.za wrote:
Hi Guyz. 



I got two linux servers machine running,in both of them,I have tomcat 5 running i.e 



server1:/opt/tomcat1 
server2:/opt/tomcat1 



I want to have the load balancing using mod_jk and apache2 to delegates the request for both servers. 

I want the server1 to be the controller node or having apache2 installed. 



under apache2/conf,I created the workers.properties file to do all my load balancing task 

The file look like this 



workers.java_home=/opt/jdk1.5.14 
workers.tomcat_home=/opt/tomcat1 



#worker.list=worker1,worker2 

worker.list=balancer 

worker.worker1.port=8019 
worker.worker1.host=10.128.79.145 
worker.worker1.type=ajp13 
worker.worker1.lbfactor=1 




worker.worker2.port=8019 
worker.worker2.host=10.128.79.139 
worker.worker2.type=ajp13 
worker.worker2.lbfactor=1 



worker.balancer.type=lb 
worker.balancer.balance_workers=worker1,worker2 
worker.balancer.method=B 




And again I compiled the tomcat-connectors-1.2.28-src which gave me mod_jk.so under apache2/modules/mod_jk.so 
which is good. 

On Both servers,under tomcat server.xml 

I did the following 



server1: 

 

server2: 



 



How to test if the apache is doing the load balancing. 



Best regards 



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



Re: Is resource-ref really needed?

2009-09-02 Thread Robert Whane
On Wed, Sep 2, 2009 at 1:22 AM, Martin Gainty wrote:
>
> the fellow who wrote it was writing code for at least 2 other projects
> it may have been a case of where he accomplished 75% of what was needed then
> some other task got moved to his front burner

I hear you, we've all been there a couple of times I think ;)

> still it is *unusual* that web.xml resource-ref is'nt read

I remember digging up some more of that unusual stuff in the Tomcat
source, like the null java:comp/UserTransaction that's inserted by
Tomcat into JNDI (might have some use, but the code wasn't clear about
this) and several of the Java EE injection annotations that were
handled in code but all different ones ended up doing exactly the same
thing.

Anyway, I have to say that the entire resource-ref element in web.xml
has been poorly understood and documented anyway. Just by itself the
element doesn't really do anything. The way I now understand this
element to work is that it's some sort of hint to the container
processing the deployment descriptor that it should go looking for a
magical (vendor specific) mapping of the resource name declared by the
resource-ref element to some global resource somewhere.

E.g.

web.xml

jdbc/myDs

Container now goes looking for a vendor specific mapping file, that
resides within the web module (.war) or is at least directly
associated with the web module, that contains a mapping of what
"jdbc/myDs" should resolve to.

So, there might be a separate file myvendor.xml containing:



The effect of this line would be that java:comp/jdbc/myDs becomes a
link to java:somectx/someDS. Of course, you still have to define
java:somectx/someDS somewhere, which happens in yet another vendor
specific file, say resources.xml:



To me this seems overly silly. If the myvendor.xml file is local to
the web module anyway, then the container implementation can just read
and process this directly without needing the hint in web.xml that it
should process this. In the end, all we want is an entry in JDNI. It's
interesting to note that there's an element with the same name
(resource-ref) and mostly same attributes in the EJB deployment
descriptor. Only there it does make sense, since it has this little
extra attribute that the web version lacks: mappedName. mappedName
does exactly what this intermediate mapping file in the web container
does; linking a local JDNI name to a global JNDI name.

The entire idea of declaring a dependency, which the vendor should
then magically resolve to a specific intermediate mapping file is just
vague and confusing. Maybe I misunderstood, but I think I have spent
more time in trying to understand this element than the average
programmer does, so I wonder whether this average programmer has any
idea of the exact use of this element.

As in EJB3, resource-ref should be truly optional; if you want your
code to use the global names, don't use it. If you want an extra
indirection mechanism for the JNDI names, use it. If you use it, let
the mapping of local to global names be specified directly in the
resource-ref element and don't require some awkward vendor specific
mapping file.

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



Testing apache

2009-09-02 Thread given . shirinda
Hi Guyz. 


I got two linux servers machine running,in both of them,I have tomcat 5 running 
i.e 


server1:/opt/tomcat1 
server2:/opt/tomcat1 


I want to have the load balancing using mod_jk and apache2 to delegates the 
request for both servers. 

I want the server1 to be the controller node or having apache2 installed. 


under apache2/conf,I created the workers.properties file to do all my load 
balancing task 

The file look like this 


workers.java_home=/opt/jdk1.5.14 
workers.tomcat_home=/opt/tomcat1 


#worker.list=worker1,worker2 

worker.list=balancer 

worker.worker1.port=8019 
worker.worker1.host=10.128.79.145 
worker.worker1.type=ajp13 
worker.worker1.lbfactor=1 



worker.worker2.port=8019 
worker.worker2.host=10.128.79.139 
worker.worker2.type=ajp13 
worker.worker2.lbfactor=1 


worker.balancer.type=lb 
worker.balancer.balance_workers=worker1,worker2 
worker.balancer.method=B 



And again I compiled the tomcat-connectors-1.2.28-src which gave me mod_jk.so 
under apache2/modules/mod_jk.so 
which is good. 

On Both servers,under tomcat server.xml 

I did the following 


server1: 

 

server2: 


 


How to test if the apache is doing the load balancing. 


Best regards 

-- 
*** 
STATE INFORMATION TECHNOLOGY AGENCY 
*** 
MIYELANI GIVEN SHIRINDA. 

E-LEARNING CONSULTANT [SAKAI] 
DEPARTMENT: TECHNOLOGY LAB 
___ 
Tel :012 470 1526 
Cell:0730133879 
E-Mail 1:given.shiri...@sita.co.za 
E-Mail 2:mgshiri...@webmail.co.za 
___ 

Failure is simply the opportunity to begin again,this time more intelligently. 


EL expressions not evaluation in tag library

2009-09-02 Thread veerabahu


Hi All, 

We are using EL expression in one of our tag libraries (.tag files), like {

}

1. Made sure that servlets 2.4 is enabled in webapp web.xml like 
{
 
http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
…
…

}

2. Following jars are available in WEB-INF/lib (in addition to other
standard jars)
1. javaee.jar
2. standard.jar
3. jstl.jar
4. struts-el-1.2.4.jar

Now, when we use EL in my JSP it is getting evaluated and able to see proper
result. But the EL in tag libraries (as shown above) are not getting
executed. 

We are using Tomcat 5.5 with Java1.5. There is more than one webapp running
under same tomcat. All other webapps runs with servlets specification 2.3 (
I mean different DOCTYPE in web.xml)

Can you help in identifying the reason for EL not getting executed ONLY in
tag libraries?

Thanks,
Veerabahu 

-- 
View this message in context: 
http://www.nabble.com/EL-expressions-not-evaluation-in-tag-library-tp25254057p25254057.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Not compiling JSP's

2009-09-02 Thread Ron McNulty

Hi Carl

I've seen problems like this when deploying across time zones (in my case 
NZ -> San Francisco), especially if there is a Windows box in the equation. 
The "1 hour off" sounds odd - daylight saving problem?


Regards

Ron

- Original Message - 
From: "Carl" 

To: "Tomcat Users List" 
Sent: Wednesday, September 02, 2009 1:12 AM
Subject: Re: Not compiling JSP's



Mark,

Thanks for your reply.

I checked the modification times and they are all yesterday while the 
system date/time on the server is today (although it was one hour off.)


I am presently bringing Netbeans up on the test server in an attempt to 
see what is happening.


If you have any other suggestions, I am all ears.

Carl


- Original Message - 
From: "Mark Thomas" 

To: "Tomcat Users List" 
Sent: Tuesday, September 01, 2009 3:14 AM
Subject: Re: Not compiling JSP's



Carl wrote:

Odd that some JSP's get compiled and some won't.  Note that it is always
the same JSP's that will not compile.


File modification times in the future on the JSPs?

One way to find out what is going on is to use remote debugging and your
favourite IDE to step through the JSP compilation process and see why it
isn't working.

Mark




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





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




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