Re: bad content type mod_jk 1.2.27

2008-12-12 Thread marcobalc

Hi,

I attach the ajp log for two cases: one ok and one ko.

http://www.nabble.com/file/p20971586/headers_ok_and_ko.txt
headers_ok_and_ko.txt 

I'm going crazy in order to understand when tomcat lost headers... :(

Many thanks,
regards
Marco



marcobalc wrote:
 
 Hi,
 
 an other strange behavior is that some times when I reboot tomcat and I
 refresh browser while I wait that tomcat is up and runnig I see the
 normal error page displayed when the tomcat is not yet started but also
 in this case I see the source html code on the browser instead of HTML
 interpreted.
 
 This is the source the was displayed
 
 
 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
 htmlhead
 title200 OK/title
 /headbody
 h1OK/h1
 pThe server is temporarily unable to service your
 request due to maintenance downtime or capacity
 problems. Please try again later./p
 /body/html
 
 and the response header visible on firefox
 
 Date: Thu, 11 Dec 2008 15:58:32 GMT
 Server: Apache/2.2.9 (Unix) mod_jk/1.2.27
 Keep-Alive: timeout=5, max=100
 Connection: Keep-Alive
 Transfer-Encoding: chunked
 Content-Type: text/plain
 
 200 OK
 
 best regards,
 Marco
 
 
 
 Rainer Jung-3 wrote:
 
 Hi Marco,
 
 marcobalc schrieb:
 Hi,
 
 now I have the stacktrace but the problem is that the stack do not
 involve
 my classes :|
 
 java.lang.Throwable: Stack Info
 at org.apache.jk.core.MsgContext.action(MsgContext.java:263)
 at org.apache.coyote.Response.action(Response.java:183)
 at org.apache.coyote.Response.sendHeaders(Response.java:380)
 at
 org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)
 at
 org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:273)
 at
 org.apache.catalina.connector.Response.finishResponse(Response.java:492)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:310)
 at
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
 at
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
 at
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
 at
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
 at java.lang.Thread.run(Thread.java:619)
 
 Any idea? i'm going crazy on this problem :(
 
 Could you please post a more complete part of the log file, when used
 with the increased log level I posted to you earlier in this thread.
 With the more complete log we will have timestamps, and we can also see
 the second commit etc.
 
 Regards,
 
 Rainer
 
 -
 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/bad-content-type-mod_jk-1.2.27-tp20892496p20971586.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: Potential reuse of TagHandlers implementing JspIdConsumer?

2008-12-12 Thread Jochen Wuttke

Hi,

I finally found the time to build a test case for this issue.
I attach the WAR, but you still need to put the runtime library of  
AspectJ (aspectjrt.jar) on the classpath when running Tomcat.
The behavior I observe is that whenever I load/reload the page, the  
JspIdConsumer objects get allocated, and some, but never all of

them get GC'd. You should see messages on the console/log like

Adding JspIdConsumer:someClassName:itsHashCode:theJspId

and

Removed someJspId

You will see three Adding messages for every instance created (it's  
a mess to track this properly),

and you should see one Removed message for every GC'd instance.
When I run grep | wc on the output, the distance between the number  
of created and GC'd object grows over time and reloads of the test page.
I had this running for a bit, trying to see if after a session timeout  
the remaining instances would be GC'd, but they didn't. I don't know  
what to make of this, but it feels like Tomcat is holding on to some  
of the instances for too long for no good reason.


Jochen


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



Re: Potential reuse of TagHandlers implementing JspIdConsumer?

2008-12-12 Thread Mark Thomas
Jochen Wuttke wrote:
 Hi,
 
 I finally found the time to build a test case for this issue.
 I attach the WAR,

The users list won't accept attachments. You;ll need to open a bugzilla
entry and attach your test case there.

