Re: Tomcat Shutting Down by Itself?

2010-07-28 Thread jehan4324



try to change shutdown port in the server.xml
-- 
View this message in context: 
http://old.nabble.com/Tomcat-Shutting-Down-by-Itself--tp29249881p29293203.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: FileDirContext returns the path directly without checking whether the target file really exists

2010-07-28 Thread Ivan
Thanks, Mark, if you mean the method getRealPath in BaseDirContext, I have
checked it.

--->
public String getRealPath(String name) {
if (!aliases.isEmpty()) {
AliasResult result = findAlias(name);
if (result.dirContext != null) {
return result.dirContext.doGetRealPath(result.aliasName);
}
}

// Next do a standard getRealPath()
String path = doGetRealPath(name); --> I think this invocation
will never return null in the FileDirContext implementation, right ? So does
it mean that if FileDirContext is used, no need to consider the resources in
the META-INF/resources embed in the jar files.

if (path != null)
return path;

// Check the alternate locations
for (DirContext altDirContext : altDirContexts) {
if (altDirContext instanceof BaseDirContext){
path = ((BaseDirContext) altDirContext).getRealPath(
"META-INF/resources/" + name);
if (path != null)
return path;
}
}

// Really not found
return null;
}
<---

2010/7/29 Mark Thomas 

> On 28/07/2010 14:11, Ivan wrote:
> > Thanks, if possible, could you please show me where it is ? I am really
> > interested in those details :-)
>
> BaseDirContext
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ivan


Re: FileDirContext returns the path directly without checking whether the target file really exists

2010-07-28 Thread Mark Thomas
On 28/07/2010 14:11, Ivan wrote:
> Thanks, if possible, could you please show me where it is ? I am really
> interested in those details :-)

BaseDirContext

Mark



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



RE: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

2010-07-28 Thread Kuga

Hi,
Thanks for the quick response, much appreciated:
-bash-4.0# /usr/local/jre/bin/java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)

Please let me know if you would like to see the Providers list. I have
executed the program, and dont see any of the Cipher.

Thanks
Kuga


n828cl wrote:
> 
>> From: Kuga [mailto:kvisagam...@infoblox.com]
>> Subject: Re: [OT] java.security.NoSuchAlgorithmException: No
>> implementation for AES/CBC/NoPad
>> 
>> We are using Java 1.6.0_17.
> 
> Are you absolutely certain?
> 
>> I dont see the "Cipher.PBEWithMD5AndDES" in the providers list
> 
> It's there in the standard 1.6 JRE download from Sun (Oracle), so I'm
> suspicious that you're not really running the JVM you think you are.  What
> does "java -version" show?
> 
>  - 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/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29291649.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: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

2010-07-28 Thread Caldarale, Charles R
> From: Kuga [mailto:kvisagam...@infoblox.com]
> Subject: Re: [OT] java.security.NoSuchAlgorithmException: No
> implementation for AES/CBC/NoPad
> 
> We are using Java 1.6.0_17.

Are you absolutely certain?

> I dont see the "Cipher.PBEWithMD5AndDES" in the providers list

It's there in the standard 1.6 JRE download from Sun (Oracle), so I'm 
suspicious that you're not really running the JVM you think you are.  What does 
"java -version" show?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

2010-07-28 Thread Kuga

Hi,
We are using Java 1.6.0_17.
I dont see the "Cipher.PBEWithMD5AndDES" in the providers list, as a result
the Security.getProvider("Cipher.PBEWithMD5AndDES") is returning NULL.

Is there a way to generate these providers? or am I missing something in
that environment. I am using Linux Fedora 12.

