DO NOT REPLY [Bug 34561] New: - SecurityConstraints.removeAuthRole(String authRole) doesn't not set boolean authConstraint to false if no more roles.

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34561

   Summary: SecurityConstraints.removeAuthRole(String authRole)
doesn't not set boolean authConstraint to false if no
more roles.
   Product: Tomcat 5
   Version: 5.0.24
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


SecurityConstraint.removeAuthRole(String authRole) doesn't not set boolean
'authConstraint' to false if no more roles.

see line 325 on org.apache.catalina.deploy.SecurityConstraint

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34560] New: - AuthenticatorBase tests and applies disableProxyCaching even if no auth-constraints

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34560

   Summary: AuthenticatorBase tests and applies disableProxyCaching
even if no auth-constraints
   Product: Tomcat 5
   Version: 5.0.24
  Platform: Other
OS/Version: other
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The web.xml contains


Security Constraint

HTTP Non Protected 
Area
/favicon.ico
*.gif
*.js
*.html
*.css
/css/*
/images/*
/js/*



CONFIDENTIAL




Although it is https (CONFIDENTIAL), it doesn't have any
...
yet the valve FormAuthenticator (extends AuthenticatorBase, 5.0.24, line 458)
only tests for existence of constraints, not roles:

   if ((constraints == null) /* &&
(!Constants.FORM_METHOD.equals(config.getAuthMethod())) */ ) {
if (log.isDebugEnabled())
log.debug(" Not subject to any constraint");
context.invokeNext(request, response);
return;
}

// Make sure that constrained resources are not cached by web proxies
// or browsers as caching can provide a security hole
HttpServletRequest hsrequest = 
(HttpServletRequest)hrequest.getRequest();
if (disableProxyCaching && 
// FIXME: Disabled for Mozilla FORM support over SSL 
// (improper caching issue)
//!hsrequest.isSecure() &&
!"POST".equalsIgnoreCase(hsrequest.getMethod())) {
HttpServletResponse sresponse = 
(HttpServletResponse) response.getResponse();
sresponse.setHeader("Pragma", "No-cache");
sresponse.setHeader("Cache-Control", "no-cache");
sresponse.setHeader("Expires", DATE_ONE);
}


As a result, it is not allowing caching of static ressources in the patterns.
(Slow site performance)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bugs 34140 and 34199

2005-04-21 Thread Ian F. Darwin
Henri Gomez wrote:
I know that but if your starter wrapper check if the process whom pid
is stored on the file is still alive it could determine if the process
has been aborted via kill -9.
I'm using this kind of hack in Linux init.d rc for at least 2 years,
whitout problems
 

Right, if you read the PID and send it a signal to ensure it's still 
alive at the OS level, you get quite a bit of reliability.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: bugs 34140 and 34199

2005-04-21 Thread Henri Gomez
I know that but if your starter wrapper check if the process whom pid
is stored on the file is still alive it could determine if the process
has been aborted via kill -9.

I'm using this kind of hack in Linux init.d rc for at least 2 years,
whitout problems

2005/4/21, Ian F. Darwin <[EMAIL PROTECTED]>:
> Henri Gomez wrote:
> 
> >Many way :
> >
> >- check the AJP port is listening on the right port.
> >
> >- Add a 'status' file in AJP support created after AJP is completly up
> >and destroyed when AJP is closing.
> >
> >BTW, it will be better to have such file created when Tomcat is fully
> >started (independant from AJP which could be disactivated by conf) and
> >destroyed just before Tomcat stop. And if you could get the initial
> >process/job id and pass it to tomcat, it could fill this fill with
> >such jobid.
> >
> >
> Anything depending on files will give "false positives" when Tomcat is
> hit by kill -9 (on unix, or equiv on others), dies to to a JVM crash, or
> hangs after an "out of memory" error. You'd need to update the file
> periodically in the server and have a client API for checking the timestamp.
> 
> So I think the AJP port maybe more reliable, but it, too, will give
> false + if the server gets hung.
> 
> Maybe there should be a simple optional new "IsActiveConnector", if you
> enable it in config, then connect to it and send a message, it responds
> if it things the server is running correctly.  Oh, well, then why not
> just send a simple HTTP request? The IsActiveConnector is fairly simple
> to implement, but is it a good idea?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33106] - SSI Processing Enhancements (patch provided)

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33106





--- Additional Comments From [EMAIL PROTECTED]  2005-04-21 23:50 ---
Thank you for your follow up on this.  You're right about the content-length
header, I didn't notice that in our environment because our server sets the
content-length on the way out to address some other issues.  This could be
simply resolved by explicitly resetting the content-length header to the site of
the byte wrapper array.  Feel free to make this (and the other changes you
proposed) unless you'd prefer me to do it.  Thanks a ton for your help in
working with a newbie contributor...  :-)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34558] New: - [mod_jk1.2.10] HTTP status 200 returned in case of internal sever error instead of 500

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34558

   Summary: [mod_jk1.2.10] HTTP status 200 returned in case of
internal sever error instead of 500
   Product: Tomcat 4
   Version: Unknown
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connector:JK/AJP
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


When using Apache 2.0.54 along with mod_jk1.2.10 on windows (tomcat 4, AJP13
connector)
and when there is some tomcat misconfiguration, tomcat is down or whatever,
Apache displays a OK 200 page instead of 500 error page

This occured after upgrading mod_jk from 1.2.8 to 1.2.10

source code of the page : 



200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.

Apache/2.0.54 (Win32) mod_jk/1.2.10 PHP/4.3.11 Server at
somecompany.com Port 80


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33106] - SSI Processing Enhancements (patch provided)

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33106