Mark


 but you still need to put the runtime library of
 AspectJ (aspectjrt.jar) on the classpath when running Tomcat.
 The behavior I observe is that whenever I load/reload the page, the
 JspIdConsumer objects get allocated, and some, but never all of
 them get GC'd. You should see messages on the console/log like
 
 Adding JspIdConsumer:someClassName:itsHashCode:theJspId
 
 and
 
 Removed someJspId
 
 You will see three Adding messages for every instance created (it's a
 mess to track this properly),
 and you should see one Removed message for every GC'd instance.
 When I run grep | wc on the output, the distance between the number of
 created and GC'd object grows over time and reloads of the test page.
 I had this running for a bit, trying to see if after a session timeout
 the remaining instances would be GC'd, but they didn't. I don't know
 what to make of this, but it feels like Tomcat is holding on to some of
 the instances for too long for no good reason.
 
 Jochen
 
 
 -
 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



Web.xml entries

2008-12-12 Thread paul.ockleford
Hi,

I have a basic question about the tomcat server start-up. If there are
classes missing that are referenced as servlet entries in the web.xml should
this render the server unuseable?

I did a little test today with a web app, and when tomcat started it
reported class not found exceptions for the missing classes, and I could no
longer get to the login page for the web app which is a jsp. When I fixed
those errors the login page displayed fine. The error I got was resource not
available (tomcat error page), I am using tomcat 5.5.

Thanks


***
This  message  may  contain  confidential and  privileged  information.
If you  are not the  intended recipient  you should not  disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents.  To do so is strictly  prohibited and may be unlawful.
Please  inform  the  sender that  this  message has  gone astray before
deleting it.  Thank you.

2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.

If you work for the NHS  and  would like  an NHSmail  email account, go
to: www.connectingforhealth.nhs.uk/nhsmail
***


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



Re: Web.xml entries

2008-12-12 Thread Mark Thomas
paul.ocklef...@nhs.net wrote:
 Hi,
 
 I have a basic question about the tomcat server start-up. If there are
 classes missing that are referenced as servlet entries in the web.xml should
 this render the server unuseable?

No. But it should, and I believe it does, render that web application unusable.

Mark

 
 I did a little test today with a web app, and when tomcat started it
 reported class not found exceptions for the missing classes, and I could no
 longer get to the login page for the web app which is a jsp. When I fixed
 those errors the login page displayed fine. The error I got was resource not
 available (tomcat error page), I am using tomcat 5.5.
 
 Thanks
 
 
 ***
 This  message  may  contain  confidential and  privileged  information.
 If you  are not the  intended recipient  you should not  disclose, copy
 or distribute information in this e-mail or take any action in reliance
 on its contents.  To do so is strictly  prohibited and may be unlawful.
 Please  inform  the  sender that  this  message has  gone astray before
 deleting it.  Thank you.
 
 2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
 tribute to the NHS staff and volunteers who help shape the service, and
 celebrate their achievements.
 
 If you work for the NHS  and  would like  an NHSmail  email account, go
 to: www.connectingforhealth.nhs.uk/nhsmail
 ***
 
 
 -
 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: Web.xml entries

2008-12-12 Thread paul.ockleford
Ok thanks for the quick response! 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: 12 December 2008 11:50
To: Tomcat Users List
Subject: Re: Web.xml entries

paul.ocklef...@nhs.net wrote:
 Hi,
 
 I have a basic question about the tomcat server start-up. If there are 
 classes missing that are referenced as servlet entries in the web.xml 
 should this render the server unuseable?

No. But it should, and I believe it does, render that web application
unusable.

Mark

 
 I did a little test today with a web app, and when tomcat started it 
 reported class not found exceptions for the missing classes, and I 
 could no longer get to the login page for the web app which is a jsp. 
 When I fixed those errors the login page displayed fine. The error I 
 got was resource not available (tomcat error page), I am using tomcat 5.5.
 
 Thanks
 
 
 **
 * This  message  may  contain  confidential and  privileged  
 information.
 If you  are not the  intended recipient  you should not  disclose, 
 copy or distribute information in this e-mail or take any action in 
 reliance on its contents.  To do so is strictly  prohibited and may be
unlawful.
 Please  inform  the  sender that  this  message has  gone astray 
 before deleting it.  Thank you.
 
 2008 marks the 60th anniversary of the NHS.  It's an opportunity to 
 pay tribute to the NHS staff and volunteers who help shape the 
 service, and celebrate their achievements.
 
 If you work for the NHS  and  would like  an NHSmail  email account, 
 go
 to: www.connectingforhealth.nhs.uk/nhsmail
 **
 *
 
 
 -
 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



