How to close DB Connections while shutting down server

2015-02-24 Thread Rajesh Biswas
Dear Experts,

I am using container managed datasource to manage the database connections.

But while shutting down the server I am getting lot of messages like below:

appears to have started a thread named [pool-1-thread-1] but has failed to
stop it. This is very likely to create a memory leak

Would you please suggest any better way so that open connections in Pool
will be gracefully closed while shutting down the application.

Thank you very much

Regards,
Rajesh


Re: Intermittent handshake_failure message Tomcat

2015-02-19 Thread Rajesh Biswas
I am using java version JDK 1.7.0_51.
I have java client running in Linux X64 platform.

Both the commands which you provided are working perfectly for me.

As I mention in my previous mail, the problem is intermittent.

Rajesh

On Thu, Feb 19, 2015 at 7:50 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Rajesh,
>
> On 2/19/15 1:41 AM, Rajesh Biswas wrote:
> > We are facing intermittent ssl handshake failure exception in the
> > client code while connecting the server which runs on Tomcat 7.0.54
> > version.
> >
> > Below is the ssl configuration in server.xml file
> >
> >  > protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150"
> > SSLEnabled="true" scheme="https" secure="true"
> >
> > keystoreFile="/scratch/rajebisw/Certificate/ssl/ibm.ssl.keystore"
> > keystorePass="XXX" clientAuth="false" sslProtocol="TLS" />
> >
> > OS: Solaris Tomcat Version: apache-tomcat-7.0.54
> >
> > Would you please suggest if I miss anything
>
> What version of Java? What client is getting there errors, and what
> are the error messages you are getting?
>
> Can you connect with "openssl s_client"?
>
> I'm suspecting that the client is trying to connect with SSLv3
> protocol which recent versions of Java completely disable by default,
> regardless of your Tomcat configuration.
>
> See http://markmail.org/thread/ip4j45tioft4bntd for more information
> on re-enabling SSLv3. But before you do all that, make sure that SSLv3
> is actually the problem, first.
>
> Here's how to try:
>
> $ openssl s_client -connect host:port
> (This should be successful)
>
> Then, try this:
> $ openssl s_client -ssl3 -connect host:port
> (If this fails, the handshake failures may be due to the client only
> supporting SSLv3)
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJU5fEeAAoJEBzwKT+lPKRY3VEQAMD3W0KX3PYAwbEefaI2zaWF
> PCzAv/OzQH4yA0z7AJozZcVsHA7y4lgUygTnYLY2wm5dO3b33FN97plOvTOsjl/W
> qXZUojNJ1fw79LSXVvTlDRKYU+R59PNWnRE6Hnu6RhK0WrGxNyvYeiatbKWpu6DT
> mLZkupJpb/crAdrqxOPm8LUZLza0ea9JlvD9dqObGAsEx2NdRpw6ME3PBUAa4IJW
> fzzzUZAmUkiJBBIkOlgy/JP+wtOvz7Rwp2VN7zS7kJbAtWf7Jv7XsjW+kBECNoLP
> a4n1ElR/qdfwwIeRvivoodrO6oY/+S0/mwdK91yGsQpb1Bk3iMX1O753TA84Nnu1
> 4dnvBu2VCcv+BtaBKaCHiA7NVAXW4tbKcMiF7ttCGCeoUFy/Ej4mDjqSWSreyFe5
> BQ2lwFNh61Uu/ftD3vNhvFubiKZNziXWMmCWz74EAC/n/8dtDIUe/a0KrNlk6hnr
> seHzZpZ9hIAmQQvuzM7uML/8dG+VIWlffxDW4lGWz9J/eJsF3g11a6f+DVy2122d
> fG6SMGY1Uwr8TX5Pub8FPMWXXAXx//RxqYNebhPOw7nkTjfIc+Q7mwi7hTUDAvPF
> JX7tdFeJUU8lAPoOhrix2j8YL7GH0FYQuj6b9q17E02UPeX1p8BVP0AzfOZaNQb0
> 4dhjg0c83mavN0FoNJoR
> =kRBZ
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Intermittent handshake_failure message Tomcat

2015-02-18 Thread Rajesh Biswas
Dear Experts,

We are facing intermittent ssl handshake failure exception in the client
code while connecting the server which runs on Tomcat 7.0.54 version.

Below is the ssl configuration in server.xml file

 

