Tomcat Startup : Tomcat as a Service

2010-08-12 Thread Richard da Silva
I installed Tomcat 6.1 on my machine. 

During the installation, I was not asked to choose whether or not I want it 
installed as a "Service" or whatever. 

I want to configure Tomcat to start automatically whenever Windows starts. To 
do this, naturally, Tomcat needs to be installed as a Service.

Is there any way to "convert" an already-existing Tomcat application into a 
"Service"? 

Or, do I need to erase it, and install it again?

And, even if I did that, exactly how could I ensure that it is installed as a 
Service?


Thanks


Richard da Silva


  

newbie question re mod_jk

2010-08-12 Thread Matthew Fleming
Working now. Thanks again for all your advice. The original recommendations
were all that was necessary (plus I had two apache Includes in the wrong
order, and there was a little matter of a typo...) Thanks so much for all
your help.

Matthew Fleming


Re: newbie question re mod_jk

2010-08-12 Thread André Warnier

Matthew Fleming wrote:

I appreciate all the suggestions and have implemented them all, but its
still not working. Any other suggestions?


Yes. Define what "not working" means, like :

- describe your configuration, shortly
- what are you doing ?
- what do you expect to happen ?
- what happens instead ?
- what is in the logfiles ?

It is 2:00 AM here and I am a bit grouchy, but it is so much easier to answer you quickly 
when you provide these details, than having to pry them out of you.

And you will be the first one to benefit from it.
;-)


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



newbie question re mod_jk

2010-08-12 Thread Matthew Fleming
I appreciate all the suggestions and have implemented them all, but its
still not working. Any other suggestions?

Matthew Fleming


RE: Apache Tomcat Native library question

2010-08-12 Thread Caldarale, Charles R
> From: Tom Jones [mailto:tjo...@acworld.com]
> Subject: Apache Tomcat Native library question
> 
> I have found some articles on how to compile the 
> native library 

Read the doc first:
http://tomcat.apache.org/tomcat-6.0-doc/apr.html

And of course take a look at the APR and OpenSSL pages:
http://apr.apache.org/
http://www.openssl.org/

> I'm still a little fuzzy on is it necessary?

No - which is why the message is INFO.  Using it will improve performance for 
HTTPS traffic.

> I was also hoping to find out if it can be compiled as
> a binary that can be distributed so that I dont have to
> put the Developer tools on my production servers?

No technical issues, but you'll have to read the licenses and decide for 
yourself if it's legal in your situation.  (It normally is.)

 - 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: JreMemoryLeakPreventionListener and hourly Full GC

2010-08-12 Thread Donald Armstrong
Thank you Konstantin and Chris for your attention.

As stated in the initial post:
'We have recently deployed tomcat-6.0.28 in our organization and are
noticing every hour, a Full GC is occurring.  The same application,
same JVM, same JVM args, just a new tomcat release.'

Using the default JreMemoryLeakPreventionListener configuration that
has 'gcDaemonProtection=true'  will result in 1hr FullGCs using Sun
1.6 b18, b20 and b21on Solaris and Windows. We've tested and
successfully 'contained' the FullGC behavior using one of the below
configurations:

1) suppress the FullGC using JVM arg -XX:+DisableExplicitGC

2) keep the FullGC but to defer to the CMS collector using JVM arg
-XX:+ExplicitGCInvokesConcurrent

3) 

4) Disable the listener altogether


We've decided to go with option 3.

Thanks,
Donnie