***
This  message  may  contain  confidential and  privileged  information.
If you  are not the  intended recipient  you should not  disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents.  To do so is strictly  prohibited and may be unlawful.
Please  inform  the  sender that  this  message has  gone astray before
deleting it.  Thank you.

2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.

If you work for the NHS  and  would like  an NHSmail  email account, go
to: www.connectingforhealth.nhs.uk/nhsmail
***


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



DeltaManager + Session beans: Do they like eachother?

2008-12-12 Thread Pieter Temmerman
Hello everybody,

First of all, to avoid any misunderstandings, below problems relate to
applications that I did not write, neither do I exactly know the
implementation of them. Although, if required, I can ask the programmer
for more information.

That being said, the problem that I am seeing is that the application
that I deployed on a Tomcat 5.5.27 cluster is not correctly handling
session replication. (The application works perfectly on a single
server).

The reason for thinking this is that the application fails, but only at
irregular intervals. When I press F5, then the page eventually comes
true. As said before, this does not happen in a single server
environment. According to the Tomcat logs, I can see that my request is
being served by Tomcat1 and by Tomcat2, and vice versa.

My server.xml configuration:

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true
 clusterLog=true
 clusterLogName=clusterlog
Membership

className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.6
mcastPort=45566
mcastFrequency=500
mcastDropTime=3000/
Receiver

className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=172.18.0.39
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=25/
Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000
keepAliveTimeout=2
waitForAck=true/
Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
   filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*
\.html;.*\.css;.*\.txt;/
!--Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/--
ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


Something interesting that I figured out is that if I change the
managerClass from 
managerClassName=org.apache.catalina.cluster.session.DeltaManager
to
managerClassName=org.apache.catalina.cluster.session.SimpleTcpReplicationManager

then the application works fine. (It keeps working when I set
useDirtyFlag to false).

One would think that the DeltaManager is just not replicating, but I can
see the following messages in catalina.out:

catalina.out:INFO: Manager[/Application1], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://172.18.0.40:4001,catalina,172.18.0.40,4001,
 alive=73627]. This operation will timeout if no session state has been 
received within 60 seconds
catalina.out:INFO: Manager[/Application1], session state received in 104
ms.

Currently the only information that I have about the application is that
it's using JSF and session beans.
The developer said he does not need to explicitly put
session.SetAttribute(whatever), since this is automatically taken care
of by the session bean object. I'm not a Java programmer, so I'm not
sure whether that is correct.

I would really appreciate if someone could point me into the right
direction.

Btw. I cannot change the managerclass to SimpleTcpReplicationManager, as
I got other applications on the same server that start failing if that
manager is used.

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



mod_jk: Expected behaviour for ajp-pool currentThreadCount

2008-12-12 Thread Michael Echerer
Hello,

I'm currently analysing issues with a quite old Tomcat 5.5.17, mod_jk
1.2.15 and Apache 2.0.55 loadbalanced setup with 4 Apaches (worker.c)
and 4 Tomcats.

Questions are:
* Can anyone explain why Apache SYN requests to Tomcat don't get
answered (probably this happens only if maxClients exceeds Tomcat AJP
pool sizes).
* Shouldn't the AJP thread pool shrink to maxSpareThreads, if idle, or
will threads stay open if Apache ever requested them?

Currently there are 4 Apaches, 2 with

StartServers 2
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild  0

and 2 more with

StartServers 2
MaxClients 200
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild  0

that have problems with hung SYN requests when getting near the 4
Tomcat's default AJP thread pool size of 200.

Current guess was that it's simply a bad idea to have 2*300+2*200=1000
maxClients on Apache side and just 4*200=800 AJP threads (if evenly
balanced) on Tomcat side.

So firstly increased Tomcat threads to maxThreads=500 to find some peak.
All other AJP connector settings are default, resp. not defined.

Meanwhile we log the JMX currentThreadCount for the AJP-Pools and the
thread count only increases. However even after peak hours the
currentThreadCount does not decrease. However would expect to get back
to the maxSpareThreads default of 50 during night time.