--- Additional Comments From [EMAIL PROTECTED]  2005-04-21 23:33 ---
Almost there, but one slight glitch. After the SSI processing, the
content-length header and the actual content length are different. This causes
problems for both FireFox and IE. The easiest way to see it is to do an SSI
include of a file containing a single character.

When I do commit your patch, I intend to include the following changes unless
you know of a reason not to:
SSIServlet
  - Not deprecated. I'd like to give people the option.
SSIFilter
  - Format changes for 80 character width.
ResponseIncludeWrapper
  - Default for lastModified changed to -1 from 0.
Globals
  - Keep the old flag
  - I need to check why the CGI servlet isn't using it any more
build.xml
  - Keep jar file name the same for consistency for current users
web.xml
  - Keep servlet mappings
SSIHowTo
  - Keep servlet configuration
SSIServletExternalResolver
  - Align behaviour with standard Tomcat. Fix posisble NPEs. Code is now:

} else if (name.equalsIgnoreCase("QUERY_STRING_UNESCAPED")) {
String queryString = req.getQueryString();
if (queryString != null) {
// Use default as a last resort
String queryStringEncoding =
org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;

String uriEncoding = null;
boolean useBodyEncodingForURI = false;

// Get encoding settings from request / connector if possible
String requestEncoding = req.getCharacterEncoding();
if (req instanceof Request) {
uriEncoding = 
((Request)req).getConnector().getURIEncoding();
useBodyEncodingForURI =

((Request)req).getConnector().getUseBodyEncodingForURI();
}

// If valid, apply settings from request / connector
if (uriEncoding != null) {
queryStringEncoding = uriEncoding;
} else if(useBodyEncodingForURI) {
if (requestEncoding != null) {
queryStringEncoding = requestEncoding;
}
}

try {
retVal = URLDecoder.decode(queryString,
queryStringEncoding);   
} catch (UnsupportedEncodingException e) {
retVal = queryString;
}
}



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34547] - Tomcat "forgets" a session attribute when reloading context

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34547





--- Additional Comments From [EMAIL PROTECTED]  2005-04-21 20:45 ---
Yes, i asked in the list and indeed that was the problem. I of course know
bugzilla isn't a help desk, i only posted this because i thought it was a bug,
since my other objects in the session were plain strings and weren't
experiencing this behavior. That probably means strings implement Serializable
or something and i wasn't aware of that.

Thanks for the help! :)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34547] - Tomcat "forgets" a session attribute when reloading context

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34547





--- Additional Comments From [EMAIL PROTECTED]  2005-04-21 18:18 ---
Custom objects which do not implement java.io.Serializable cannot be persisted
across restarts. There should be a message in the logs stating so. Use
tomcat-user  for more details.

Bugzilla is not a support forum/help desk.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34526] - Truncated content in decompressed requests from mod_deflate

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34526





--- Additional Comments From [EMAIL PROTECTED]  2005-04-21 18:16 ---
To Henri Gomez: I have no control over Content-Length that the client sends. The
C++ program that sends the request uses Internet Explorer API (URLMON), it sets
Content-Length to the actual number of bytes in the request content, and there
is no way to change it.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bugs 34140 and 34199

2005-04-21 Thread Ian F. Darwin
Henri Gomez wrote:
Many way :
- check the AJP port is listening on the right port.
- Add a 'status' file in AJP support created after AJP is completly up
and destroyed when AJP is closing.
BTW, it will be better to have such file created when Tomcat is fully
started (independant from AJP which could be disactivated by conf) and
destroyed just before Tomcat stop. And if you could get the initial
process/job id and pass it to tomcat, it could fill this fill with
such jobid.
 

Anything depending on files will give "false positives" when Tomcat is 
hit by kill -9 (on unix, or equiv on others), dies to to a JVM crash, or 
hangs after an "out of memory" error. You'd need to update the file 
periodically in the server and have a client API for checking the timestamp.

So I think the AJP port maybe more reliable, but it, too, will give 
false + if the server gets hung.

Maybe there should be a simple optional new "IsActiveConnector", if you 
enable it in config, then connect to it and send a message, it responds 
if it things the server is running correctly.  Oh, well, then why not 
just send a simple HTTP request? The IsActiveConnector is fairly simple 
to implement, but is it a good idea?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DO NOT REPLY [Bug 34547] - Tomcat "forgets" a session attribute when reloading context

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34547





--- Additional Comments From [EMAIL PROTECTED]  2005-04-21 16:46 ---
Why this doesn't look like a bug? Tomcat deletes an object in my session. If it 
would delete all objects, 
then i wouldn't have posted this, since i would have thought that reloading a 
context would delete the 
whole session.

I think my code is ok since i just set that attribute (the one that gets null) 
at login.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat/APR benchmark results

2005-04-21 Thread Mladen Turk
Jess Holle wrote:
Would we expect anything markedly different with Apache 2 worker rather 
than prefork?
No.
Also I found that the majority of users is usig prefork because of PHP.
 This would seem a bit more of an apples-to-apples 
comparison (i.e. comparing multi-threaded low-process count servers).  
Also how many simultaneous workers (threads/processes/whatever) were 
allowewd in each case?

150 maxThreads/MaxClients in all cases.
The purpose of this connector is to deal with keep-alive connections,
so that's why the test were run with 500
cuncurrent connections with 1 second delay between each request/thread.
Of course we can set the MaxClients to 500, but what to do with
5000 or more of them?
For a smaller number of threads (50) using ab without a delay between
keepalive requests:
Server   Req/sec
HTTPD/2.0.49 4740.74
Http11Protocol   5203.25
Http11AprProtocol5203.25
Request is for the tomcat.gif (1943 bytes file).
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat/APR benchmark results

2005-04-21 Thread Peter Lin
I'll try running the same jmeter test plan on apache2 this weekend,
but I'm guessing the difference will be minimal.  based on the results
for the static file benchmarks, the delta between 1.3.x and 2.x wasn't
significant. I think those numbers are in the excel spreadsheet I
posted