Thanks for any response
Best Regards,
Kuga



Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> To whom it may concern,
> 
> (Marked as OT since this is a JVM issue, not a Tomcat issue).
> 
> On 7/9/2009 11:01 AM, nitingautam wrote:
>> In my web application i am using ldap authentication. I am using tomcat
>> 5.5
>> with jdk 1.4. From some days when I try to login it throw the following
>> error and rest of the time it works fine. What can be the issue...
> 
> [snip]
> 
>> Caused by: java.security.NoSuchAlgorithmException: No implementation for
>> AES/CBC/NoPadding found
>>  at com.sun.net.ssl.internal.ssl.SunJSSE_i.d(Unknown Source)
>>  at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(Unknown Source)
> 
> Looks like your JVM doesn't have this cipher, which is weird if it only
> happens some times. What is your exact JVM version? You might want to
> upgrade, as things like this tend to get fixed. 1.4 is nearly dead.
> 
> Try running this code:
> 
> String providerName = null;
> Provider providers[];
> if(null != args && 0 < args.length)
> {
> providers = new Provider[args.length];
> for(int i = 0; i < args.length; i++)
> providers[i] = Security.getProvider(args[i]);
> 
> } else
> {
> providers = Security.getProviders();
> }
> for(int i = 0; i < providers.length; i++)
> {
> Provider p = providers[i];
> System.out.println("Provider: " + p);
> System.out.println("===");
> System.out.println("provider properties:");
> ArrayList keys = new ArrayList(p.keySet());
> Collections.sort(keys);
> String key;
> for(Iterator j = keys.iterator(); j.hasNext();
> System.out.println(key + "=" + p.get(key)))
> key = (String)j.next();
> 
> System.out.println("---");
> }
> 
> This will tell you all the crypto providers, ciphers, etc. that are
> supported by your JVM. I ran this against my own JVM:
> 
> $ java -version
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
> $ java GetProviderInfo | grep AES
> Alg.Alias.AlgorithmParameters.Rijndael=AES
> Alg.Alias.Cipher.Rijndael=AES
> Alg.Alias.KeyGenerator.Rijndael=AES
> AlgorithmParameters.AES=com.sun.crypto.provider.AESParameters
> Cipher.AES=com.sun.crypto.provider.AESCipher
> Cipher.AES SupportedKeyFormats=RAW
> Cipher.AES
> SupportedModes=ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128
> Cipher.AES SupportedPaddings=NOPADDING|PKCS5PADDING|ISO10126PADDING
> Cipher.AESWrap=com.sun.crypto.provider.AESWrapCipher
> Cipher.AESWrap SupportedKeyFormats=RAW
> Cipher.AESWrap SupportedModes=ECB
> Cipher.AESWrap SupportedPaddings=NOPADDING
> KeyGenerator.AES=com.sun.crypto.provider.AESKeyGenerator
> Provider.id info=SunJCE Provider (implements RSA, DES, Triple DES, AES,
> Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
> 
> You can see in there that AES supports the CBC mode as well as the
> NOPADDING padding (though I didn't actually try to create an
> AES/CBC/NOPADDING cipher just to make sure).
> 
> I wonder if your JVM is broken?
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkpbREMACgkQ9CaO5/Lv0PAGbwCcDDILqRAT8aIFNl06Lbj7ZmjF
> Ur8AnjLGY9QtHl1v7MgdcASjcxduAKGw
> =7ff9
> -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/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29291288.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: connector config for debug scenario

2010-07-28 Thread Rick . Wellman
So, simple; you rock.
I think a dummy JSP in the existing app should work, eh? (rhetorical
unless the answer is no) awesome!

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, July 28, 2010 1:02 PM
To: Tomcat Users List
Subject: RE: connector config for debug scenario

> From: Rick.Wellman [mailto:rick.well...@kiewit.com]
> Subject: RE: connector config for debug scenario
> 
> Hmmm, I'll consider this thread closed but if you have any ideas on
how
> I might force requests to the same thread, then I'm all ears.

Have a dummy webapp that simply does Thread.sleep() calls, make nine
requests to it, then start your real one.

 - 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


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



RE: connector config for debug scenario

2010-07-28 Thread Caldarale, Charles R
> From: Rick.Wellman [mailto:rick.well...@kiewit.com]
> Subject: RE: connector config for debug scenario
> 
> Hmmm, I'll consider this thread closed but if you have any ideas on how
> I might force requests to the same thread, then I'm all ears.

Have a dummy webapp that simply does Thread.sleep() calls, make nine requests 
to it, then start your real one.

 - 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: connector config for debug scenario

2010-07-28 Thread Rick . Wellman
p.s. FWIW, I just noticed this message in my logs also :(

|TOMCAT|WARN |2010-07-28 12:58:53,135|maxThreads setting (1) too low,
set to 10 

-Original Message-
From: Rick.Wellman [mailto:rick.well...@kiewit.com] 
Sent: Wednesday, July 28, 2010 12:59 PM
To: Tomcat Users List
Subject: RE: connector config for debug scenario

Thanks for the correct answer but bad one ;-)
Hmmm, I'll consider this thread closed but if you have any ideas on how
I might force requests to the same thread, then I'm all ears.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, July 28, 2010 12:47 PM
To: Tomcat Users List
Subject: RE: connector config for debug scenario

> From: Rick.Wellman [mailto:rick.well...@kiewit.com]
> Subject: RE: connector config for debug scenario
> 
> Apache Tomcat/5.5.27
> http-12080
> Max threads: 10 Min spare threads: 1 Max spare threads: 1
> Current thread count: 3 Current thread busy: 3

Yes, 5.5 has a minimum value for maxThreads of 10 (just looked at the
code).  This minimum does not appear to exist for 6.0 and later.

 - 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


-
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: connector config for debug scenario

2010-07-28 Thread Rick . Wellman
Thanks for the correct answer but bad one ;-)
Hmmm, I'll consider this thread closed but if you have any ideas on how
I might force requests to the same thread, then I'm all ears.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, July 28, 2010 12:47 PM
To: Tomcat Users List
Subject: RE: connector config for debug scenario