Can anyone explain why the AJP thread count stays high? I saw that one
could configure mod_jk connection_pool_timeout which is not done yet.
Could that be the reason for the thread pool never reducing the thread
count even though the AJP thread pool has a maxSpareThread setting (i.e.
doesn't this have an effect without pool timeout?)?

What could be the reason for SYN requests of the Apache that never get
answered by Tomcat?

Thanks,
Michael Echerer


-- 
TNG Technology Consulting GmbH, Betastr. 13a, D-85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
Amtsgericht München, HRB 135082

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



HttpServletRequest#getSession(false) says the session is good, but session is still invalid!

2008-12-12 Thread Martin B. Smith
Hi there,

With Tomcat 5.5 , I'm using the (what I assume to be typical) pattern:

--
if(!request.isRequestedSessionIdValid() || request.getSession(false) ==
null)
{
  // some code to bail out and return an error
}

HttpSession session = request.getSession();
--

and yet, later on in my code, a call to session.setAttribute() throws
the following exception (see bottom of email)... what am I doing wrong?
I've guarded against an invalid session by checking for one, yet there
it is on the first attempt to use it!

Help! Thanks!

Exception from above:
Throwable/Exception cause: java.lang.IllegalStateException:
setAttribute: Session already invalidated
Stack trace:
java.lang.IllegalStateException: setAttribute: Session already invalidated
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1251)
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1233)
at
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:129)
at
edu.ufl.bebr.scheduler.web.action.EmployeeScheduleAction.execute(EmployeeScheduleAction.java:176)



-- 
Martin Smith, Systems Developer
mart...@bebr.ufl.edu
Bureau of Economic and Business Research
University of Florida
(352) 392-0171 Ext. 221

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



Tomcat 4 Maintenance Security Patches

2008-12-12 Thread Andrew Feller
QUESTION:
How often is the Tomcat 4 branch updated with security  bug fixes?  As
often as issues are uncovered in newer versions?

CONTEXT:
We are looking into some commercial software that supports WebSphere,
WebLogic, or Tomcat 4.  Our primary concern of going the Tomcat 4 route is
whether patches are still released and their frequency.

Thank you for the assistance,
Andrew
-- 
Andrew Feller, Analyst
LSU University Information Services
200 Frey Computing Services Center
Baton Rouge, LA 70803


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



Re: HttpServletRequest#getSession(false) says the session is good, but session is still invalid!

2008-12-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

Martin B. Smith wrote:
 With Tomcat 5.5 , I'm using the (what I assume to be typical) pattern:
 
 --
 if(!request.isRequestedSessionIdValid() || request.getSession(false) ==
 null)
 {
   // some code to bail out and return an error
 }
 
 HttpSession session = request.getSession();


I've never done this. I typically just do:

HttpSession nonRequiredSession = request.getSession(false);

if(null === nonRequiredSession)
  // I gots no session
else
  // I have a session

 and yet, later on in my code, a call to session.setAttribute() throws
 the following exception (see bottom of email)... what am I doing wrong?

 Throwable/Exception cause: java.lang.IllegalStateException:
 setAttribute: Session already invalidated

Presumably, your code has called session.invalidate() during the
processing of the current request. I'm not sure what happens if you do this:

session = request.getSession();
session.invalidate();
session = request.getSession();
session.setAttribute(foo, bar);

Will this fail on the setAttribute, or will the second getSession give
you a new session?

My guess is that your code does the above, but without the second
request.getSession(), so you end up with an invalidated session into
which you are trying to shove attributes.

Maybe you could post the code?

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

iEYEARECAAYFAklCpmcACgkQ9CaO5/Lv0PDVsACfSIj+zQgexu2CWGcgTsdUzhDv
jpoAnjljuncyiTQP7u5uFagYS/Mwuw3b
=z0Dn
-END PGP SIGNATURE-

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



Re: HttpServletRequest#getSession(false) says the session is good, but session is still invalid!

2008-12-12 Thread Martin B. Smith
Hi Chris,