http://people.apache.org/~woolfel/tc_results.html

if the results aren't in the spreadsheet I'll try to dig up the
numbers for 1.3.  I could be wrong, but the difference between httpd
1.3 and 2.0 was about 30-35%

peter


On 4/21/05, Jess Holle <[EMAIL PROTECTED]> wrote:
> Would we expect anything markedly different with Apache 2 worker rather
> than prefork?  This would seem a bit more of an apples-to-apples
> comparison (i.e. comparing multi-threaded low-process count servers).
> Also how many simultaneous workers (threads/processes/whatever) were
> allowewd in each case?
> 
> [I stopped using prefork on all platforms when moving to Apache 2.]
> 
> --
> Jess Holle
> 
> Mladen Turk wrote:
> 
> > Hi,
> >
> > Here are the brief results for Tomcat HEAD:
> >
> > Server   Threads Pause (ms) Error(%) Rate (req/sec)
> > Apache2.0.49500   1000   1.74   124.2
> > Http11Protocol  500   1000   0.20   139.5
> > Http11AprProtocol   500   1000   0.00   266.9
> >
> > Tests has been run on SLES9/64-Bit/Java-1.5.0_02-b09
> > Client was WINXP/SP2 running JMeter and Peter Lin's test plans.
> >
> > Those tests simulate 500 concurrent users connecting to a
> > 150 maxClient server. The connection is keep-alive with
> > 1 second delay between the requests.
> >
> > So our JNI/APR http connectors is almost twice faster then
> > both Tomcat standard http connector and Apache2/prefork.
> >
> > What is more important is that the error number is zero,
> > meaning there were no refused connections, because of
> > keepalive connection poller.
> >
> >
> > Regards,
> > Mladen.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat/APR benchmark results

2005-04-21 Thread Jess Holle
Would we expect anything markedly different with Apache 2 worker rather 
than prefork?  This would seem a bit more of an apples-to-apples 
comparison (i.e. comparing multi-threaded low-process count servers).  
Also how many simultaneous workers (threads/processes/whatever) were 
allowewd in each case?

[I stopped using prefork on all platforms when moving to Apache 2.]
--
Jess Holle
Mladen Turk wrote:
Hi,
Here are the brief results for Tomcat HEAD:
Server   Threads Pause (ms) Error(%) Rate (req/sec)
Apache2.0.49500   1000   1.74   124.2
Http11Protocol  500   1000   0.20   139.5
Http11AprProtocol   500   1000   0.00   266.9
Tests has been run on SLES9/64-Bit/Java-1.5.0_02-b09
Client was WINXP/SP2 running JMeter and Peter Lin's test plans.
Those tests simulate 500 concurrent users connecting to a
150 maxClient server. The connection is keep-alive with
1 second delay between the requests.
So our JNI/APR http connectors is almost twice faster then
both Tomcat standard http connector and Apache2/prefork.
What is more important is that the error number is zero,
meaning there were no refused connections, because of
keepalive connection poller.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat/APR benchmark results

2005-04-21 Thread Peter Lin
I'll be using my AMD 2ghz linux box running Fedora Core1.  haven't
updated to FC3 yet, though remy keeps suggesting I upgrade :)

peter


On 4/21/05, Mladen Turk <[EMAIL PROTECTED]> wrote:
> Peter Lin wrote:
> > Cool. I assume you were finally able to my test plan mladen?
> 
> Yes. I've run them extensively, thanks for sharing those.
> Been playing with the constant timer, number of threads, etc...
> Results show that for high number of connections the APR
> implementation is way ahead of any other.
> Me very happy :)
> 
> 
> > I plan
> > to run the benchmarks on my system this weekend, not that my laptop is
> > healthy.
> >
> 
> Sure.
> If you are using WIN32 as server, you will need a patched APR
> to be able to handle more then a 64 FD_SETSIZE limit.
> Tell me, and I can mail it to you.
> 
> 
> Regards,
> Mladen.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat/APR benchmark results

2005-04-21 Thread Mladen Turk
Peter Lin wrote:
Cool. I assume you were finally able to my test plan mladen?
Yes. I've run them extensively, thanks for sharing those.
Been playing with the constant timer, number of threads, etc...
Results show that for high number of connections the APR
implementation is way ahead of any other.
Me very happy :)

I plan
to run the benchmarks on my system this weekend, not that my laptop is
healthy.
Sure.
If you are using WIN32 as server, you will need a patched APR
to be able to handle more then a 64 FD_SETSIZE limit.
Tell me, and I can mail it to you.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat/APR benchmark results

2005-04-21 Thread Peter Lin
Cool. I assume you were finally able to my test plan mladen?  I plan
to run the benchmarks on my system this weekend, not that my laptop is
healthy.

peter


On 4/21/05, Mladen Turk <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Here are the brief results for Tomcat HEAD:
> 
> Server   Threads Pause (ms) Error(%) Rate (req/sec)
> Apache2.0.49500   1000   1.74   124.2
> Http11Protocol  500   1000   0.20   139.5
> Http11AprProtocol   500   1000   0.00   266.9
> 
> Tests has been run on SLES9/64-Bit/Java-1.5.0_02-b09
> Client was WINXP/SP2 running JMeter and Peter Lin's test plans.
> 
> Those tests simulate 500 concurrent users connecting to a
> 150 maxClient server. The connection is keep-alive with
> 1 second delay between the requests.
> 
> So our JNI/APR http connectors is almost twice faster then
> both Tomcat standard http connector and Apache2/prefork.
> 
> What is more important is that the error number is zero,
> meaning there were no refused connections, because of
> keepalive connection poller.
> 
> Regards,
> Mladen.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat/APR benchmark results