OS: Solaris
Tomcat Version: apache-tomcat-7.0.54

Would you please suggest if I miss anything

Regards,
Rajesh


500 Error in Tomcat 7.54

2015-02-07 Thread Rajesh Biswas
Hello Experts,

I am facing one critical issues with respect to SSL communication between
java client and Tomcat Server (version 7.0.54).

The problem is happening only the tomcat server installed in IOS Mavarick
machine, and the problem is intermittent.(Windows machine the problem is
not occuring)

I installed the generic version of tomcat in Mac OS
(apache-tomcat-7.0.54.zip distribution)

I did check in access log but I did not get any error message, but from
client I am getting HTTP 500 code, the request is not reaching to
application.

Would you please provide me pointers to debug as I did not get any server
log to start debug the issue.

Please help me with your suggestion.

Rajesh


Exception page after installation of Tomcat 7.0.54

2015-01-30 Thread Rajesh Biswas
Dear Experts,

I have installed Apache Tomcat 7.0.54, after installation when I
open https://host_name:port_number I am getting below exception

org.apache.jasper.JasperException: java.lang.IllegalStateException: No
Java compiler available

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:391)


But I am able to open https://host_name:port_number/manager/html page
and can be able proceed with normal operation.


Would you please suggest.


Rajesh


Re: SSL issue in tomcat

2015-01-20 Thread Rajesh Biswas
Hello,

Please keep SSLEnabled="true" along with your existing configuration



Rajesh

On Tue, Jan 20, 2015 at 2:47 PM, Jason Y  wrote:

> Hi folks,
>
> Recently my application cannot be accessible in browser with https version.
> I think it is due to vulnerability in ssl 3.0 issue.
>
> I checked my tomcat configuration and replaced sslProtocol="TLS" with
> sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" to disable SSL 3.0.
>
>  >connectionTimeout="2"
> >redirectPort="8443" />
> >  > protocol="org.apache.coyote.http11.Http11Protocol"
> >maxThreads="150" SSLEnabled="true" scheme="https"
> > secure="true"
> >clientAuth="false"
> > sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" keystoreFile="xxx"
> > keystorePass="xxx" />
> > 
>
>
> Then I can open my application https link in browser. BUT, good time never
> lasts too long, after several hours, I failed to access my https link
> again.
>
> Anyone has any ideas about this? please share your suggestions...My tomcat
> version is 7.0.55
>
> Thank you all very much.
>
> On Tue, Jan 20, 2015 at 3:56 PM, Jason Y  wrote:
>
> > Hi folks,
> >
> > Recently my application cannot be accessible in browser with https
> > version. I think it is due to vulnerability in ssl 3.0 issue.
> >
> > I checked my tomcat configuration and replaced sslProtocol="TLS" with
> > sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" to disable SSL 3.0.
> >
> >  >>connectionTimeout="2"
> >>redirectPort="8443" />
> >>  >> protocol="org.apache.coyote.http11.Http11Protocol"
> >>maxThreads="150" SSLEnabled="true" scheme="https"
> >> secure="true"
> >>clientAuth="false"
> >> sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" keystoreFile="xxx"
> >> keystorePass="xxx" />
> >> 
> >
> >
> > Then I can open my application https link in browser. BUT, good time
> never
> > lasts too long, after several hours, I failed to access my https link
> > again.
> >
> > Anyone has any ideas about this? please share your suggestions...My
> tomcat
> > version is 7.0.55
> >
> > Thank you all very much.
> >
>


Re: Facing SSL Exception in Tomcat 7.57 using Java

2015-01-20 Thread Rajesh Biswas
Thanks for your support and suggestion, the client code will be distributed
to many clients as command line interface, so changing the JDK with 1.7
will take time and effort.

I found the way to set the SSL property in JDK6 and JDK5, after the below
changes code is working fine:

 System.setProperty( "https.protocols", "TLSv1" );

Hope it will work for any OS and any JDK greater than 1.5

Regards,
Rajesh

On Tue, Jan 20, 2015 at 9:17 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Rajesh Biswas [mailto:rajesh...@gmail.com]
> > Subject: Re: Facing SSL Exception in Tomcat 7.57 using Java
>
> > Would you please pin point the issue why it is not working in JDK5, where
> > can I set the TLS property.
>
> Note that JRE/JDK 5 has not been supported in some years; the last public
> release was in October 2009.  As I recall, Oracle never updated that level
> for the various TLS/SSL errors recently discovered, including the more
> advanced configuration options.
>
> Any use of JRE/JDK 5 at this point borders on the irresponsible.
>
>  - 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: Facing SSL Exception in Tomcat 7.57 using Java