Thanks for your response. I actually don't invalidate the current
session there. That's what is so frustrating -- the code snippet I
provided is at the very top of the method, and there's no more reference
to the session or request until using setAttribute.

I don't mind providing the code -- it's at http://java.pastebin.ca/1283742.

Actually, looking at it in the pastebin -- could it be that I'm setting
an attribute FOR the error about a missing session?

Hmm did I just solve my own problem?

Martin




Christopher Schultz wrote:
 Martin,
 
 Martin B. Smith wrote:
 With Tomcat 5.5 , I'm using the (what I assume to be typical) pattern:
 
 --
 if(!request.isRequestedSessionIdValid() || request.getSession(false) ==
 null)
 {
   // some code to bail out and return an error
 }
 
 HttpSession session = request.getSession();
 
 
 I've never done this. I typically just do:
 
 HttpSession nonRequiredSession = request.getSession(false);
 
 if(null === nonRequiredSession)
   // I gots no session
 else
   // I have a session
 
 and yet, later on in my code, a call to session.setAttribute() throws
 the following exception (see bottom of email)... what am I doing wrong?
 
 Throwable/Exception cause: java.lang.IllegalStateException:
 setAttribute: Session already invalidated
 
 Presumably, your code has called session.invalidate() during the
 processing of the current request. I'm not sure what happens if you do this:
 
 session = request.getSession();
 session.invalidate();
 session = request.getSession();
 session.setAttribute(foo, bar);
 
 Will this fail on the setAttribute, or will the second getSession give
 you a new session?
 
 My guess is that your code does the above, but without the second
 request.getSession(), so you end up with an invalidated session into
 which you are trying to shove attributes.
 
 Maybe you could post the code?
 
 -chris

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


-- 
Martin Smith, Systems Developer
mart...@bebr.ufl.edu
Bureau of Economic and Business Research
University of Florida
(352) 392-0171 Ext. 221

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



Re: HttpServletRequest#getSession(false) says the session is good, but session is still invalid!

2008-12-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

Martin B. Smith wrote:
 Actually, looking at it in the pastebin -- could it be that I'm setting
 an attribute FOR the error about a missing session?
 
 Hmm did I just solve my own problem?

Yup! Look at your error handling code:

 if(!request.isRequestedSessionIdValid() || 
 request.getSession(false) == null)
 {
 
 request.setAttribute(WebUIConstants.ERROR_MESSAGE_DETAIL, Your session has 
 timed out. Please login again.);
 return 
 mapping.findForward(WebUIConstants.ACTION_DETAILED_FAILURE);
 }


That just ain't gonna work. I think you want to set an attribute in the
request, not the session.

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

iEYEARECAAYFAklCviIACgkQ9CaO5/Lv0PCRJQCfQWZmh2E07VZ1IJWMKLvpbWXe
AMgAniWWNM83MZkSRmFcnXvzVHO5OKKZ
=g8dw
-END PGP SIGNATURE-

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



Re: Tomcat 4 Maintenance Security Patches

2008-12-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

Andrew Feller wrote:
 QUESTION:
 How often is the Tomcat 4 branch updated with security  bug fixes?  As
 often as issues are uncovered in newer versions?

- From the front page of tomcat.apache.org:

The current status of all Tomcat versions is maintained on the wiki.

The link to the wiki sends you to
http://wiki.apache.org/tomcat/TomcatVersions which I believe answers
your questions.

You might want to ask the software vendor about compatibility with
Tomcat 5.5 or 6.0. Tomcat 6.0 has been available for over 2 years,
Tomcat 5.5 available for more than 8 (!).

My experience was that moving from TC 4.1 to 5.5 was as simple as
dumping all app-specific configuration from server.xml (basically,
starting over from scratch with the vendor-supplied config) and moving
that configuration into my webapp's context.xml (which is a
Tomcat-specific deployment descriptor of sorts). I suspect that
upgrading from 4.x to 5.5 or even 6.0 won't be too bad. The servlet
specification itself is backward-compatible for all but the most
esoteric issues.

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