> From: Rick.Wellman [mailto:rick.well...@kiewit.com]
> Subject: RE: connector config for debug scenario
> 
> Apache Tomcat/5.5.27
> http-12080
> Max threads: 10 Min spare threads: 1 Max spare threads: 1
> Current thread count: 3 Current thread busy: 3

Yes, 5.5 has a minimum value for maxThreads of 10 (just looked at the
code).  This minimum does not appear to exist for 6.0 and later.

 - 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


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



RE: connector config for debug scenario

2010-07-28 Thread Caldarale, Charles R
> From: Rick.Wellman [mailto:rick.well...@kiewit.com]
> Subject: RE: connector config for debug scenario
> 
> Apache Tomcat/5.5.27
> http-12080
> Max threads: 10 Min spare threads: 1 Max spare threads: 1
> Current thread count: 3 Current thread busy: 3

Yes, 5.5 has a minimum value for maxThreads of 10 (just looked at the code).  
This minimum does not appear to exist for 6.0 and later.

 - 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: connector config for debug scenario

2010-07-28 Thread Rick . Wellman
My bad; I actually had copied that from the server status page and
forgot to paste into my message:
===
Apache Tomcat/5.5.27
http-12080
Max threads: 10 Min spare threads: 1 Max spare threads: 1 Current thread
count: 3 Current thread busy: 3
...
=

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, July 28, 2010 12:11 PM
To: Tomcat Users List
Subject: RE: connector config for debug scenario

> From: Rick.Wellman [mailto:rick.well...@kiewit.com]
> Subject: connector config for debug scenario
> 
> Is it possible to configure the http connector for only 
> one thread ever?

Care to give us a hint about which Tomcat version you're referring to?

 - 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


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



RE: Tomcat Shutting Down by Itself?

2010-07-28 Thread Robinson, Eric
 
> So we definitely know the process is gone and not that 
> it is only no longer responding?

I'm not 100% certain. I did...

netstat -an|grep ":3057"|grep LISTEN

..and nothing came back. From that we at least know that the process
was no longer listening on its assigned port.

Then I *think* I did a 'ps' and the java process was actually not there,
but now I'm not sure.

> Do we know whether it was an orderly Tomcat shutdown or not? 
> Log messages in the Tomcat log files?

I don't see anything in the logs other than the "shutdown" message I
posted at the beginning of this thread.

> deploy another webapp (needs write access to Tomcat 
> config or deployment area depending on config)
> add a JSP which registers the hook when called (only 
> needs write access to some content directory on the 
> existing webapp)