2005-04-21 Thread Mladen Turk
Hi,
Here are the brief results for Tomcat HEAD:
Server   Threads Pause (ms) Error(%) Rate (req/sec)
Apache2.0.49500   1000   1.74   124.2
Http11Protocol  500   1000   0.20   139.5
Http11AprProtocol   500   1000   0.00   266.9
Tests has been run on SLES9/64-Bit/Java-1.5.0_02-b09
Client was WINXP/SP2 running JMeter and Peter Lin's test plans.
Those tests simulate 500 concurrent users connecting to a
150 maxClient server. The connection is keep-alive with
1 second delay between the requests.
So our JNI/APR http connectors is almost twice faster then
both Tomcat standard http connector and Apache2/prefork.
What is more important is that the error number is zero,
meaning there were no refused connections, because of
keepalive connection poller.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator AuthenticatorBase.java

2005-04-21 Thread Keith Wannamaker
No one has commented so I withdraw my (valid) veto and I'll roll back
5.0 per Remy's wish.  I'm disappointed because I remember when Tomcat 
was an open-source project.

Keith
My veto of this change still stands, and it would be your responsibility 
of finding a fix more compatible with IE.  If no one else besides me 
thinks IE compatibility is important, head of tree is fine and I will 
withdraw my veto.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator AuthenticatorBase.java

2005-04-21 Thread keith
keith   2005/04/21 06:01:45

  Modified:catalina/src/share/org/apache/catalina/authenticator Tag:
TOMCAT_5_0 AuthenticatorBase.java
  Log:
  [34083, 27122, 28662, 29336, 29975, and 30618]
  Back out my previous change at Remy's wish so now Tomcat 5.0 too
  is incompatible with Internet Explorer under SSL by default.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.19.2.2  +3 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java
  
  Index: AuthenticatorBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java,v
  retrieving revision 1.19.2.1
  retrieving revision 1.19.2.2
  diff -u -r1.19.2.1 -r1.19.2.2
  --- AuthenticatorBase.java18 Apr 2005 20:20:46 -  1.19.2.1
  +++ AuthenticatorBase.java21 Apr 2005 13:01:45 -  1.19.2.2
  @@ -473,7 +473,8 @@
   !"POST".equalsIgnoreCase(hsrequest.getMethod())) {
   HttpServletResponse sresponse = 
   (HttpServletResponse) response.getResponse();
  -sresponse.setHeader("Cache-Control", "private");
  +sresponse.setHeader("Pragma", "No-cache");
  +sresponse.setHeader("Cache-Control", "no-cache");
   sresponse.setHeader("Expires", DATE_ONE);
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_msg_buff.c

2005-04-21 Thread mturk
mturk   2005/04/21 05:14:21

  Modified:jk/native/common jk_msg_buff.c
  Log:
  Dump entire message if log level is trace. In debug level log first 1024 
bytes.
  
  Revision  ChangesPath
  1.30  +2 -8  jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.c
  
  Index: jk_msg_buff.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- jk_msg_buff.c 21 Apr 2005 12:04:18 -  1.29
  +++ jk_msg_buff.c 21 Apr 2005 12:14:21 -  1.30
  @@ -314,13 +314,7 @@
   
   if (l == NULL)
   return;
  -if (level == JK_LOG_DEBUG_LEVEL) {
  -len = 0;
  -if (l->level == JK_LOG_TRACE_LEVEL)
  -len = msg->len;
  -}
  -
  -if (len > 1024)
  +if (l->level != JK_LOG_TRACE_LEVEL && len > 1024)
   len = 1024;
   
   jk_log(l, file, line, funcname, level,
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c jk_msg_buff.c jk_msg_buff.h

2005-04-21 Thread mturk
mturk   2005/04/21 05:04:18

  Modified:jk/native/common jk_ajp_common.c jk_msg_buff.c jk_msg_buff.h
  Log:
  Make jk_msg_buf_t structure public to skip the need for calling functions
  for accessing structure elements.
  
  Revision  ChangesPath
  1.101 +16 -16
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- jk_ajp_common.c   21 Apr 2005 11:51:06 -  1.100
  +++ jk_ajp_common.c   21 Apr 2005 12:04:18 -  1.101
  @@ -621,7 +621,7 @@
   if (d->header_names && d->header_values) {
   unsigned i;
   for (i = 0; i < d->num_headers; i++) {
  -unsigned short name = jk_b_pget_int(msg, jk_b_get_pos(msg));
  +unsigned short name = jk_b_pget_int(msg, msg->pos);
   
   if ((name & 0XFF00) == 0XA000) {
   jk_b_get_int(msg);
  @@ -910,9 +910,9 @@
   return JK_FATAL_ERROR;
   }
   
  -if ((rc = jk_tcp_socket_sendfull(ae->sd, jk_b_get_buff(msg),
  - jk_b_get_len(msg))) > 0) {
  -ae->endpoint.wr += jk_b_get_len(msg);
  +if ((rc = jk_tcp_socket_sendfull(ae->sd, msg->buf,
  + msg->len)) > 0) {
  +ae->endpoint.wr += msg->len;
   JK_TRACE_EXIT(l);
   return JK_TRUE;
   }
  @@ -997,19 +997,19 @@
   msglen = ((head[2] & 0xff) << 8);
   msglen += (head[3] & 0xFF);
   
  -if (msglen > jk_b_get_size(msg)) {
  +if (msglen > msg->maxlen) {
   jk_log(l, JK_LOG_ERROR,
  "wrong message size %d %d from %s",
  -   msglen, jk_b_get_size(msg),
  +   msglen, msg->maxlen,
  jk_dump_hinfo(&ae->worker->worker_inet_addr, buf));
   JK_TRACE_EXIT(l);
   return JK_FALSE;
   }
   
  -jk_b_set_len(msg, msglen);
  -jk_b_set_pos(msg, 0);
  +msg->len = msglen;
  +msg->pos = 0;
   
  -rc = jk_tcp_socket_recvfull(ae->sd, jk_b_get_buff(msg), msglen);
  +rc = jk_tcp_socket_recvfull(ae->sd, msg->buf, msglen);
   if (rc < 0) {
   jk_log(l, JK_LOG_ERROR,
  "ERROR: can't receive the response message from tomcat, "
  @@ -1089,7 +1089,7 @@
 jk_ws_service_t *r,
 jk_msg_buf_t *msg, int len, jk_logger_t *l)
   {
  -unsigned char *read_buf = jk_b_get_buff(msg);
  +unsigned char *read_buf = msg->buf;
   
   JK_TRACE_ENTER(l);
   jk_b_reset(msg);
  @@ -1125,7 +1125,7 @@
   }
   }
   
  -jk_b_set_len(msg, jk_b_get_len(msg) + len);
  +msg->len += len;
   
   JK_TRACE_EXIT(l);
   return len;
  @@ -1241,7 +1241,7 @@
   if (JK_IS_DEBUG_LEVEL(l))
   jk_log(l, JK_LOG_DEBUG,
  "request body to send %d - request body to resend %d",
  -   ae->left_bytes_to_send, jk_b_get_len(op->reply) - 
AJP_HEADER_LEN);
  +   ae->left_bytes_to_send, op->reply->len - AJP_HEADER_LEN);
   
   /*
* POST recovery job is done here and will work when data to 
  @@ -1252,7 +1252,7 @@
   
   /* Did we have something to resend (ie the op-post has been feeded 
previously */
   
  -postlen = jk_b_get_len(op->post);
  +postlen = op->post->len;
   if (postlen > AJP_HEADER_LEN) {
   if (ajp_connection_tcp_send_message(ae, op->post, l) != JK_TRUE) {
   jk_log(l, JK_LOG_ERROR, "Error resending request body (%d)",
  @@ -1268,7 +1268,7 @@
   }
   else if (s->reco_status == RECO_FILLED) {
   /* Recovery in LB MODE */
  -postlen = jk_b_get_len(s->reco_buf);
  +postlen = s->reco_buf->len;
   
   if (postlen > AJP_HEADER_LEN) {
   if (ajp_connection_tcp_send_message(ae, s->reco_buf, l) != 
JK_TRUE) {
  @@ -1361,7 +1361,7 @@
   case JK_AJP13_SEND_BODY_CHUNK:
   {
   unsigned len = (unsigned)jk_b_get_int(msg);
  -if (!r->write(r, jk_b_get_buff(msg) + jk_b_get_pos(msg), len)) {
  +if (!r->write(r, msg->buf + msg->pos, len)) {
   jk_log(l, JK_LOG_INFO,
  "Connection aborted or network problems");
   JK_TRACE_EXIT(l);
  
  
  
  1.29  +1 -41 jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.c
  
  Index: jk_msg_buff.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- jk_msg_buff.c 16 Feb 2005 11:42:46 -  1.28
  +++ jk_msg_buff.c 21 Apr 2005 12:04:18 -  1.29

cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp14.c

2005-04-21 Thread mturk
mturk   2005/04/21 05:04:02

  Modified:jk/native/common jk_ajp14.c
  Log:
  Make jk_msg_buf_t structure public to skip the need for calling functions
  for accessing structure elements.
  
  Revision  ChangesPath
  1.27  +3 -3  jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c
  
  Index: jk_ajp14.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- jk_ajp14.c6 Feb 2005 09:37:59 -   1.26
  +++ jk_ajp14.c21 Apr 2005 12:04:02 -  1.27
  @@ -337,7 +337,7 @@
   /*
* UNHANDLED MESSAGE SIZE
*/
  -if (jk_b_append_int(msg, (unsigned short)jk_b_get_len(unk))) {
  +if (jk_b_append_int(msg, (unsigned short)unk->len)) {
   JK_TRACE_EXIT(l);
   return JK_FALSE;
   }
  @@ -345,7 +345,7 @@
* UNHANDLED MESSAGE (Question : Did we have to send all the message or 
only part of)
*   (   ie: only 1k max 
   )
*/
  -if (jk_b_append_bytes(msg, jk_b_get_buff(unk), jk_b_get_len(unk))) {
  +if (jk_b_append_bytes(msg, unk->buf, unk->len)) {
   jk_log(l, JK_LOG_ERROR,
  "failed appending the UNHANDLED MESSAGE");
   JK_TRACE_EXIT(l);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c

2005-04-21 Thread mturk
mturk   2005/04/21 04:51:07

  Modified:jk/native/common jk_ajp_common.c
  Log:
  Close the socket only if the lock can be obtained.
  
  Revision  ChangesPath
  1.100 +5 -4  
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- jk_ajp_common.c   21 Apr 2005 11:41:06 -  1.99
  +++ jk_ajp_common.c   21 Apr 2005 11:51:06 -  1.100
  @@ -729,19 +729,20 @@
   JK_ENTER_CS(&aw->cs, rc);
   if (rc) {
   unsigned int i;
  -/* Close existing endpoint socket */
  +/* Mark existing endpoint socket as closed */
   ae->sd = -1;
   for (i = 0; i < aw->ep_cache_sz; i++) {
   /* Find cache slot with usable socket */
  -if (aw->ep_cache[i] && aw->ep_cache[i]->sd > 0) {
  +if (aw->ep_cache[i] && aw->ep_cache[i]->sd != -1) {
   ae->sd = aw->ep_cache[i]->sd;
  - aw->ep_cache[i]->sd = -1;
  +aw->ep_cache[i]->sd = -1;
   break;
   }
   }
   JK_LEAVE_CS(&aw->cs, rc);
  +/* Close previous socket */
  +jk_close_socket(sock);
   }
  -jk_close_socket(sock);
   }
   
   /*
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c

2005-04-21 Thread mturk
mturk   2005/04/21 04:41:06

  Modified:jk/native/common jk_ajp_common.c
  Log:
  Fix bug in check next connection loop, by resetting test value to 0
  for each socket.
  
  Revision  ChangesPath
  1.99  +3 -2  
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- jk_ajp_common.c   21 Apr 2005 11:36:29 -  1.98
  +++ jk_ajp_common.c   21 Apr 2005 11:41:06 -  1.99
  @@ -1148,7 +1148,7 @@
   ajp_endpoint_t * ae, ajp_operation_t * op)
   {
   int err = 0;
  -int postlen, rc = 0;
  +int postlen;
   
   JK_TRACE_ENTER(l);
   /* Up to now, we can recover */
  @@ -1158,6 +1158,7 @@
* First try to reuse open connections...
*/
   while ((ae->sd > 0)) {
  +int rc = 0;
   err = 0;
   if (ae->worker->socket_timeout) {
   if (!jk_is_socket_connected(ae->sd)) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c jk_connect.c jk_connect.h

2005-04-21 Thread mturk
mturk   2005/04/21 04:36:29

  Modified:jk/native/common jk_ajp_common.c jk_connect.c jk_connect.h
  Log:
  Remove unused timeout parameter for testing if socket is connected.
  
  Revision  ChangesPath
  1.98  +3 -3  
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- jk_ajp_common.c   21 Apr 2005 11:18:44 -  1.97
  +++ jk_ajp_common.c   21 Apr 2005 11:36:29 -  1.98
  @@ -847,7 +847,7 @@
   if (ae->worker->cache_timeout > 0 || ae->worker->recycle_timeout 
> 0)
   ae->last_access = time(NULL);
   if (ae->worker->socket_timeout > 0) {
  -if (!jk_is_socket_connected(ae->sd, 
ae->worker->socket_timeout)) {
  +if (!jk_is_socket_connected(ae->sd)) {
   jk_log(l, JK_LOG_INFO,
  "Socket is not connected any more (errno=%d)", 
errno);
   jk_close_socket(ae->sd);
  @@ -1160,7 +1160,7 @@
   while ((ae->sd > 0)) {
   err = 0;
   if (ae->worker->socket_timeout) {
  -if (!jk_is_socket_connected(ae->sd, ae->worker->socket_timeout)) 
{
  +if (!jk_is_socket_connected(ae->sd)) {
   jk_log(l, JK_LOG_INFO,
  "Socket is not connected any more (errno=%d)", errno);
   jk_close_socket(ae->sd);
  
  
  
  1.53  +2 -8  jakarta-tomcat-connectors/jk/native/common/jk_connect.c
  
  Index: jk_connect.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- jk_connect.c  13 Apr 2005 11:12:38 -  1.52
  +++ jk_connect.c  21 Apr 2005 11:36:29 -  1.53
  @@ -548,18 +548,12 @@
   return buf;
   }
   
  -int jk_is_socket_connected(int sd, int timeout)
  +int jk_is_socket_connected(int sd)
   {
   fd_set fd;
   struct timeval tv;
   int rc;
   
  -/* socket_timeout is unused in select implemention
  - * If we change this to non blocking read, then we
  - * will use the timeout parameter.
  - */
  - timeout = 0;
  - 
   FD_ZERO(&fd);
   FD_SET(sd, &fd);
   
  
  
  
  1.14  +2 -2  jakarta-tomcat-connectors/jk/native/common/jk_connect.h
  
  Index: jk_connect.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_connect.h  17 Feb 2005 07:09:27 -  1.13
  +++ jk_connect.h  21 Apr 2005 11:36:29 -  1.14
  @@ -51,7 +51,7 @@
   
   char *jk_dump_hinfo(struct sockaddr_in *saddr, char *buf);
   
  -int jk_is_socket_connected(int sd, int timeout);
  +int jk_is_socket_connected(int sd);
   
   #ifdef __cplusplus
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c jk_global.h jk_lb_worker.c

2005-04-21 Thread mturk
mturk   2005/04/21 04:18:44

  Modified:jk/native/common jk_ajp_common.c jk_global.h jk_lb_worker.c
  Log:
  Make sure the returned status codes are the same for ajp and lb
  workers.
  Status 503 if connection to tomcat fails.
  Status 502 is returned if tomcat faild in the middle of request.
  Status 400 is returned if client made faulty request
  Status 413 is returned if the headers are too large.
  Status 500 is returned in case of any other error.
  
  Revision  ChangesPath
  1.97  +7 -6  
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- jk_ajp_common.c   11 Apr 2005 06:51:36 -  1.96
  +++ jk_ajp_common.c   21 Apr 2005 11:18:44 -  1.97
  @@ -1605,12 +1605,12 @@
   
   JK_TRACE_ENTER(l);
   
  +if (is_error)
  +*is_error = JK_HTTP_SERVER_ERROR;
  +
   if (e && e->endpoint_private && s && is_error) {
   ajp_endpoint_t *p = e->endpoint_private;
   op->request = jk_b_new(&(p->pool));
  -/* Presume there will be no errors */
  -*is_error = JK_HTTP_OK;
  -
   jk_b_set_buffer_size(op->request, DEF_BUFFER_SZ);
   jk_b_reset(op->request);
   
  @@ -1674,6 +1674,7 @@
   
   err = ajp_get_reply(e, s, l, p, op);
   if (err == JK_TRUE) {
  +*is_error = JK_HTTP_OK;
   /* Done with the request */
   JK_TRACE_EXIT(l);
   return JK_TRUE;
  @@ -1686,7 +1687,7 @@
* operation is no more recoverable
*/
   if (!op->recoverable) {
  -*is_error = JK_HTTP_SERVER_ERROR;
  +*is_error = JK_HTTP_BAD_GATEWAY;
   jk_log(l, JK_LOG_ERROR,
  "receiving reply from tomcat failed "
  "without recovery in send loop %d", i);
  @@ -1728,7 +1729,7 @@
   /* Get another connection from the pool and try again */
   ajp_next_connection(p, l);
   }
  -
  +*is_error = JK_HTTP_SERVER_BUSY;
   /* Log the error only once per failed request. */
   jk_log(l, JK_LOG_ERROR,
  "Error connecting to tomcat. Tomcat is probably not started "
  
  
  
  1.47  +9 -6  jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- jk_global.h   26 Mar 2005 09:28:56 -  1.46
  +++ jk_global.h   21 Apr 2005 11:18:44 -  1.47
  @@ -174,11 +174,14 @@
   /* HTTP Error codes
*/
   
  -#define JK_HTTP_OK  200
  -#define JK_HTTP_BAD_REQUEST 400
  -#define JK_REQUEST_TOO_LARGE413
  -#define JK_HTTP_SERVER_ERROR500
  -#define JK_HTTP_SERVER_BUSY 503
  +#define JK_HTTP_OK   200
  +#define JK_HTTP_BAD_REQUEST  400
  +#define JK_REQUEST_TOO_LARGE 413
  +#define JK_HTTP_SERVER_ERROR 500
  +#define JK_HTTP_NOT_IMPLEMENTED  501
  +#define JK_HTTP_BAD_GATEWAY  502
  +#define JK_HTTP_SERVER_BUSY  503
  +#define JK_HTTP_GATEWAY_TIME_OUT 504
   
   
   /*
  
  
  
  1.77  +3 -3  jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c
  
  Index: jk_lb_worker.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- jk_lb_worker.c13 Apr 2005 12:40:03 -  1.76
  +++ jk_lb_worker.c21 Apr 2005 11:18:44 -  1.77
  @@ -668,7 +668,7 @@
   jk_log(l, JK_LOG_ERROR,
  "All tomcat instances failed, no more workers left");
   JK_TRACE_EXIT(l);
  -*is_error = JK_HTTP_SERVER_ERROR;
  +*is_error = JK_HTTP_SERVER_BUSY;
   return JK_FALSE;
   }
   --num_of_workers;
  @@ -677,7 +677,7 @@
   jk_log(l, JK_LOG_INFO,
  "All tomcat instances are busy or in error state");
   JK_TRACE_EXIT(l);
  -/* Set error to Server busy */
  +/* Set error to Timeout */
   *is_error = JK_HTTP_SERVER_BUSY;
   return JK_FALSE;
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_map.c jk_util.c jk_util.h

2005-04-21 Thread mturk
mturk   2005/04/21 03:36:58

  Modified:jk/native/common jk_map.c jk_util.c jk_util.h
  Log:
  Add is_unique property check, so that multiple unique directives override
  each other, instead making a list out of unique property values.
  Increase the read buffer size to 8K, that should be enough for all cases.
  
  Revision  ChangesPath
  1.35  +13 -18jakarta-tomcat-connectors/jk/native/common/jk_map.c
  
  Index: jk_map.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- jk_map.c  13 Apr 2005 12:02:08 -  1.34
  +++ jk_map.c  21 Apr 2005 10:36:58 -  1.35
  @@ -32,7 +32,7 @@
   #include "jk_shm.h"
   
   #define CAPACITY_INC_SIZE (50)
  -#define LENGTH_OF_LINE(1024)
  +#define LENGTH_OF_LINE(8192)
   
   #ifdef AS400
   #define CASE_MASK 0xbfbfbfbf
  @@ -233,7 +233,7 @@
   sprintf(buf, "%f", def);
   rc = jk_map_get_string(m, name, buf);
   
  -return atof(rc); 
  +return atof(rc);
   }
   
   int jk_map_get_bool(jk_map_t *m, const char *name, int def)
  @@ -242,7 +242,7 @@
   size_t len;
   const char *rc;
   int rv = 0;
  -
  +
   sprintf(buf, "%d", def);
   rc = jk_map_get_string(m, name, buf);
   
  @@ -280,7 +280,7 @@
   }
   
   /*
  - * GS, in addition to VG's patch, we now need to 
  + * GS, in addition to VG's patch, we now need to
* strtok also by a "*"
*/
   #if defined(AS400) || defined(_REENTRANT)
  @@ -355,7 +355,7 @@
   
   if (strlen(str) > LENGTH_OF_LINE)
   return JK_FALSE;
  -
  +
   strcpy(prp, str);
   if (trim(prp)) {
   char *v = strchr(prp, '=');
  @@ -367,22 +367,17 @@
   if (strlen(v) && strlen(prp)) {
   const char *oldv = jk_map_get_string(m, prp, NULL);
   v = jk_map_replace_properties(v, m);
  -if (oldv) {
  +if (oldv && jk_is_unique_property(prp) == JK_FALSE) {
   char *tmpv = jk_pool_alloc(&m->p,
  -strlen(v) +
  -strlen(oldv) + 3);
  +   strlen(v) + strlen(oldv) + 3);
   if (tmpv) {
   char sep = '*';
  -if (jk_is_path_poperty(prp)) {
  +if (jk_is_path_poperty(prp))
   sep = PATH_SEPERATOR;
  -}
  -else if (jk_is_cmd_line_poperty(prp)) {
  +else if (jk_is_cmd_line_poperty(prp))
   sep = ' ';
  -}
  -else if (!stricmp(prp, "worker.list")) {
  +else if (!stricmp(prp, "worker.list"))
   sep = ',';
  -}
  -
   sprintf(tmpv, "%s%c%s", oldv, sep, v);
   }
   v = tmpv;
  @@ -485,7 +480,7 @@
   static size_t trim(char *s)
   {
   size_t i;
  -
  +
   /* check for empty strings */
   if (!(i = strlen(s)))
   return 0;
  @@ -540,7 +535,7 @@
   
   /**
*  Replace $(property) in value.
  - * 
  + *
*/
   char *jk_map_replace_properties(const char *value, jk_map_t *m)
   {
  
  
  
  1.62  +90 -51jakarta-tomcat-connectors/jk/native/common/jk_util.c
  
  Index: jk_util.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- jk_util.c 22 Feb 2005 08:42:45 -  1.61
  +++ jk_util.c 21 Apr 2005 10:36:58 -  1.62
  @@ -42,7 +42,7 @@
   #define LIBPATH_OF_WORKER   ("ld_path")
   #define CMD_LINE_OF_WORKER  ("cmd_line")
   #define NATIVE_LIB_OF_WORKER("native_lib")
  -#define PREFIX_OF_WORKER("worker")
  +#define PREFIX_OF_WORKER"worker"
   #define HOST_OF_WORKER  ("host")
   #define PORT_OF_WORKER  ("port")
   #define TYPE_OF_WORKER  ("type")
  @@ -88,8 +88,8 @@
   #define HUGE_BUFFER_SIZE (8*1024)
   #define LOG_LINE_SIZE(1024)
   
  -/* 
  - * define the log format, we're using by default the one from error.log 
  +/*
  + * define the log format, we're using by default the one from error.log
*
* [Mon Mar 26 19:44:48 2001] [jk_uri_worker_map.c (155)]: Into 
jk_uri_worker_map_t::uri_worker_map_alloc
* log format used by apache in error.log
  @@ -293,10 +293,10 @@
   #endif
   set_time_str(buf, HUGE_BUFFER_SIZE);
   used = strlen(buf);
  -
  +
   /* Log [pid:threadid] for debug and trace levels */
   if (l->le

Re: bugs 34140 and 34199

2005-04-21 Thread Henri Gomez
Many way :

- check the AJP port is listening on the right port.

- Add a 'status' file in AJP support created after AJP is completly up
and destroyed when AJP is closing.

BTW, it will be better to have such file created when Tomcat is fully
started (independant from AJP which could be disactivated by conf) and
destroyed just before Tomcat stop. And if you could get the initial
process/job id and pass it to tomcat, it could fill this fill with
such jobid.

2005/4/21, jean-frederic clere <[EMAIL PROTECTED]>:
> Hi,
> 
> Those 2 are reported against Daemon, but the user is looking for a "safe" way 
> to
> know that Tomcat is completly up (AJP connector ready) or completly down. In
> jsvc the completly down case is easy: the JVM has exited.
> 
> Any hints for the completly up case?
> 
> Cheers
> 
> Jean-frederic
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



bugs 34140 and 34199

2005-04-21 Thread jean-frederic clere
Hi,
Those 2 are reported against Daemon, but the user is looking for a "safe" way to 
know that Tomcat is completly up (AJP connector ready) or completly down. In 
jsvc the completly down case is easy: the JVM has exited.

Any hints for the completly up case?
Cheers
Jean-frederic
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[EMAIL PROTECTED]: Project jakarta-tomcat-jk-native (in module jakarta-tomcat-connectors) failed

2005-04-21 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project jakarta-tomcat-jk-native has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 107 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- jakarta-tomcat-jk-native :  Connectors to various web servers


Full details are available at:

http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason build failed



The following work was performed:
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/gump_work/build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native.html
Work Name: build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native (Type: 
Build)
Work ended in a state of : Failed
Elapsed: 
Command Line: make 
[Working Directory: 
/usr/local/gump/public/workspace/jakarta-tomcat-connectors/jk/native]
-
Making all in common
make[1]: Entering directory 
`/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common'
/bin/sh 
/usr/local/gump/public/workspace/apache-httpd/dest-21042005/build/libtool 
--silent --mode=compile gcc 
-I/usr/local/gump/public/workspace/apache-httpd/dest-21042005/include -g -O2 -g 
-O2 -pthread -DHAVE_APR  
-I/usr/local/gump/public/workspace/apr/dest-21042005/include/apr-1 -g -O2 
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE 
-I/home/gump/workspaces2/public/workspace/apache-httpd/srclib/pcre -I 
/opt/jdk1.4/include -I /opt/jdk1.4/include/ -c jk_ajp12_worker.c 
/usr/local/gump/public/workspace/apache-httpd/dest-21042005/build/libtool: 
/usr/local/gump/public/workspace/apache-httpd/dest-21042005/build/libtool: No 
such file or directory
make[1]: *** [jk_ajp12_worker.lo] Error 127
make[1]: Leaving directory 
`/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common'
make: *** [all-recursive] Error 1
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/rss.xml
- Atom: 
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.2.
Gump Run 2321042005, brutus:brutus-public:2321042005
Gump E-mail Identifier (unique within run) #17.

--
Apache Gump
http://gump.apache.org/ [Instance: brutus]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34549] - isUserInRole() on non-secure pages

2005-04-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34549





--- Additional Comments From [EMAIL PROTECTED]  2005-04-21 09:13 ---
Exactly!
I checked it in Tomcat 5.5.4, Tomcat 5.5.9, Tomcat embedded into JBoss server.
Checked with Internet Explorer and Firefox - all the same.
I'm on the stage of decicion whether to use J2EE security in my web app, or
develop by ourself and actually, this issue is the only thing that keeps me from
using J2EE security...
Try to check it, it's very easy to reproduce.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]