iEYEARECAAYFAklCwCIACgkQ9CaO5/Lv0PAwcACgqL74OWFwCSDsHAqlNaZf0hQC
Fb4AnA02H4BRaU+f3rHtxyJYmAV40H/I
=BqNJ
-END PGP SIGNATURE-

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



Re: service.bat install failure (Windows, v 6.0.18)

2008-12-12 Thread andrew
OK, I have a *procedural* resolution to my issue, however I do not yet 
understand the underlying functional mechanism to my satisfaction.  For 
those who only care about the bottom line, here it is:


* If you want to use Tomcat as a Windows service, use the .zip Tomcat
* distribution, not the .tar.gz distribution.

I think it is worth elaborating some though.  If anyone out there has 
influence on the build and/or documentation, I hope you will read further.


1. Rainer Jung suggested that the behavior difference I see between the two 
distros could be expained by line-ending differences/incompatibilities 
(particularly in config files).  This does NOT appear to be true in my case. 
I've looked at the .xml files in the /conf directory, and they have *nix 
style line endings in BOTH distros.


 1.1. The fact that the .tar.gz version is so close to correct on Windows, 
makes me hope to eventually track down the precise cause of failure; it 
might be interesting.  Remember, I have seen Tomcat work flawlessly for more 
than a month when run as an app, and the Windows service installs without 
visible error.  It is only that the server won't return pages when run as a 
service.


2. If the .tar.gz archive is targeted for *nix only, it sure would be nice 
if this was stated explicitly on the download page: 
http://tomcat.apache.org/download-60.cgi


  2.1. I followed the README link -- it only goes to a page that says 
Hosted by Linux resources
  2.2. In the file RUNNING.txt, there is also no explicit mention of 
differences.  In fact, I get the strong impression that both are equivalent 
since the instructions just say to use different startup scripts for the 
different platforms.  At very least, can I suggest adding my experience as 
Troubleshooting issue (4) at the bottom of this file?


3. From what I am seeing, it appears that the .zip and .tar.gz archives were 
actually created from different source trees, as oposed to just being 
different compressions of the same source.  The differences are minor, but 
not attributable to tar version incompatibilities, for example.  If that is 
true, then I suggest NOT adding files with extension .exe to the .tar.gz 
build/distribution.  Doing so seems like an implicit confirmation that the 
distro is meant to be run on Windows.



For those of you who think that I deserved this for being silly enough to 
extract the .tar.gz distro on Windows in the first place, well, maybe. 
I'll definitely use .zip in the future whenever there is an option.  But 
keep in mind that I've used tar quite a bit on Windows -- I haven't seen 
anything like this before.  When I first downloaded Tomcat, I remember 
thinking it was really cool that it could be offered as a platform 
independent Binary Distribution thanks to Java.  And man, the failure mode 
is subtle -- I didn't see it until after a month of use.



Chuck, sorry to report such a silly resolution.  But I'm still kind of glad 
for the experience.  Although a lot of your advice turned out not to be 
related to my problem, I'm a better Tomcat user as a result.  Thanks for 
your patience.


-andrew








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



RE: service.bat install failure (Windows, v 6.0.18)

2008-12-12 Thread Caldarale, Charles R
 From: andrew [mailto:ad...@ecpcorp.net]
 Subject: Re: service.bat install failure (Windows, v 6.0.18)

 The fact that the .tar.gz version is so close to correct
 on Windows, makes me hope to eventually track down the
 precise cause of failure; it might be interesting.

I'd also like to know the details if you pursue this, since I often use the 
.zip on Linux and have, on rare occasion, tried the .tar.gz on Windows.

 - 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 5.5 manager deploy context descriptor

2008-12-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Anni,

Anni Ahonen-Bishopp wrote:
 Is there a way to see, if my context.xml is actually loaded anywhere?