Those seem like my best two choices. 

--
Eric Robinson





Disclaimer - July 28, 2010 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of . Warning: Although  has taken reasonable precautions to ensure no 
viruses are present in this email, the company cannot accept responsibility for 
any loss or damage arising from the use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

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



RE: connector config for debug scenario

2010-07-28 Thread Caldarale, Charles R
> From: Rick.Wellman [mailto:rick.well...@kiewit.com]
> Subject: connector config for debug scenario
> 
> Is it possible to configure the http connector for only 
> one thread ever?

Care to give us a hint about which Tomcat version you're referring to?

 - 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



connector config for debug scenario

2010-07-28 Thread Rick . Wellman
Is it possible to configure the http connector for only one thread ever?
I am trying to do so but having problems... it seems to not allow a
value less than the default of ten(10) threads.  Any ideas?  Here is the
config I am trying*:

 



 

* I have tried other values in the threads section, which do not work
also, but this seems the most logical to me.



Re: FileDirContext returns the path directly without checking whether the target file really exists

2010-07-28 Thread Ivan
Thanks, if possible, could you please show me where it is ? I am really
interested in those details :-)

2010/7/28 Mark Thomas 

> On 28/07/2010 03:12, Ivan wrote:
> > Yes, Caldarale, I do agree that in the spec, there is no word about
> whether
> > the file should exist (or I miss something anywhere ?), and the spec is
> > always ambigurous :-)
> > As I said in my last post, what makes me feel confusing is that, with
> > current implementation, we never have chance to consider the resources in
> > the META-INF/resources folder.
>
> That has already been taken care of but the time the code reaches this
> point.
>
> Mark
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Ivan


Re: FileDirContext returns the path directly without checking whether the target file really exists

2010-07-28 Thread Mark Thomas
On 28/07/2010 03:12, Ivan wrote:
> Yes, Caldarale, I do agree that in the spec, there is no word about whether
> the file should exist (or I miss something anywhere ?), and the spec is
> always ambigurous :-)
> As I said in my last post, what makes me feel confusing is that, with
> current implementation, we never have chance to consider the resources in
> the META-INF/resources folder.

That has already been taken care of but the time the code reaches this
point.

Mark



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



Re: Tomcat Shutting Down by Itself?

2010-07-28 Thread Rainer Jung

On 28.07.2010 01:01, Robinson, Eric wrote:

2) Use System.getRuntime().addShutdownHook() to trigger your
own thread when the JVM does decide to exit.


Assuming the OP does not have easy access to the running
application, would that mean adding another application
which is launched at Tomcat start, and runs the above ?
Or do you need to do this in the application itself ?


That was my next question, too.


Sorry I don't remember the whole long discussion thread.

So we definiteley know the process is gone and not that it is only no 
longer responding?


Do we know whether it was an orderly Tomcat shutdown or not? Log 
messages in the Tomcat log files?


Assuming it was not: do we know it was an orderly JVM shutdown. Here we 
could use the shutdown hook. You can


- deploy another webapp (needs write access to Tomcat config or 
deployment area depending on config)


- change the existing webapp (i.e. adding a context listner that 
registers the hook during startup; don't need to change existing webapp 
classes)


- add a JSP which registers the hook when called (only needs write 
access to some content directory on the existing webapp)


- Download TC source and add it there (if you can't change anything in 
the webapp or config directories, but can write to the Tomcat classes or 
lib directories.


Or: do you see any hotspot error files, which should be there if the JVM 
crashes and can write to the working directory.If you had a newer JVM 
(recent 1.5 or 1.6) you could add the flag -XX:OnError=... to run a 
command at the moment it crashes.


Concerning special requests which might trigger functionality leading to 
a crash: You could add a filter to the webapp doing a simplified access 
log in front of request processing and then check after crsh, which of 
those were missing in the final access log. To make matching easir, the 
filter could add a request attribute with a unique ID to each request 
and log it, and you can configure your normal access log pattern to also 
include this attribute. So you only have to compare the two ID lists to 
find the reuests, that entered Tomcat but were not finished when it crashed.


Regards,

Rainer

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