2015-01-19 Thread Rajesh Biswas
Hello Mark,

I have some more points to mention.

The SSL is not working from my Java client which is ran on JDK5, but same
is working on JDK7.

I put some debug statement to print the SSL version client is running.

For JDK I am getting NONE, for JDK7 I am getting TLSv1

Below is my statement:

SSLSocketFactory factory =
(SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket socket =
(SSLSocket)factory.createSocket(url.getHost(), 4743);
System.out.println( socket.getSession().getProtocol());

When I am running on JDK5 I am getting output as NONE

When I am running on JDK7 I am getting output as TLSv1

Would you please pin point the issue why it is not working in JDK5, where
can I set the TLS property.



On Tue, Jan 20, 2015 at 7:41 AM, Rajesh Biswas  wrote:

> Hello Mark,
>
> Thank you for your reply.
>
> I have de-select the User SSL 3.0 option from Control Panel ---> Java >
> Advanced Tab
>
> Still I am not able to connect.
>
> Is there any other place I need to disable SSL v.3
>
> Rajesh
>
> On Tue, Jan 20, 2015 at 12:32 AM, Mark Thomas  wrote:
>
>> On 19/01/2015 17:33, Rajesh Biswas wrote:
>> > I am facing issues running the application in SSL with latest version of
>> > tomcat 7.57, same is working in 7.40. Below is the configuration in my
>> > server.xml file
>> >
>> > " keystorePass="xxx" clientAuth="false" sslProtocol="TLS" />
>> >
>> > I am getting ssl handshake error while I am trying to access the
>> > application through stand alone java client(I am using
>> > javax.net.ssl.HttpsURLConnection to get the connection)
>> >
>> > Same is working fine in tomcat 7.40 and also 7.56 with same
>> configuration.
>> > I am using 64 Bit JDK7
>> >
>> > Also interesting point here I am able to access through web URL using
>> > https, while I am trying to connect from Java program I am getting error
>> >
>> > Would you please suggest I am missing any configutaion?
>>
>> I'd guess your client is trying to use SSLv3 which Tomcat now disables
>> by default.
>>
>> Mark
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>


Re: Facing SSL Exception in Tomcat 7.57 using Java

2015-01-19 Thread Rajesh Biswas
Hello Mark,

Thank you for your reply.

I have de-select the User SSL 3.0 option from Control Panel ---> Java >
Advanced Tab

Still I am not able to connect.

Is there any other place I need to disable SSL v.3

Rajesh

On Tue, Jan 20, 2015 at 12:32 AM, Mark Thomas  wrote:

> On 19/01/2015 17:33, Rajesh Biswas wrote:
> > I am facing issues running the application in SSL with latest version of
> > tomcat 7.57, same is working in 7.40. Below is the configuration in my
> > server.xml file
> >
> > " keystorePass="xxx" clientAuth="false" sslProtocol="TLS" />
> >
> > I am getting ssl handshake error while I am trying to access the
> > application through stand alone java client(I am using
> > javax.net.ssl.HttpsURLConnection to get the connection)
> >
> > Same is working fine in tomcat 7.40 and also 7.56 with same
> configuration.
> > I am using 64 Bit JDK7
> >
> > Also interesting point here I am able to access through web URL using
> > https, while I am trying to connect from Java program I am getting error
> >
> > Would you please suggest I am missing any configutaion?
>
> I'd guess your client is trying to use SSLv3 which Tomcat now disables
> by default.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Facing SSL Exception in Tomcat 7.57 using Java

2015-01-19 Thread Rajesh Biswas
I am facing issues running the application in SSL with latest version of
tomcat 7.57, same is working in 7.40. Below is the configuration in my
server.xml file

" keystorePass="xxx" clientAuth="false" sslProtocol="TLS" />

I am getting ssl handshake error while I am trying to access the
application through stand alone java client(I am using
javax.net.ssl.HttpsURLConnection to get the connection)

Same is working fine in tomcat 7.40 and also 7.56 with same configuration.
I am using 64 Bit JDK7

Also interesting point here I am able to access through web URL using
https, while I am trying to connect from Java program I am getting error

Would you please suggest I am missing any configutaion?