On Thu, Aug 12, 2010 at 9:15 AM, Christopher Schultz
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Konstantin,
>
> On 8/12/2010 7:48 AM, Konstantin Kolinko wrote:
>> It looks that with your version of JRE and with your setting it is
>> better to run with gcDaemonProtection="false".  I certainly do not
>> know how other JRE versions behave here. (Feedback is welcomed).
>
> That's what he's got, now: gcDaemonProtection="false" (see the OP), but
> the GC is still happening.
>
> Donald, the reason the JreMemoryLeakPreventionListener makes the call to
> GC.requestLatency is to un-do the effect of some other component (RMI,
> it seems).
>
> It's possible that some component other than the
> JreMemoryLeakPreventionListener is causing the periodic full GC.
>
> Try disabling the listener altogether and see if the GCs go away.
>
> If they don't, consider recompiling the JreMemoryLeakPreventionListener
> with some debugging code in there (the current code does not emit any
> logging unless there is a problem calling GC.requestLatency... it does
> not announce it's intention of doing so, even at a TRACE level).
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxkAfAACgkQ9CaO5/Lv0PBgjACgkeQyW4H949HJ/k+28hjKR3JH
> 9tsAoLIxzWfypWAhR9PzC4IQpGFF0Kwy
> =5GDP
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: Need confirmation of issue: HTTP simple requests broken as of Apache Tomcat 5.5.28.

2010-08-12 Thread Pid
On 11/08/2010 14:38, Nick Langlois wrote:
> Hi,
>I need confirmation of an issue I've encountered while upgrading from
> Apache Tomcat 5.5.25 to 5.5.29 running in Java 1.5.0_22 on Solaris 10u8.
> Unfortunately, I'm going about this backwards as I've already created a bug
> report.  The tomcat site, however, recommends that confirmation should be
> received as to whether a suspected bug is a bug or not on the tomcat user
> mailing list.
> 
> Issue found in: Apache Tomcat 5.5.29
> Issue introduced in: Apache Tomcat 5.5.28
> 
> 
> Issue:
> 
> Get "HTTP/1.1 400 Bad Request" response back when Tomcat receives an HTTP
> simple request (no HTTP version specified in request line).
> 
> 
> Expected behaviour:
> 
> According to its documentation, tomcat 5.5.x's HTTP connector is compliant
> with the HTTP/1.1 RFC, and will seamlessly transition to HTTP/1.0 if an
> HTTP/1.0 request is received.  For backwards compatibility (I assume), the
> HTTP 1.0 RFC handles HTTP 0.9 requests for older clients, referring to these
> requests as "simple requests" in the RFC.  Thus, according to the RFC,
> tomcat should respond with a "simple response" should it receive a "simple
> request".
> 
> 
> Example of expected behaviour:
> 
> wcars1u7-unit1# telnet localhost 
> Trying 127.0.0.1...
> Connected to localhost.
> Escape charac= ter is '^]'.
> GET /index.html
> 
> 
> 
> 
> Zack Networks Application Server
> 
> BODY {margin: 64px;
> background: #ff;
> cursor: default;}
> H1, H2, H3, H4, H5, H6
> {font-family: Zack-Networks-Primary, Arial-Bold, Arial,
> Helvetica, Sans-Serif;
> color: #003399;}
> 
> 
> 
> 
> No application is available at this URL. Please see the product
> documentation for the correct URL.
> 
> 
> Connection to localhost closed by foreign host.
> wcars1u7-unit1#
> 
> 
> Behaviour I'm seeing:
> 
> wcars1u7-unit1# telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET /index.html
> HTTP/1.1 400 Bad Request
> Server: Apache-Coyote/1.1
> Transfer-Encoding: chunked
> Date: Tue, 10 Aug 2010 18:32:36 GMT
> Connection: close
> 
> 0
> 
> Connection to localhost closed by foreign host.
> wcars1u7-unit1#
> 
> 
> With debug enabled, tomcat logs the following thrown exception:
> 
> 2010-07-29 15:49:22,068 [http-8080-Processor24] DEBUG
> 
> org.apache.coyote.http11.Http11Processor - Error parsing HTTP request header
> 
> java.lang.IllegalArgumentException: Invalid character (CR or LF) found
> in method name
>  at 
> org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:474)
>  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
> 
>  at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>  at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>  at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> 
>  at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>  at java.lang.Thread.run(Thread.java:595)
> 
> Further information can be found in the bug report:
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=3D49718
> 
> Can someone please confirm this issue?
> Is it possible to get some indication as to if, when, and in what version
> this issue will be fixed in the Tomcat 5.5.x release?

I'm guessing that no-ones replying, because there's no known issue here.

Are you sure the issue isn't a result of the means of making the test
request?


p



signature.asc
Description: OpenPGP digital signature


Apache Tomcat Native library question

2010-08-12 Thread Tom Jones
Hello,
I'm running Tomcat 6.0.26 on Mac OS X Server 10.5.8 and I always get the "Info" 
message ...

"INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java"

I have found some articles on how to compile the native library but I'm still a 
little fuzzy on is it necessary? Can anyone please speak to the worth of the 
Tomcat native library and should I do it? I was also hoping to find out if it 
can be compiled as a binary that can be distributed so that I dont have to put 
the Developer tools on my production servers?

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



Re: excluding some path from tomcat

2010-08-12 Thread Rainer Jung

On 12.08.2010 20:21, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Angelo,

On 8/12/2010 9:59 AM, Angelo Chen wrote:

I use Apache web server 2.2 in front of tomcat, it works well with Apache's
default proxy module, however, I can't exclude some path from it:

ProxyPass /  http://localhost:8080/
ProxyPass /static !
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on


This is one of the reasons I have decided to stick with mod_jk instead
of mod_proxy_http or mod_proxy_ajp: I couldn't figure out how to map
different sub-URIs to different places.

What happens if you do this:

ProxyPass /static !
ProxyPass /  http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on

(I have only reversed the order of the ProxyPass directives).

If mod_proxy processes rules in order until one matches, it may be that
"ProxyPass /" is taking over without ever checking the "/static" rule
you have there.


Bonus point!

Rainer

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



Re: excluding some path from tomcat

2010-08-12 Thread Rainer Jung

On 12.08.2010 15:59, Angelo Chen wrote:


Hi,

I use Apache web server 2.2 in front of tomcat, it works well with Apache's
default proxy module, however, I can't exclude some path from it:

ProxyPass /  http://localhost:8080/
ProxyPass /static !
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on


example.com/static still goes to my tomcat app, any idea? thanks,


Citing Apache docs [1]:

"Order is important: exclusions must come before the general ProxyPass 
directive."


The directives are checked against the request in the order given. The 
first match wins.


Regards,

Rainer

[1] http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

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



Re: Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread Rainer Jung

On 12.08.2010 10:45, HANDE CANORUÇ wrote:

I am using mod jk in order to connect tomcat and glassfish 3.1. In the
mod_jk log file I am getting these errors;

  [info]  ajp_send_request::jk_ajp_common.c (1178): Socket 24 is not
connected any more (errno=-1)
[info]  ajp_send_request::jk_ajp_common.c (1202): Error sending request.
Will try another pooled connection
  [info]  ajp_send_request::jk_ajp_common.c (1225): All endpoints are
disconnected or dead
  [info]  ajp_service::jk_ajp_common.c (1749): Sending request to tomcat
failed,  recoverable operation attempt=1



and in the server log file I am getting ;

SEVERE|glassfish3.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=17;_ThreadName=Thread-1;|threadpool.busy|#]

Any suggestions??


First get yourself the recent mod_jk version (1.2.30). Version 2.15 does 
not exist. If you wanted to say version 1.2.15, that's pretty outdated.


Then second grab the example config from the 1.2.30 source download as a 
starter.


Finally: for recent versions of mod_jk there's nothing to worry as long 
as you only get "info" level log messages in the mod_jk log file. As 
soon as there are warnings or errors, the additional info log lines can 
be helpful to fully understand the problem. Inf alone without 
accompanying warnings or errors are harmless.


Regards,

Rainer

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



Re: Tomcat JAAS Authentication NullPointerException

2010-08-12 Thread mjmatch

I resolved the issue.  I had a bad equals function in my RolePrincipal object
that caused the null pointer exception.


mjmatch wrote:
> 
> I have configured Tomcat to do JAAS authentication using a custom
> login/error page.  I am getting a nullponterexception as defined below. 
> Log messages indicate that my JAAS authentication module is invoked and
> returning 'true' from the auth module ::commit function.  I have defined
> my own User and Role principle and specified in server.xml file.  Any
> suggestions on how to debug the NPE that isn't in my code?  I'm not sure
> what to look at next...  Thanks.
> --Marco
> 
> Exception
> ===
> INFO: Server startup in 9775 ms
> Aug 11, 2010 4:52:12 PM org.apache.catalina.connector.CoyoteAdapter
> service
> SEVERE: An exception or error occurred in the container during the request
> processing
> java.lang.NullPointerException
> at java.util.Arrays.binarySearch0(Arrays.java:2001)
> at java.util.Arrays.binarySearch(Arrays.java:1943)
> at
> org.apache.catalina.realm.GenericPrincipal.hasRole(GenericPrincipal.java:211)
> at org.apache.catalina.realm.RealmBase.hasRole(RealmBase.java:872)
> at
> org.apache.catalina.realm.RealmBase.hasResourcePermission(RealmBase.java:795)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:545)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> at java.lang.Thread.run(Thread.java:619)
> 
> Realm Definition
> ==
>   appName="mikros"
>  userClassNames="mikros.UserPrincipal"
>  roleClassNames="mikros.RolePrincipal" />
> 
> JAAS Login Module
> ===
> public class Authenticator implements LoginModule {
> private static Logger log = Logger.getLogger(Authenticator.class);
> 
> String loginName;
> CallbackHandler handler;
> Subject subject;
> Map sharedState; 
> Map options;
> 
> 
> private boolean loginPassed = false;
> 
> public Authenticator() {
> 
> }
> 
> @Override
> public boolean abort() throws LoginException {
> // TODO Auto-generated method stub
> return false;
> }
> 
> @Override
> public boolean commit() throws LoginException {
> try {
> UserPrincipal user = new UserPrincipal(loginName);
>   RolePrincipal role = new RolePrincipal("admin");
>
>   subject.getPrincipals().add(user);
>   subject.getPrincipals().add(role);
>   log.debug("Added user and role principals.");
> } catch (Exception e) {
> throw new LoginException(e.getMessage());
>   }
> 
> return true;
> }
> 
> @Override
> public void initialize(Subject subject, 
>CallbackHandler callbackHandler,
>Map sharedState, 
>Map options) {
> this.subject = subject;
> this.handler = callbackHandler;
> this.sharedState = sharedState;
> this.options = options;
> 
> }
> 
> @Override
> public boolean login() throws LoginException {
> log.debug("::login");
> 
> String name = "";
> String pass = "";
> 
> Context env = null;
> boolean passed = false;
> Callback[] callbacks = new Callback[2];
> 
> callbacks[0] = new NameCallback("Username:");
> callbacks[1] = new PasswordCallback("Password:", false);
> 
> try {
> handler.handle(callbacks);
> 
> NameCallback nameCallback = (NameCallback) callbacks[0];
> name = nameCallback.getName();
> PasswordCallback passwordCallback = (PasswordCallback)
> callbacks[1];
> pass = new String(passwordCallback.getPassword());
> 
> log.debug("log in name:" + name + "  password:" + pass);
> 
> if (name.equals("foo") &&
> pass.equals("bar")) {
> loginPassed = true;
> loginName = name;
> log.debug("login passed.");
> } else {
> loginPassed = false;
> log.debug("login failed.");
> }
> 
> return loginPassed;
> }
> catch (E

RE: Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: Socket 24 is not connected any more (errno=-1)
> 
> - in his original communication, Hande said :
> "I am using mod jk in order to connect tomcat and glassfish 3.1."

A statement which is simply not believable, so you have every right to be 
confused.  You can certainly use mod_jk to connect httpd and GlassFish (or 
httpd and Tomcat), but I can't find any means of using mod_jk to let GlassFish 
and Tomcat (both of which are pure Java) communicate with each other via the 
native-code mod_jk lump.

 - 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: newbie question re mod_jk

2010-08-12 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matthew,

On 8/12/2010 10:42 AM, Matthew Fleming wrote:

I'm a newbie with tomcat trying to get a basic mod_jk configuration working.
I have a mod_jk.conf file containing
JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13

I'm not getting any errors in the file specified as JkLogFile, and netstat
-l shows a listening socket at port 8009.

I can load my servlet from http://localhost:8080/Client_Access, but I can't
load it from http://localhost/Client_Access
so mod_jk isn't working. What could it be?


mod_jk doesn't read a file called mod_jk.conf, so you've got to be
including it in your httpd.conf, somewhere. Can you check your
configuration to find out where it's being loaded?

It's possible that your JkMount directives are being processed at the
"top" level of the configuration and then are not being made visible in
your VirtualHost.

I recommend a few changes to your configuration:


PS, here is my whole mod_jk.conf file:

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /home/mfleming/apache-tomcat-6.0.29/conf/workers.properties
JkLogFile /var/log/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"


Leave all of the above in mod_jk.conf


JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13


Move these two lines into your httpd.conf file inside the VirtualHost
that responds to http://localhost/ requests.


worker.ajp13.cachesize=10


As the logs state, this setting is deprecated. Check the mod_jk
documentation for its replacement. You can find that documentation here:
http://tomcat.apache.org/connectors-doc/reference/workers.html

Just search for "cachesize". Read that section carefully: you might want
to eliminate that option entirely from your configuration.


Furthermore, I would remove all the following lines :

worker.ajp13.lbfactor=50
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300

and leave only these :

worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009

Also, relative to the last line :
worker.ajp13.port=8009

check in your tomcat's server.xml file that you do have an uncommented  tag 
like this one :




This is, at the tomcat level, the connector that responds to your worker.ajp.port, so the 
port number must match.



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



Re: Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread André Warnier

HANDE CANORUÇ wrote:

My question is about mod jk, not for the glassfish. I receive the errors
from mod jk log file. Therefore , I think that my problem is about mod jk.
What do you think about errors?

2010/8/12 Christopher Schultz 


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 8/12/2010 7:49 AM, André Warnier wrote:

It is not very clear by your communication below what glassfish has to
do with this, and what you are connecting to what.

NB: Glassfish is a Tomcat derivative. Technically speaking, this issue
probably ought to be brought-up to the Glassfish community, but we
should be just as good for all but the most highly technical details.

Also, this is the place for mod_jk questions regardless of the servlet
container.


And sorry if I ask, but what is glassfish 3.1 ?
(shows how ignorant I am, I know, but hey this is the tomcat users list)

Hmm... no lmwptfy.com. Oh, well:

http://en.wikipedia.org/wiki/GlassFish

;)


Yes, but :
- in his original communication, Hande said :
"I am using mod jk in order to connect tomcat and glassfish 3.1. In the
mod_jk log file I am getting these errors;"
- and then later he said :
"Should I make configuration in httpd file or workers.properties? And what
configuration?"
- and then later he said :
"Sun glassfish 3.1 is an open source application server.
https://glassfish.dev.java.net/

2.15 version of mod jk is used. With my application  sun glassfish 3.0 and
mod jk 2.15 works properly.However when I try to migrate 3.1 , I have
following errors in the mod_jk log file.
"

Since 2.15 is not any version that would apply to the mod_jk we all know and love, and 
since Hande only talked about connecting tomcat and glassfish, I was a bit confused.
And I still am, because I still do not know what is connected to what with which mod_jk 
version, nor what is the difference between glassfish 3.0 (where apparently "it" works) 
and glassfish 3.1 (where "it" doesn't).


I am all for helping if I can, but this is a bit out of scope, isn't it ?





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



Re: Tomcat 5.5.23 request.getAttribute("foo") returns unexpected NULL

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



On 8/12/2010 9:25 AM, Thomas Treitlinger wrote:
> Hello,
> 
> I have a number of JSP pages which use the JSTL core library to set a
> request attribute like this:
> FOO-VALUE
> 
> The JSPs then forward to a Servlet like this:
> 
> 
> The Servlet later invokes
> String s = (String) request.getAttribute("foo")
> 
> At this point I would expect s to be "FOO-VALUE". However after
> running without any problem for days, request.getAttribute("foo")
> suddenly starts returning NULL, causing NullPointerExceptions later
> on.

Weird. I observe the opposite effect:

- ---
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
FOO-VALUE

  Using JSTL: 


  Direct-to-request using JSTL: 


  Using direct request fetch <%= request.getAttribute("foo") %>

- 

The above emits the following for me:

- ---
Using JSTL: ${foo}

Direct-to-request using JSTL: ${requestScope.foo}

Using direct request fetch FOO-VALUE
- ---

Can you get the JSTL to print your values using ?

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

iEYEARECAAYFAkxkQx8ACgkQ9CaO5/Lv0PDmUACgmxXg1ELeXAS3gH4L75YyQ2tP
u6cAn1ctYpbe6cAnfB3pIe7lry90b6Hm
=54lm
-END PGP SIGNATURE-

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



Re: Tomcat JAAS Authentication

2010-08-12 Thread mjmatch

I am using tomcat V6.0.29.


Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Marco,
> 
> On 8/12/2010 11:31 AM, mjmatch wrote:
>> I have configured Tomcat to do JAAS authentication using a custom
>> login/error
>> page.  I am getting a nullponterexception as defined below.
> 
> What exact Tomcat version are you using?
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkxkOCoACgkQ9CaO5/Lv0PCrtACfWfzigdrwrOsAqsObEsjHiYY3
> OXUAoK1CPUb9WDH9U9lSPGhppz842QRT
> =upiH
> -END PGP SIGNATURE-
> 
> -
> 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://old.nabble.com/Tomcat-JAAS-Authentication-NullPointerException-tp29420005p29421748.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: excluding some path from tomcat

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

Angelo,

On 8/12/2010 9:59 AM, Angelo Chen wrote:
> I use Apache web server 2.2 in front of tomcat, it works well with Apache's
> default proxy module, however, I can't exclude some path from it:
> 
> ProxyPass /  http://localhost:8080/
> ProxyPass /static !
> ProxyPassReverse / http://localhost:8080/
> ProxyPreserveHost on

This is one of the reasons I have decided to stick with mod_jk instead
of mod_proxy_http or mod_proxy_ajp: I couldn't figure out how to map
different sub-URIs to different places.

What happens if you do this:

ProxyPass /static !
ProxyPass /  http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on

(I have only reversed the order of the ProxyPass directives).

If mod_proxy processes rules in order until one matches, it may be that
"ProxyPass /" is taking over without ever checking the "/static" rule
you have there.

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

iEYEARECAAYFAkxkO5cACgkQ9CaO5/Lv0PBHyACeMnvFJaGcSTYcniQ+IBiRspu+
v9IAn3/33WitRR0WohzdTA1cg51aMTcr
=N2po
-END PGP SIGNATURE-

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



Re: truststoreFile vs javax.net.ssl.trustStore

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

Estani,

On 8/12/2010 3:47 AM, Estanislao Gonzalez wrote:
> If I set both trustoreFile and javax.net.ssl.trustStore which one is
> being honored? The documentation is not clear to me:

> "The trust store file to use to validate client certificates. The
> default is the value of the |javax.net.ssl.trustStore| system property.
> If neither this attribute nor the default system property is set, no
> trust store will be configured."
> 
> "The default" as in "if nothing else is found" or "if set"?

I think this might be a language problem. I believe the code would look
something like this, which might be easier to understand:

String trustStoreFile = connector.getTrustStoreFile();

if(null == trustStoreFile)
  trustStoreFile = System.getProperty("javax.net.ssl.trustStore");


if(null != trustStoreFile)
{
   // Use the trustStoreFile
}
else
{
   // No trustStoreFile
}

> I have a truststoreFile set (which is read), but the validation is made
> against java own jssecacerts or cacerts files, the one from the
> truststoreFile is only used if explicitly mentioned in
> javax.net.ssl.trustStore, no matter what.

Please post your configuration, and a "keystore -list" for the
truststore you are trying to use.

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

iEYEARECAAYFAkxkOu8ACgkQ9CaO5/Lv0PBMSQCdGk4NYk2tVD8S28DDT4T6RLXe
ChoAmQHy9ZDi5gA9CBAX3ng5r/+D2RU1
=N1Y0
-END PGP SIGNATURE-

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



Re: newbie question re mod_jk

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

Matthew,

On 8/12/2010 10:42 AM, Matthew Fleming wrote:
> I'm a newbie with tomcat trying to get a basic mod_jk configuration working.
> I have a mod_jk.conf file containing
> JkMount /Client_Access ajp13
> JkMount /Client_Access/* ajp13
> 
> I'm not getting any errors in the file specified as JkLogFile, and netstat
> -l shows a listening socket at port 8009.
> 
> I can load my servlet from http://localhost:8080/Client_Access, but I can't
> load it from http://localhost/Client_Access
> so mod_jk isn't working. What could it be?

mod_jk doesn't read a file called mod_jk.conf, so you've got to be
including it in your httpd.conf, somewhere. Can you check your
configuration to find out where it's being loaded?

It's possible that your JkMount directives are being processed at the
"top" level of the configuration and then are not being made visible in
your VirtualHost.

I recommend a few changes to your configuration:

> PS, here is my whole mod_jk.conf file:
> 
> LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
> JkWorkersFile /home/mfleming/apache-tomcat-6.0.29/conf/workers.properties
> JkLogFile /var/log/mod_jk.log
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"

Leave all of the above in mod_jk.conf

> JkMount /Client_Access ajp13
> JkMount /Client_Access/* ajp13

Move these two lines into your httpd.conf file inside the VirtualHost
that responds to http://localhost/ requests.

> worker.ajp13.cachesize=10

As the logs state, this setting is deprecated. Check the mod_jk
documentation for its replacement. You can find that documentation here:
http://tomcat.apache.org/connectors-doc/reference/workers.html

Just search for "cachesize". Read that section carefully: you might want
to eliminate that option entirely from your configuration.

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

iEYEARECAAYFAkxkOX0ACgkQ9CaO5/Lv0PB0DQCeKDpUeXCJ8dZv4DxO7boCjJxg
wvsAoIRbApJGsFURM5eEqfxgAErz7tHT
=/lzP
-END PGP SIGNATURE-

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



Re: Tomcat JAAS Authentication

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

Marco,

On 8/12/2010 11:31 AM, mjmatch wrote:
> I have configured Tomcat to do JAAS authentication using a custom login/error
> page.  I am getting a nullponterexception as defined below.

What exact Tomcat version are you using?

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

iEYEARECAAYFAkxkOCoACgkQ9CaO5/Lv0PCrtACfWfzigdrwrOsAqsObEsjHiYY3
OXUAoK1CPUb9WDH9U9lSPGhppz842QRT
=upiH
-END PGP SIGNATURE-

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



Re: role of the various threads?

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

Paul,

On 8/12/2010 11:34 AM, paul womack wrote:
> Caldarale, Charles R wrote:
>>> From: paul womack [mailto:pwom...@papermule.co.uk]
>>> Subject: Re: role of the various threads?
>>>
>>> Further reading has shown me that I'm using Tomcat5.5,
>>> and that the theads (above) are all running accept().
>>>
>>> I thought accept() was blocking?
>>
>> Depends on the particular JRE being used on the particular platform. 
>> I would expect them to be blocking in most instances, but some
>> esoteric systems use polling.  You're getting down to a level that
>> requires examination of not just Tomcat source code, but also JRE
>> source and the platform's TCP/IP stack source - a bit beyond the
>> normal scope of a support forum.
> 
> It appears that hprof is counting blocked threads
> (since that *is* what the program is "doing"
> for some meanings of "doing").
> 
> So the threads are "doing" accept() but not actively
> consuming cycles whilst running accept().
> 
> Sigh. Thanks, hprof.

:)

I think hprof was designed just to sample what the thread is doing
periodically, and if it's always doing the same, you don't really get
any interesting information. Can you tell us what hprof options you've
set, and possibly show us what output you got?

You might want to try hooking up a more fully-featured profiler to your
system and see what it can find.

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

iEYEARECAAYFAkxkN44ACgkQ9CaO5/Lv0PCGcQCdFCxSdBwVBSQaT1SFWvbhYfRq
JvoAnRW5XFkCY4r8MlX7G+mhc1vaZS9y
=2md4
-END PGP SIGNATURE-

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



RE: Connecting IIS7.5 (win7 64bit) with tomcat 7

2010-08-12 Thread George Sexton
You might want to take a look at this page:

http://www.mhsoftware.com/caldemo/manual/en/pageFinder.html?page=921.htm

It skips some stuff like workers.properties, but it covers a lot of the
stuff very well.


George Sexton
MH Software, Inc.
303 438-9585
www.mhsoftware.com


> -Original Message-
> From: Nicklas Holmgren [mailto:elri...@gmail.com]
> Sent: Thursday, August 12, 2010 1:43 AM
> To: users@tomcat.apache.org
> Subject: Connecting IIS7.5 (win7 64bit) with tomcat 7
> 
>  So I messed around yesterday alot to get this working, but with no
> luck in
> the end.
> 
> I followed all in this howto: http://www.iisadmin.co.uk/?p=72
> I also read thru all comments and tried different versions of the
> isapi_redirect.dll without any luck.
> 
> I get either error 500 or 404 depending on if I enabled 32bit or not in
> the
> app pool.
> 
> When I get home today, I'm going to try to build the connector.
> I'm going to try to add the registry entries and see if there's any
> differencies
> 
>  Does anyone else have any tips n tricks?


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



RE: Tomcat 6 thread limit problem on Mac OS X Server 10.5.5

2010-08-12 Thread scabbage

This just started to happened yesterday. Users of my website started to
experience a long delay when opening pages. I guess a DoS attack is
possible. Maybe I need to report it.

my server.xml is the default setting except for changing from port 8080 to
80.




n828cl wrote:
> 
>> From: scabbage [mailto:guans...@gmail.com]
>> Subject: Tomcat 6 thread limit problem on Mac OS X Server 10.5.5
>> 
>> If I go the http://localhost/manager/status, I saw a whole 
>> bunch of threads with:
>> 
>> P ? ? ? ? ? ?
> 
> I'm guessing that someone is probing your system.  Seen any DoS attacks
> lately?
> 
>  - 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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-6-thread-limit-problem-on-Mac-OS-X-Server-10.5.5-tp29414129p29420620.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: Question about undeploying application

2010-08-12 Thread Caldarale, Charles R
> From: Ivan Mladenović [mailto:pif...@gmail.com]
> Subject: Question about undeploying application
> 
> Deployed application have some threads that are running 
> in background.

Then deployed application must stop those threads as part of its shutdown 
procedure.  Tomcat can't do it for you.  You should be using a 
ServletContextListener in your webapp, so it can properly manage the threads 
when its contextDestroyed() method is invoked.

> Can I configure Tomcat to kill all treads when application
> is undeployed?

No, that's the webapp's job.

 - 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



Question about undeploying application

2010-08-12 Thread Ivan Mladenović
Hello,

I’m using Tomcat 6.0.29. Tomcat manager application is enabled. Version of
installed Java is 1.6 update 18. Operating systems used to test this are
Windows 7 and Ubuntu 9.1.

There is one Spring web application that is deployed on Tomcat.  Deployed
application have some threads that are running in background.

Then try to un-deploy application by using Tomcat Manager. Application WAR
file and folder where WAR file is unpacked are removed, but I get this error
in logs:

*Aug 12, 2010 2:35:23 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named
[scheduler_Worker-6] but has failed to stop it. This is very likely to
create a memory leak.*

When I try to deploy new version of application (also by using Tomcat
Manager)  I get the “Out of memory” exception.

I try to change definition of following listener:

**

And I also try to add following parameters in context.xml:
*

*
Can I configure Tomcat to kill all treads when application is undeployed?

Thanks in advance.

Ivan


RE: Connecting IIS7.5 (win7 64bit) with tomcat 7

2010-08-12 Thread Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
Then I'd check out how to view your Web Extensions in IIS 7.5 and see if
Jakarta is in there. 

-Original Message-
From: Nicklas Holmgren [mailto:elri...@gmail.com] 
Sent: Thursday, August 12, 2010 11:32 AM
To: Tomcat Users List
Subject: Re: Connecting IIS7.5 (win7 64bit) with tomcat 7

I'm running IIS7.5 and there's nothing called Web Service Extensions

On 12 August 2010 17:08, Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00 <
jason.t.hansel@navy.mil> wrote:

> Under "Web Service Extensions" in IIS (I'm running 6), you need to add 
> a new web service extension. Call it Jakarta and point it to the .dll, 
> then check the box to Allow.
>
> -Original Message-
> From: Nicklas Holmgren [mailto:elri...@gmail.com]
> Sent: Thursday, August 12, 2010 10:53 AM
> To: Tomcat Users List
> Subject: Re: Connecting IIS7.5 (win7 64bit) with tomcat 7
>
> I have no idea how to enable "jakarta" web extension in IIS.
> I did however add a virtual directory which I called jakarta which is 
> the folder where the isapi_redirect.dll is.
>
> thx for response!
>
> On 12 August 2010 14:51, Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 
> 55E00 < jason.t.hansel@navy.mil> wrote:
>
> > Nicklas,
> > I'm in no way an expert but did you make sure you enabled the 
> > "jakarta" web extension in IIS?
> >
> > -Original Message-
> > From: Nicklas Holmgren [mailto:elri...@gmail.com]
> > Sent: Thursday, August 12, 2010 3:43 AM
> > To: users@tomcat.apache.org
> > Subject: Connecting IIS7.5 (win7 64bit) with tomcat 7
> >
> >  So I messed around yesterday alot to get this working, but with no 
> > luck in the end.
> >
> > I followed all in this howto: http://www.iisadmin.co.uk/?p=72 I also 
> > read thru all comments and tried different versions of the 
> > isapi_redirect.dll without any luck.
> >
> > I get either error 500 or 404 depending on if I enabled 32bit or not 
> > in the app pool.
> >
> > When I get home today, I'm going to try to build the connector.
> > I'm going to try to add the registry entries and see if there's any 
> > differencies
> >
> >  Does anyone else have any tips n tricks?
> >
>


smime.p7s
Description: S/MIME cryptographic signature


Re: role of the various threads?

2010-08-12 Thread paul womack

Caldarale, Charles R wrote:

From: paul womack [mailto:pwom...@papermule.co.uk]
Subject: Re: role of the various threads?

Further reading has shown me that I'm using Tomcat5.5,
and that the theads (above) are all running accept().

I thought accept() was blocking?


Depends on the particular JRE being used on the particular platform.  I would 
expect them to be blocking in most instances, but some esoteric systems use 
polling.  You're getting down to a level that requires examination of not just 
Tomcat source code, but also JRE source and the platform's TCP/IP stack source 
- a bit beyond the normal scope of a support forum.


It appears that hprof is counting blocked threads
(since that *is* what the program is "doing"
for some meanings of "doing").

So the threads are "doing" accept() but not actively
consuming cycles whilst running accept().

Sigh. Thanks, hprof.

   BugBear

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



Re: Connecting IIS7.5 (win7 64bit) with tomcat 7

2010-08-12 Thread Nicklas Holmgren
I'm running IIS7.5 and there's nothing called Web Service Extensions

On 12 August 2010 17:08, Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00 <
jason.t.hansel@navy.mil> wrote:

> Under "Web Service Extensions" in IIS (I'm running 6), you need to add a
> new
> web service extension. Call it Jakarta and point it to the .dll, then check
> the box to Allow.
>
> -Original Message-
> From: Nicklas Holmgren [mailto:elri...@gmail.com]
> Sent: Thursday, August 12, 2010 10:53 AM
> To: Tomcat Users List
> Subject: Re: Connecting IIS7.5 (win7 64bit) with tomcat 7
>
> I have no idea how to enable "jakarta" web extension in IIS.
> I did however add a virtual directory which I called jakarta which is the
> folder where the isapi_redirect.dll is.
>
> thx for response!
>
> On 12 August 2010 14:51, Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00 <
> jason.t.hansel@navy.mil> wrote:
>
> > Nicklas,
> > I'm in no way an expert but did you make sure you enabled the
> > "jakarta" web extension in IIS?
> >
> > -Original Message-
> > From: Nicklas Holmgren [mailto:elri...@gmail.com]
> > Sent: Thursday, August 12, 2010 3:43 AM
> > To: users@tomcat.apache.org
> > Subject: Connecting IIS7.5 (win7 64bit) with tomcat 7
> >
> >  So I messed around yesterday alot to get this working, but with no
> > luck in the end.
> >
> > I followed all in this howto: http://www.iisadmin.co.uk/?p=72 I also
> > read thru all comments and tried different versions of the
> > isapi_redirect.dll without any luck.
> >
> > I get either error 500 or 404 depending on if I enabled 32bit or not
> > in the app pool.
> >
> > When I get home today, I'm going to try to build the connector.
> > I'm going to try to add the registry entries and see if there's any
> > differencies
> >
> >  Does anyone else have any tips n tricks?
> >
>


Tomcat JAAS Authentication

2010-08-12 Thread mjmatch

I have configured Tomcat to do JAAS authentication using a custom login/error
page.  I am getting a nullponterexception as defined below.  Log messages
indicate that my JAAS authentication module is invoked and returning 'true'
from the auth module ::commit function.  I have defined my own User and Role
principle and specified in server.xml file.  Any suggestions on how to debug
the NPE that isn't in my code?  I'm not sure what to look at next... 
Thanks.
--Marco

Exception
===
INFO: Server startup in 9775 ms
Aug 11, 2010 4:52:12 PM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.NullPointerException
at java.util.Arrays.binarySearch0(Arrays.java:2001)
at java.util.Arrays.binarySearch(Arrays.java:1943)
at
org.apache.catalina.realm.GenericPrincipal.hasRole(GenericPrincipal.java:211)
at org.apache.catalina.realm.RealmBase.hasRole(RealmBase.java:872)
at
org.apache.catalina.realm.RealmBase.hasResourcePermission(RealmBase.java:795)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:545)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)

Realm Definition
==


JAAS Login Module
===
public class Authenticator implements LoginModule {
private static Logger log = Logger.getLogger(Authenticator.class);

String loginName;
CallbackHandler handler;
Subject subject;
Map sharedState; 
Map options;


private boolean loginPassed = false;

public Authenticator() {

}

@Override
public boolean abort() throws LoginException {
// TODO Auto-generated method stub
return false;
}

@Override
public boolean commit() throws LoginException {
try {
UserPrincipal user = new UserPrincipal(loginName);
RolePrincipal role = new RolePrincipal("admin");
 
subject.getPrincipals().add(user);
subject.getPrincipals().add(role);
log.debug("Added user and role principals.");
} catch (Exception e) {
throw new LoginException(e.getMessage());
}

return true;
}

@Override
public void initialize(Subject subject, 
   CallbackHandler callbackHandler,
   Map sharedState, 
   Map options) {
this.subject = subject;
this.handler = callbackHandler;
this.sharedState = sharedState;
this.options = options;

}

@Override
public boolean login() throws LoginException {
log.debug("::login");

String name = "";
String pass = "";

Context env = null;
boolean passed = false;
Callback[] callbacks = new Callback[2];

callbacks[0] = new NameCallback("Username:");
callbacks[1] = new PasswordCallback("Password:", false);

try {
handler.handle(callbacks);

NameCallback nameCallback = (NameCallback) callbacks[0];
name = nameCallback.getName();
PasswordCallback passwordCallback = (PasswordCallback)
callbacks[1];
pass = new String(passwordCallback.getPassword());

log.debug("log in name:" + name + "  password:" + pass);

if (name.equals("foo") &&
pass.equals("bar")) {
loginPassed = true;
loginName = name;
log.debug("login passed.");
} else {
loginPassed = false;
log.debug("login failed.");
}

return loginPassed;
}
catch (Exception e) {
throw new LoginException(e.getMessage());
}
}

@Override
public boolean logout() throws LoginException {
try {
UserPrincipal user = new UserPrincipal(loginName);
RolePrincipal role = new RolePrincipal("admin");
subject.getPrincipals().remove(user);
subject.getPrincipals().remove(role);
log.debug("Logged out:" + loginName);
} catch (Exception e) {
throw new LoginException(e.getMessage());
}
  

RE: Connecting IIS7.5 (win7 64bit) with tomcat 7

2010-08-12 Thread Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
Under "Web Service Extensions" in IIS (I'm running 6), you need to add a new
web service extension. Call it Jakarta and point it to the .dll, then check
the box to Allow. 

-Original Message-
From: Nicklas Holmgren [mailto:elri...@gmail.com] 
Sent: Thursday, August 12, 2010 10:53 AM
To: Tomcat Users List
Subject: Re: Connecting IIS7.5 (win7 64bit) with tomcat 7

I have no idea how to enable "jakarta" web extension in IIS.
I did however add a virtual directory which I called jakarta which is the
folder where the isapi_redirect.dll is.

thx for response!

On 12 August 2010 14:51, Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00 <
jason.t.hansel@navy.mil> wrote:

> Nicklas,
> I'm in no way an expert but did you make sure you enabled the 
> "jakarta" web extension in IIS?
>
> -Original Message-
> From: Nicklas Holmgren [mailto:elri...@gmail.com]
> Sent: Thursday, August 12, 2010 3:43 AM
> To: users@tomcat.apache.org
> Subject: Connecting IIS7.5 (win7 64bit) with tomcat 7
>
>  So I messed around yesterday alot to get this working, but with no 
> luck in the end.
>
> I followed all in this howto: http://www.iisadmin.co.uk/?p=72 I also 
> read thru all comments and tried different versions of the 
> isapi_redirect.dll without any luck.
>
> I get either error 500 or 404 depending on if I enabled 32bit or not 
> in the app pool.
>
> When I get home today, I'm going to try to build the connector.
> I'm going to try to add the registry entries and see if there's any 
> differencies
>
>  Does anyone else have any tips n tricks?
>


smime.p7s
Description: S/MIME cryptographic signature


Re: Connecting IIS7.5 (win7 64bit) with tomcat 7

2010-08-12 Thread Nicklas Holmgren
I have no idea how to enable "jakarta" web extension in IIS.
I did however add a virtual directory which I called jakarta which is the
folder where the isapi_redirect.dll is.

thx for response!

On 12 August 2010 14:51, Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00 <
jason.t.hansel@navy.mil> wrote:

> Nicklas,
> I'm in no way an expert but did you make sure you enabled the "jakarta" web
> extension in IIS?
>
> -Original Message-
> From: Nicklas Holmgren [mailto:elri...@gmail.com]
> Sent: Thursday, August 12, 2010 3:43 AM
> To: users@tomcat.apache.org
> Subject: Connecting IIS7.5 (win7 64bit) with tomcat 7
>
>  So I messed around yesterday alot to get this working, but with no luck in
> the end.
>
> I followed all in this howto: http://www.iisadmin.co.uk/?p=72 I also read
> thru all comments and tried different versions of the isapi_redirect.dll
> without any luck.
>
> I get either error 500 or 404 depending on if I enabled 32bit or not in the
> app pool.
>
> When I get home today, I'm going to try to build the connector.
> I'm going to try to add the registry entries and see if there's any
> differencies
>
>  Does anyone else have any tips n tricks?
>


newbie question re mod_jk

2010-08-12 Thread Matthew Fleming
Hi,

I'm a newbie with tomcat trying to get a basic mod_jk configuration working.
I have a mod_jk.conf file containing
JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13

I'm not getting any errors in the file specified as JkLogFile, and netstat
-l shows a listening socket at port 8009.

I can load my servlet from http://localhost:8080/Client_Access, but I can't
load it from http://localhost/Client_Access
so mod_jk isn't working. What could it be?

Thanks,

Matthew Fleming

PS, here is my whole mod_jk.conf file:

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /home/mfleming/apache-tomcat-6.0.29/conf/workers.properties
JkLogFile /var/log/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /Client_Access ajp13
JkMount /Client_Access/* ajp13

Here is workers.properties:

worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.lbfactor=50
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300

This is what I'm seeing in mod_jk.log:
[Wed Aug 11 20:44:10 2010][4008:3066754848] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.ajp13.cachesize' is deprecated - please check the documentation for
the correct replacement.
[Wed Aug 11 20:44:10 2010][4008:3066754848] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.ajp13.cache_timeout' is deprecated - please check the documentation
for the correct replacement.
[Wed Aug 11 20:44:10 2010][4008:3066754848] [info] init_jk::mod_jk.c (2830):
mod_jk/1.2.26 initialized

I'm running tomcat 6.0.29 on Linux.


Re: Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread HANDE CANORUÇ
My question is about mod jk, not for the glassfish. I receive the errors
from mod jk log file. Therefore , I think that my problem is about mod jk.
What do you think about errors?

2010/8/12 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> André,
>
> On 8/12/2010 7:49 AM, André Warnier wrote:
> > It is not very clear by your communication below what glassfish has to
> > do with this, and what you are connecting to what.
>
> NB: Glassfish is a Tomcat derivative. Technically speaking, this issue
> probably ought to be brought-up to the Glassfish community, but we
> should be just as good for all but the most highly technical details.
>
> Also, this is the place for mod_jk questions regardless of the servlet
> container.
>
> > And sorry if I ask, but what is glassfish 3.1 ?
> > (shows how ignorant I am, I know, but hey this is the tomcat users list)
>
> Hmm... no lmwptfy.com. Oh, well:
>
> http://en.wikipedia.org/wiki/GlassFish
>
> ;)
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxkApAACgkQ9CaO5/Lv0PAxMQCeIvmRbPCMnv0LJujA/6wvvY1G
> 87oAnRV+sxH0Lg2+MEET90DWhn6u88vZ
> =DDae
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Socket 24 is not connected any more (errno=-1)

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

André,

On 8/12/2010 7:49 AM, André Warnier wrote:
> It is not very clear by your communication below what glassfish has to
> do with this, and what you are connecting to what.

NB: Glassfish is a Tomcat derivative. Technically speaking, this issue
probably ought to be brought-up to the Glassfish community, but we
should be just as good for all but the most highly technical details.

Also, this is the place for mod_jk questions regardless of the servlet
container.

> And sorry if I ask, but what is glassfish 3.1 ?
> (shows how ignorant I am, I know, but hey this is the tomcat users list)

Hmm... no lmwptfy.com. Oh, well:

http://en.wikipedia.org/wiki/GlassFish

;)

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

iEYEARECAAYFAkxkApAACgkQ9CaO5/Lv0PAxMQCeIvmRbPCMnv0LJujA/6wvvY1G
87oAnRV+sxH0Lg2+MEET90DWhn6u88vZ
=DDae
-END PGP SIGNATURE-

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



Re: JreMemoryLeakPreventionListener and hourly Full GC

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

Konstantin,

On 8/12/2010 7:48 AM, Konstantin Kolinko wrote:
> It looks that with your version of JRE and with your setting it is
> better to run with gcDaemonProtection="false".  I certainly do not
> know how other JRE versions behave here. (Feedback is welcomed).

That's what he's got, now: gcDaemonProtection="false" (see the OP), but
the GC is still happening.

Donald, the reason the JreMemoryLeakPreventionListener makes the call to
GC.requestLatency is to un-do the effect of some other component (RMI,
it seems).

It's possible that some component other than the
JreMemoryLeakPreventionListener is causing the periodic full GC.

Try disabling the listener altogether and see if the GCs go away.

If they don't, consider recompiling the JreMemoryLeakPreventionListener
with some debugging code in there (the current code does not emit any
logging unless there is a problem calling GC.requestLatency... it does
not announce it's intention of doing so, even at a TRACE level).

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

iEYEARECAAYFAkxkAfAACgkQ9CaO5/Lv0PBgjACgkeQyW4H949HJ/k+28hjKR3JH
9tsAoLIxzWfypWAhR9PzC4IQpGFF0Kwy
=5GDP
-END PGP SIGNATURE-

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



RE: 2 POST requests to underlying Server

2010-08-12 Thread Karthik Nanjangude
Hi


The Window for activation " mod_jk logging"  is requested and would provide the 
same as soon as I get them from the N/w Maintancence guy [ may take another 2 
or more days] Since the application is on Production and cannot be disturbed as 
of traffic.



With regards
Karthik

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Wednesday, August 11, 2010 10:37 PM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pid,

On 8/11/2010 4:11 AM, Pid wrote:
> #1  I'm not sure the JavaScript you posted will work in all browsers.

+1

It's better to simply disable the button or the form than doing this
click counting stuff.

> #2  These two requests are around 12 seconds apart.  Perform exactly the
> same test at least 10 more times and report what the period between the
> pair of requests is.
>
> #3  I can't see from the trace above what the resource type is, but if
> it's a PDF for example, the browser (+plugin) may be attempting to open
> multiple connections with different byte ranges.

+1

The presented data does not even include a full POST... just some random
data in the middle.

I still don't know why Karthik is unwilling to enable mod_jk logging and
use that: it's sooo much easier to read and will likely tell us
everything we need to know.

I'm done replying until we get some real data to look at.

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

iEYEARECAAYFAkxi2MwACgkQ9CaO5/Lv0PCqYgCgwEsO5ifT+tPn37enjXZmFsDu
AN8An3fmZyIgfGvFisFO9N9mqnETR9th
=1/YA
-END PGP SIGNATURE-

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


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



Re: excluding some path from tomcat

2010-08-12 Thread André Warnier

Angelo Chen wrote:

Hi,

I use Apache web server 2.2 in front of tomcat, it works well with Apache's
default proxy module, however, I can't exclude some path from it:

ProxyPass /  http://localhost:8080/
ProxyPass /static !
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on


example.com/static still goes to my tomcat app, any idea? 


No, but this looks like a question for the Apache httpd users list, not this 
Tomcat one.
Your poor Tomcat has no influence on the matter.

By the way, considering your above apparent intention, it is not clear that you need an 
Apache front-end.  Tomcat can server static content directly, just as fast.


Try this :

- stop Apache and Tomcat
- copy the content of the Apache /static directory under 
(tomcat)/webapps/static/
- change the HTTP port of Tomcat from 8080 to 80 (in server.xml)
- start Tomcat

and try it out.

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



excluding some path from tomcat

2010-08-12 Thread Angelo Chen

Hi,

I use Apache web server 2.2 in front of tomcat, it works well with Apache's
default proxy module, however, I can't exclude some path from it:

ProxyPass /  http://localhost:8080/
ProxyPass /static !
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on


example.com/static still goes to my tomcat app, any idea? thanks,

Angelo
-- 
View this message in context: 
http://old.nabble.com/excluding-some-path-from-tomcat-tp29418980p29418980.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



excluding some path from tomcat

2010-08-12 Thread Angelo Chen

Hi,

I use Apache web server 2.2 in front of tomcat, it works well with Apache's
default proxy module, however, I can't exclude some path from it:

ProxyPass /  http://localhost:8080/
ProxyPass /static !
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on


example.com/static still goes to my tomcat app, any idea? thanks,

Angelo
-- 
View this message in context: 
http://old.nabble.com/excluding-some-path-from-tomcat-tp29418981p29418981.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 6 thread limit problem on Mac OS X Server 10.5.5

2010-08-12 Thread Caldarale, Charles R
> From: scabbage [mailto:guans...@gmail.com]
> Subject: Tomcat 6 thread limit problem on Mac OS X Server 10.5.5
> 
> If I go the http://localhost/manager/status, I saw a whole 
> bunch of threads with:
> 
> P ? ? ? ? ? ?

I'm guessing that someone is probing your system.  Seen any DoS attacks lately?

 - 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: role of the various threads?

2010-08-12 Thread Caldarale, Charles R
> From: paul womack [mailto:pwom...@papermule.co.uk]
> Subject: Re: role of the various threads?
> 
> Further reading has shown me that I'm using Tomcat5.5,
> and that the theads (above) are all running accept().
> 
> I thought accept() was blocking?

Depends on the particular JRE being used on the particular platform.  I would 
expect them to be blocking in most instances, but some esoteric systems use 
polling.  You're getting down to a level that requires examination of not just 
Tomcat source code, but also JRE source and the platform's TCP/IP stack source 
- a bit beyond the normal scope of a support forum.

 - 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 6 thread limit problem on Mac OS X Server 10.5.5

2010-08-12 Thread Pid
On 12/08/2010 01:07, scabbage wrote:
> 
> I did not configure the native webserver/tomcat server come with the Mac OS X
> Server. I downloaded a Tomcat 6.0.29 and tried to run it on port 80 (using
> sudo). I have been able to have the service up for no problem until
> yesterday. Now I when I launch Tomcat, I got the following:
> 
> 
> Aug 11, 2010 5:01:57 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows optimal
> performance in production environments was not found on the
> java.library.path:
> .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
> Aug 11, 2010 5:01:57 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-80
> Aug 11, 2010 5:01:57 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 425 ms
> Aug 11, 2010 5:01:57 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Aug 11, 2010 5:01:57 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
> Aug 11, 2010 5:01:57 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> INFO: Deploying configuration descriptor host-manager.xml
> Aug 11, 2010 5:01:57 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> INFO: Deploying configuration descriptor manager.xml
> Aug 11, 2010 5:01:57 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory docs
> Aug 11, 2010 5:01:57 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory examples
> Aug 11, 2010 5:01:58 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory ROOT
> Aug 11, 2010 5:01:58 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-80
> Aug 11, 2010 5:01:58 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Aug 11, 2010 5:01:58 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/24  config=null
> Aug 11, 2010 5:01:58 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 700 ms
> Aug 11, 2010 5:02:10 PM org.apache.tomcat.util.net.JIoEndpoint
> createWorkerThread
> INFO: Maximum number of threads (200) created for connector with address
> null and port 80
> 
> If I go the http://localhost/manager/status, I saw a whole bunch of threads
> with:
> 
> P ? ? ? ? ? ?
> 
> 
> Now I'm completely lost as to how these threads get spawned. 

Please edit your server.xml to remove all comments and any sensitive
information, such as passwords - then post it, inline, here.


p







signature.asc
Description: OpenPGP digital signature


Re: role of the various threads?

2010-08-12 Thread paul womack

paul womack wrote:


RMI - TCP Accept-0
RMI - TCP Accept-8333
main
TP-Processor4
http-10722-Processor23
http-10722-Processor24
http-10722-Processor25

are each getting (roughly) as many ticks allocated
as "my" thread.


Further reading has shown me that I'm using Tomcat5.5,
and that the theads (above) are all running accept().

I thought accept() was blocking?

  BugBear

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



Tomcat 5.5.23 request.getAttribute("foo") returns unexpected NULL

2010-08-12 Thread Thomas Treitlinger
Hello,

I have a number of JSP pages which use the JSTL core library to set a
request attribute like this:
FOO-VALUE

The JSPs then forward to a Servlet like this:


The Servlet later invokes
String s = (String) request.getAttribute("foo")

At this point I would expect s to be "FOO-VALUE". However after
running without any problem for days, request.getAttribute("foo")
suddenly starts returning NULL, causing NullPointerExceptions later
on.

The application was running in Tomcat 5.5.23 (Linux/Slackware) for
approx 10 days until these exceptions started occurring. After they
had started, they were happening for every single HTTP request. After
a Tomcat restart, the exceptions just continued as before, so we had
to failover to a different machine.

Has anyone seen anything like this before?

Regards,
Tom

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



RE: Connecting IIS7.5 (win7 64bit) with tomcat 7

2010-08-12 Thread Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
Nicklas,
I'm in no way an expert but did you make sure you enabled the "jakarta" web
extension in IIS? 

-Original Message-
From: Nicklas Holmgren [mailto:elri...@gmail.com] 
Sent: Thursday, August 12, 2010 3:43 AM
To: users@tomcat.apache.org
Subject: Connecting IIS7.5 (win7 64bit) with tomcat 7

 So I messed around yesterday alot to get this working, but with no luck in
the end.

I followed all in this howto: http://www.iisadmin.co.uk/?p=72 I also read
thru all comments and tried different versions of the isapi_redirect.dll
without any luck.

I get either error 500 or 404 depending on if I enabled 32bit or not in the
app pool.

When I get home today, I'm going to try to build the connector.
I'm going to try to add the registry entries and see if there's any
differencies

 Does anyone else have any tips n tricks?


smime.p7s
Description: S/MIME cryptographic signature


Re: Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread HANDE CANORUÇ
Sun glassfish 3.1 is an open source application server.
https://glassfish.dev.java.net/

2.15 version of mod jk is used. With my application  sun glassfish 3.0 and
mod jk 2.15 works properly.However when I try to migrate 3.1 , I have
following errors in the mod_jk log file.

I have httpd and workers.properties files normally.   In httpd,
Timeout  180
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 150


StartServers   8
MinSpareServers5
MaxSpareServers   20
ServerLimit  256
MaxClients   256
MaxRequestsPerChild  1



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

Also in worker.properties,

worker.default.host=127.0.0.1
worker.default.type=ajp13
worker.default.lbfactor=50
worker.default.connect_timeout=60
worker.default.prepost_timeout=60
worker.default.cachesize=100
worker.default.socket_keepalive=1
worker.default.socket_timeout=300
worker.server1.connection_pool_timeout=600

I got following errors.

2010/8/12 André Warnier 

> HANDE CANORUÇ wrote:
>
>> Should I make configuration in httpd file or workers.properties? And what
>> configuration?
>>
>
> mod_jk is a connector between Apache httpd and Apache Tomcat.
> Its sibling isapi_redirect is a connector between Microsoft IIS and Apache
> Tomcat.
>
> It is not very clear by your communication below what glassfish has to do
> with this, and what you are connecting to what.  Where is this mod_jk
> installed, on what kind of host, what version is it, what is the tomcat
> version etc..
>
> And sorry if I ask, but what is glassfish 3.1 ?
> (shows how ignorant I am, I know, but hey this is the tomcat users list)
>
>
>
>
>> 2010/8/12 HANDE CANORUÇ 
>>
>>  I am using mod jk in order to connect tomcat and glassfish 3.1. In the
>>> mod_jk log file I am getting these errors;
>>>
>>>  [info]  ajp_send_request::jk_ajp_common.c (1178): Socket 24 is not
>>> connected any more (errno=-1)
>>> [info]  ajp_send_request::jk_ajp_common.c (1202): Error sending request.
>>> Will try another pooled connection
>>>  [info]  ajp_send_request::jk_ajp_common.c (1225): All endpoints are
>>> disconnected or dead
>>>  [info]  ajp_service::jk_ajp_common.c (1749): Sending request to tomcat
>>> failed,  recoverable operation attempt=1
>>>
>>>
>>>
>>> and in the server log file I am getting ;
>>>
>>>
>>>
>>> SEVERE|glassfish3.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=17;_ThreadName=Thread-1;|threadpool.busy|#]
>>>
>>> Any suggestions??
>>>
>>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread André Warnier

HANDE CANORUÇ wrote:

Should I make configuration in httpd file or workers.properties? And what
configuration?


mod_jk is a connector between Apache httpd and Apache Tomcat.
Its sibling isapi_redirect is a connector between Microsoft IIS and Apache 
Tomcat.

It is not very clear by your communication below what glassfish has to do with this, and 
what you are connecting to what.  Where is this mod_jk installed, on what kind of host, 
what version is it, what is the tomcat version etc..


And sorry if I ask, but what is glassfish 3.1 ?
(shows how ignorant I am, I know, but hey this is the tomcat users list)




2010/8/12 HANDE CANORUÇ 


I am using mod jk in order to connect tomcat and glassfish 3.1. In the
mod_jk log file I am getting these errors;

 [info]  ajp_send_request::jk_ajp_common.c (1178): Socket 24 is not
connected any more (errno=-1)
[info]  ajp_send_request::jk_ajp_common.c (1202): Error sending request.
Will try another pooled connection
 [info]  ajp_send_request::jk_ajp_common.c (1225): All endpoints are
disconnected or dead
 [info]  ajp_service::jk_ajp_common.c (1749): Sending request to tomcat
failed,  recoverable operation attempt=1



and in the server log file I am getting ;


SEVERE|glassfish3.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=17;_ThreadName=Thread-1;|threadpool.busy|#]

Any suggestions??






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



Re: JreMemoryLeakPreventionListener and hourly Full GC

2010-08-12 Thread Konstantin Kolinko
2010/8/12 Donald Armstrong :
> The documentation does not indicate if the
> JreMemoryLeakPreventionListener should be enabled for production
> environments, but based on this information, probably not?
>

I think you are too fast jumping to conclusions.

BTW, even if you do not see JavaDoc here
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/core/JreMemoryLeakPreventionListener.html
the sources are always available,
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?view=markup


JreMemoryLeakPreventionListener is a combination of several
independent tricks to prevent certain known memory leak problems.
Each of those tricks can be enabled or disabled independently.

It looks that with your version of JRE and with your setting it is
better to run with gcDaemonProtection="false".  I certainly do not
know how other JRE versions behave here. (Feedback is welcomed).

> Thank you for your opinion.
>
> Donnie
>

By the way, there is a page in the wiki regarding the memory leaks
protection. Additions are welcomed there as well.
http://wiki.apache.org/tomcat/MemoryLeakProtection

Best regards,
Konstantin Kolinko

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



RE: FW: tomcat integrated with httpd and over https port, not working

2010-08-12 Thread Irfan Khan
Thanks,

Your recommended configuration worked, thanks dude... you are a champ! made
my day.


Thanks,
IK


-Original Message-
From: Leon Kolchinsky [mailto:lkolc...@gmail.com] 
Sent: Thursday, August 12, 2010 11:05 AM
To: Tomcat Users List
Subject: Re: FW: tomcat integrated with httpd and over https port, not
working

Hi,

Take a look here- http://myunster.com/blog/25.html

It'll give you an easy start.

Cheers,
Leon Kolchinsky

On Thu, Aug 12, 2010 at 12:57, Irfan Khan
wrote:

> Is there anyone who can help me to resolve this issue.
>
>
>
> From: Irfan Khan [mailto:irfan.k...@enovatemedia.co.in]
> Sent: Wednesday, August 11, 2010 5:31 PM
> To: 'users@tomcat.apache.org'
> Subject: tomcat integrated with httpd and over https port, not working
>
>
>
>
>
> Dear pals,
>
>
>
> Issue: tomcat integrated with httpd and over https port, not working.
>
>
>
> Important info: With the below given httpd.conf, if it is modified to work
> with http , then tomcat pages were accessed on http.
>
>
>
> So it is confirmed that there must be something wrong with ssl settings.
>
>
>
> I have tried find on Google , and ended with this final configuration for
> ssl but with no luck. I am pulling my hair to find out why it is not
> working.
>
>
>
> You brilliant guys can suggest!
>
> Kindly help!
>
> Thanks in advance!
>
>
>
>
>
> Tools Version details;
>
> Centos 5.3
>
> httpd-2.2.3-31
>
> tomcat-6.0.26
>
> mod_jk-1.2.28-httpd-2.2.X
>
> openssl-0.9.8e
>
> jre1.6.0_20
>
>
>
> EXISTING WORKING CONFIGURATION
>
> Http and https port on httpd - working fine
>
> Tomcat on port 8080 - working fine
>
> Tomcat + httpd + http port - working fine
>
>
>
> ##
>
> Httpd.conf
>
> ##
>
> NameVirtualHost *:443
>
>
>
> LoadModule jk_module modules/mod_jk.so
>
> JkWorkersFile "/etc/httpd/conf/workers.properties"
>
> JkShmFile "/var/log/httpd/mod_jk.shm"
>
> JkLogFile "/var/log/httpd/mod_jk.log"
>
> JkLogLevel info
>
> JkLogStampFormat "[%a %b %d %H %M %S %Y]"
>
> # JkOptions indicate to send SSL KEY SIZE,
>
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> +ForwardSSLCertChain
>
> # Should mod_jk send SSL information to Tomcat (default is On)
>
> JkExtractSSL On
>
> # What is the indicator for SSL (default is HTTPS)
>
> JkHTTPSIndicator HTTPS
>
> # What is the indicator for SSL session (default is SSL_SESSION_ID)
>
> JkSESSIONIndicator SSL_SESSION_ID
>
> # What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
>
> JkCIPHERIndicator SSL_CIPHER
>
> # What is the indicator for the client SSL certificated (default is
> SSL_CLIENT_CERT)
>
> JkCERTSIndicator SSL_CLIENT_CERT
>
>
>
>
>
> 
>
> ServerName abcd.com
>
> SSLEngine On
>
> SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
>
> SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
>
> SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
>
>
>
> jkMount /tomcatpages* worker1
>
> 
>
>



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



role of the various threads?

2010-08-12 Thread paul womack

I'm trying to do some performance analysis.

In my current test scenario I have a dedicated thread tomcat
that is synchronously performing "some work" in a
hard coded loop.

For the purposes of timing/testing I have ensured
that tomcat is not serving any requests while this
"some work" is going on.

Despite this, a quick run with runhprof
shows that "my" thread is onlygetting a little under 10% of the cycles,
and that tomcat threads called

RMI - TCP Accept-0
RMI - TCP Accept-8333
main
TP-Processor4
http-10722-Processor23
http-10722-Processor24
http-10722-Processor25

are each getting (roughly) as many ticks allocated
as "my" thread.

Any information as to what is going on, wether it's "normal",
where I can look for information on the various threads
and types of thread that tomcat uses would be gratefully accepted.

BugBear

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



Re: Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread HANDE CANORUÇ
Should I make configuration in httpd file or workers.properties? And what
configuration?

2010/8/12 HANDE CANORUÇ 

> I am using mod jk in order to connect tomcat and glassfish 3.1. In the
> mod_jk log file I am getting these errors;
>
>  [info]  ajp_send_request::jk_ajp_common.c (1178): Socket 24 is not
> connected any more (errno=-1)
> [info]  ajp_send_request::jk_ajp_common.c (1202): Error sending request.
> Will try another pooled connection
>  [info]  ajp_send_request::jk_ajp_common.c (1225): All endpoints are
> disconnected or dead
>  [info]  ajp_service::jk_ajp_common.c (1749): Sending request to tomcat
> failed,  recoverable operation attempt=1
>
>
>
> and in the server log file I am getting ;
>
>
> SEVERE|glassfish3.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=17;_ThreadName=Thread-1;|threadpool.busy|#]
>
> Any suggestions??
>


Re: FW: tomcat integrated with httpd and over https port, not working

2010-08-12 Thread André Warnier

Irfan Khan wrote:

Is there anyone who can help me to resolve this issue.


Maybe (but check the documentation, because I am not sure).

The thing is, you have an Apache configuration with VirtualHost's.
In such a case, the configuration directives present outside a  section, 
generally act as default for the  sections, *unless* the same configuration 
directive is also present inside the  section (in that case, the one inside 
the  overrides the default).


The above is the general rule, but there are exceptions : not all configuration directives 
of the "main" section are automatically carried over to the  section.
For example, JkMount is not automatically carroed over, unless you use the special 
JkMountCopy instructions.


So you have to check below, if some of Jkx instructions should not be moved from 
the main section, to the  section.

The documentation should tell you.

I know that the following are ok in the main section :

> LoadModule jk_module modules/mod_jk.so
>
> JkWorkersFile "/etc/httpd/conf/workers.properties"
>
> JkShmFile "/var/log/httpd/mod_jk.shm"
>
> JkLogFile "/var/log/httpd/mod_jk.log"
>
> JkLogLevel info
>
> JkLogStampFormat "[%a %b %d %H %M %S %Y]"

But for all the other ones, I don't know.






 

From: Irfan Khan [mailto:irfan.k...@enovatemedia.co.in] 
Sent: Wednesday, August 11, 2010 5:31 PM

To: 'users@tomcat.apache.org'
Subject: tomcat integrated with httpd and over https port, not working

 

 


Dear pals,

 


Issue: tomcat integrated with httpd and over https port, not working.

 


Important info: With the below given httpd.conf, if it is modified to work
with http , then tomcat pages were accessed on http. 

 


So it is confirmed that there must be something wrong with ssl settings.

 


I have tried find on Google , and ended with this final configuration for
ssl but with no luck. I am pulling my hair to find out why it is not
working.

 


You brilliant guys can suggest!

Kindly help!

Thanks in advance!

 

 

Tools Version details; 


Centos 5.3

httpd-2.2.3-31

tomcat-6.0.26

mod_jk-1.2.28-httpd-2.2.X

openssl-0.9.8e

jre1.6.0_20

 


EXISTING WORKING CONFIGURATION

Http and https port on httpd - working fine

Tomcat on port 8080 - working fine

Tomcat + httpd + http port - working fine

 


##

Httpd.conf

##

NameVirtualHost *:443

 


LoadModule jk_module modules/mod_jk.so

JkWorkersFile "/etc/httpd/conf/workers.properties"

JkShmFile "/var/log/httpd/mod_jk.shm"

JkLogFile "/var/log/httpd/mod_jk.log"

JkLogLevel info

JkLogStampFormat "[%a %b %d %H %M %S %Y]"

# JkOptions indicate to send SSL KEY SIZE,

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
+ForwardSSLCertChain

# Should mod_jk send SSL information to Tomcat (default is On)

JkExtractSSL On

# What is the indicator for SSL (default is HTTPS)

JkHTTPSIndicator HTTPS

# What is the indicator for SSL session (default is SSL_SESSION_ID)

JkSESSIONIndicator SSL_SESSION_ID

# What is the indicator for client SSL cipher suit (default is SSL_CIPHER)

JkCIPHERIndicator SSL_CIPHER

# What is the indicator for the client SSL certificated (default is
SSL_CLIENT_CERT)

JkCERTSIndicator SSL_CLIENT_CERT

 

 




ServerName abcd.com

SSLEngine On

SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt

SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key

 


jkMount /tomcatpages* worker1







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



Re: Can't configure webapps to disk partition

2010-08-12 Thread Peter Crowther
On 11 August 2010 21:36, André Warnier  wrote:

> To point correctly to the location of this drive E:, you should probably
> use instead the UNC path, like //server/share.  That is because, depending
> on the user-id under which tomcat runs, this shared directory may not
> necessarily be mapped to a drive letter, or not to the same E: drive letter.
>
>
> That's not a "probably" - you *will* have to use the UNC path :-).  Windows
services don't completely process the profile of their user as they start,
and don't map drives to shares even if such mappings are defined in the user
profile.  It's fine if E: is a local partition, however (Carl hasn't told
us, or I missed it).

- Peter


Socket 24 is not connected any more (errno=-1)

2010-08-12 Thread HANDE CANORUÇ
I am using mod jk in order to connect tomcat and glassfish 3.1. In the
mod_jk log file I am getting these errors;

 [info]  ajp_send_request::jk_ajp_common.c (1178): Socket 24 is not
connected any more (errno=-1)
[info]  ajp_send_request::jk_ajp_common.c (1202): Error sending request.
Will try another pooled connection
 [info]  ajp_send_request::jk_ajp_common.c (1225): All endpoints are
disconnected or dead
 [info]  ajp_service::jk_ajp_common.c (1749): Sending request to tomcat
failed,  recoverable operation attempt=1



and in the server log file I am getting ;

SEVERE|glassfish3.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=17;_ThreadName=Thread-1;|threadpool.busy|#]

Any suggestions??


truststoreFile vs javax.net.ssl.trustStore

2010-08-12 Thread Estanislao Gonzalez

Hi,

I try to simplify my question in the hopes that someone can answer it.

If I set both trustoreFile and javax.net.ssl.trustStore which one is 
being honored? The documentation is not clear to me:
"The trust store file to use to validate client certificates. The 
default is the value of the |javax.net.ssl.trustStore| system property. 
If neither this attribute nor the default system property is set, no 
trust store will be configured."


"The default" as in "if nothing else is found" or "if set"?

I have a truststoreFile set (which is read), but the validation is made 
against java own jssecacerts or cacerts files, the one from the 
truststoreFile is only used if explicitly mentioned in 
javax.net.ssl.trustStore, no matter what.


Thanks,
Estani


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



Connecting IIS7.5 (win7 64bit) with tomcat 7

2010-08-12 Thread Nicklas Holmgren
 So I messed around yesterday alot to get this working, but with no luck in
the end.

I followed all in this howto: http://www.iisadmin.co.uk/?p=72
I also read thru all comments and tried different versions of the
isapi_redirect.dll without any luck.

I get either error 500 or 404 depending on if I enabled 32bit or not in the
app pool.

When I get home today, I'm going to try to build the connector.
I'm going to try to add the registry entries and see if there's any
differencies

 Does anyone else have any tips n tricks?


Re: java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.

2010-08-12 Thread Estanislao Gonzalez

Hi Jing,

then you are luckier than me, as I still have no solution for my problem ;-)

So I think your problem might be, as the message suggests ;-), problem 
between the ciphering used in the trustore, the certificate signature 
and/or tomcat.


check the cipher parameter of the connector, and also read these:

https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=SO7394
https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=SO10903
https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=SO10061

Good luck!
Estani

Jing Chen wrote:

Hi Estani


Thanks for your suggestions.  I added the javax.net.ssl.trustStore and 
javax.net.ssl.trustStorePassword to the JVM parameters, but I am still getting 
the same error message when JBoss starts.


Any thoughts?

Thanks
Jing



From: Estanislao Gonzalez 
To: Tomcat Users List 
Sent: Wed, August 11, 2010 7:59:07 AM
Subject: Re: java.net.SocketException: SSL handshake 
errorjavax.net.ssl.SSLException: No available certificate or key corresponds to 
the SSL cipher suites which are enabled.


Hi,
Just in case this is also related to my problem that truststoreFile is not being 
read while redirecting from http. Check pointing to the file with the JVM param:

-Djavax.net.ssl.trustStore=

And if this works but your truststoreFile param at the connector don't write 
some feedback.


thanks,
estani

Richard G Curry wrote:
  
We got that early on when we first started working SSL secured sockets in our 
app and it was due to us not actually pointing to the correct certificate files 
and instead still going for the older ones. Is this a possibility in your 
situation?


___
_
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
_
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Jing Chen [mailto:jin...@yahoo.com] Sent: Tuesday, August 10, 2010 6:51 
PM

To: users@tomcat.apache.org
Subject: java.net.SocketException: SSL handshake 
errorjavax.net.ssl.SSLException: No available certificate or key corresponds to 
the SSL cipher suites which are enabled.


After getting a new SSL certificate from GeoTrust, I keep getting the following 
error after starting JBoss 4.0.5:
java.net.SocketException: SSL handshake errorj avax.net.ssl.SSLException: No 
available certificate or key corresponds to the SSL cipher suites which are 
enabled.


I first imported the intermediate certificate with alias root, then import the 
final certificate with another alias name.


Can someone help me figuring out where is the missing piece?

Thanks!!
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged material.  
If the reader of this message is not the intended recipient,

you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended

recipient, please contact the sender and delete the material from any
computer.


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

 




-- Estanislao Gonzalez

Max-Planck-Institut für Meteorologie (MPI-M)
Deutsches Klimarechenzentrum (DKRZ) - German Climate Computing Centre
Room 108 - Bundesstrasse 45a, D-20146 Hamburg, Germany

Phone:   +49 (40) 46 00 94-126
E-Mail:  estanislao.gonza...@zmaw.de


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



--
Estanislao Gonzalez

Max-Planck-Institut für Meteorologie (MPI-M)
Deutsches Klimarechenzentrum (DKRZ) - German Climate Computing Centre
Room 108 - Bundesstrasse 45a, D-20146 Hamburg, Germany

Phone:   +49 (40) 46 00 94-126
E-Mail:  estanislao.gonza...@zmaw.de


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