You might want to try loading LambdaProbe (http://www.lambdaprobe.org/).
You can view tons of information in there, including connection pools,
etc. I'm not sure how much detail you can get about context.xml-related
data loaded with each web application, but you can try.

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

iEYEARECAAYFAklC73sACgkQ9CaO5/Lv0PDqoACeKfMkB4Z5Ley2v9Kgj9+I6A98
o4kAn2JiIA+2Mlx1VmEGXIB9V+r7yX9m
=hVfk
-END PGP SIGNATURE-

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



Tomcat 6 Cluster Setup- Server1 simply hangs sometimes - won't start...

2008-12-12 Thread jsandhu2204

We installed.tomcat6 in production on three high ended machines
 
Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture 
Apache Tomcat/6.0.18 1.6.0_07-b06 Sun Microsystems Inc. Windows 2003 5.2
amd64 

 
1) Cluster is setup correctly in the server.xml as follows
2) web.xml has distributable/ flag
 
Problem1 :  While starting tomcat6, sometimes it starts other times it
simply hangs on the following message:
INFO: Manager [localhost#/ivos]; session state send at 12/12/08 12:34 AM
received in 110 ms. 
Tomcat Log: 

INFO: Register manager /ivos to cluster element Engine with name Catalina
Dec 12, 2008 12:34:53 AM org.apache.catalina.ha.session.DeltaManager start

INFO: Starting clustering manager at /ivos Dec 12, 2008 12:34:53 AM
org.apache.catalina.ha.session.DeltaManager getAllClusterSessions

WARNING: Manager [localhost#/ivos], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 88, 8,
28}:4002,{10, 88, 8, 28},4002, alive=123501,id={27 -68 111 -64 -49 -117 68
38 -98 -27 -49 39 -22 6 -88 -38 }, payload={}, command={}, domain={}, ].
This operation will timeout if no session state has been received within 60
seconds.

Dec 12, 2008 12:34:53 AM org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions

INFO: Manager [localhost#/ivos]; session state send at 12/12/08 12:34 AM
received in 110 ms. 

After this nothing happens simply hangs.  Should I use
tcpHostListener=MYIPAddress  or auto  May be auto is slowing it down?

Problem2:  User does not transparently fail-over to node2 if the users fails
on node1.

However, the session count on all the nodes in cluster has correct number. 
Means replication does work.  

I have attached server.xml

Here is multicast information 

 Local Address  Foreign Address
  TCP10.88.8.27:40010.0.0.0:0  LISTENING
  TCP10.88.8.27:400110.88.8.28:1993ESTABLISHED
  TCP10.88.8.27:400110.88.8.28:2682ESTABLISHED
  TCP10.88.8.27:400110.88.8.30:3532ESTABLISHED
  TCP10.88.8.27:400110.88.8.30:4292ESTABLISHED
  TCP10.88.8.27:424510.88.2.204:1433   ESTABLISHED

  TCP10.88.8.27:425010.88.8.28:4002ESTABLISHED
  TCP10.88.8.27:425210.88.8.28:4002ESTABLISHED
  TCP10.88.8.27:425410.88.8.30:4003ESTABLISHED
  TCP10.88.8.27:425510.88.8.30:4003ESTABLISHED
http://www.nabble.com/file/p20985367/server.xml server.xml 
-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-Cluster-Setup--Server1-simply-hangs-sometimes---won%27t-start...-tp20985367p20985367.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 5.5 manager deploy context descriptor

2008-12-12 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: Tomcat 5.5 manager deploy context descriptor

  Is there a way to see, if my context.xml is actually loaded
  anywhere?

 You might want to try loading LambdaProbe
 (http://www.lambdaprobe.org/).

You can also use JConsole, if you start Tomcat with the 
-Dcom.sun.management.jmxremote option.

Under the MBeans tab, follow this branch: Catalina - WebModule - 
//[host]/[contextPath] - none - none - Attributes.  There you will find a 
good bit of information about the webapp, including various Context 
parameters and servlet information from web.xml (double-click on the bolded 
array items in the rightmost column to open them up).

There's also a Catalina - Resource branch that has information about any 
Resource elements in use.

 - 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: mod_jk: Expected behaviour for ajp-pool currentThreadCount

2008-12-12 Thread Bill Barker

Michael Echerer m...@tngtech.com wrote in message 
news:49426119.3060...@tngtech.com...
 Hello,

 I'm currently analysing issues with a quite old Tomcat 5.5.17, mod_jk
 1.2.15 and Apache 2.0.55 loadbalanced setup with 4 Apaches (worker.c)
 and 4 Tomcats.

 Questions are:
 * Can anyone explain why Apache SYN requests to Tomcat don't get
 answered (probably this happens only if maxClients exceeds Tomcat AJP
 pool sizes).

That is the most likely reason, but there are other possibilities that 
should show up in your Tomcat logs.

 * Shouldn't the AJP thread pool shrink to maxSpareThreads, if idle, or
 will threads stay open if Apache ever requested them?


With the default settings, the threads will stay open if Apache ever 
requested them.  With a version this old, you probably want to specify a 
connectionTimeout=xx in the Connector protocol=AJP/1.3 ... / 
element to allow threads to die if they aren't reused in a timely manor.  In 
this case, you probably also want to configure mod_jk to use CPING/CPONG so 
that it can detect that the thread went away.

Of course upgrading Tomcat makes available the APR and (experimental) NIO 
AJP/1.3 connectors, which allow a huge number of connections without tying 
up threads.

 Currently there are 4 Apaches, 2 with

 StartServers 2
 MaxClients 300
 MinSpareThreads 25
 MaxSpareThreads 75
 ThreadsPerChild 25
 MaxRequestsPerChild  0

 and 2 more with

 StartServers 2
 MaxClients 200
 MinSpareThreads 25
 MaxSpareThreads 75
 ThreadsPerChild 25
 MaxRequestsPerChild  0

 that have problems with hung SYN requests when getting near the 4
 Tomcat's default AJP thread pool size of 200.

 Current guess was that it's simply a bad idea to have 2*300+2*200=1000
 maxClients on Apache side and just 4*200=800 AJP threads (if evenly
 balanced) on Tomcat side.


With the default settings, yes this is a bad idea ;).  You need to have at 
least as many AJP threads as maxClients+1 in the default case.

 So firstly increased Tomcat threads to maxThreads=500 to find some peak.
 All other AJP connector settings are default, resp. not defined.

 Meanwhile we log the JMX currentThreadCount for the AJP-Pools and the
 thread count only increases. However even after peak hours the
 currentThreadCount does not decrease. However would expect to get back
 to the maxSpareThreads default of 50 during night time.


See above.  The thread count will never go down without specifying a 
connectionTimeout.

 Can anyone explain why the AJP thread count stays high? I saw that one
 could configure mod_jk connection_pool_timeout which is not done yet.
 Could that be the reason for the thread pool never reducing the thread
 count even though the AJP thread pool has a maxSpareThread setting (i.e.
 doesn't this have an effect without pool timeout?)?


I've never tried to do this on the mod_jk side, but the archives suggest it 
doesn't work well.

 What could be the reason for SYN requests of the Apache that never get
 answered by Tomcat?


That the thread-pool is exhausted is the most common reason.  But since the 
default AJP Connector answers the request on the current thread and spawns 
another thread to go back and listen for connections there are other reasons 
(e.g. an OOME when spawning the thread) why it might fail.  However it 
should say in the Tomcat logs what the problem is.

 Thanks,
 Michael Echerer


 -- 
 TNG Technology Consulting GmbH, Betastr. 13a, D-85774 Unterföhring
 Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
 Amtsgericht München, HRB 135082 




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



Re: Restricting IP address and redirecting

2008-12-12 Thread Bill Barker

Flemion Shafeeq flem...@hulmail.harvard.edu wrote in message 
news:5.2.1.1.2.2008123217.02090...@hulmail.harvard.edu...
 Hi,
 We restrict IP addresses to our application using RemoteAddressValve.
 But we have a requirement of redirecting the request to a customized html
 static page when we get request from such denied IP's.
 How do i do this.
 Is it possible to customize this class to do this redirection and deploy 
 it
 in the tomcat application?

Tomcat is open-source, so it is always possible to customize it any way you 
like ;).

If your webapp never sends a 403 (Forbidden) response (e.g. you don't 
authenticate users), then you could do it by specifying a custom error-page 
for the error code 403.  If you send a 403 response for other reasons, then 
it is likely that it will be easier to roll-your-own Filter based on the 
code from RemoteAddressValve.

 Please help. we are using tomcat 5.5
 Thanks
 Flemion.





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