You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chad Lehman <ic...@hotmail.com> on 2008/03/02 02:38:10 UTC

Problems Configuring SSL / JSSE

Hello,


Tomcat 6.0.14 serves HTTP just fine. HTTPS isn't working; eventually the request times out (Firefox) with the message "The Connection Was Interrupted". The dialog describing the certificate never comes up.

I've done the .keystore stuff as outlined in the docs. Created the self-signed certificate. Removed the comment tags from this relevant part of server.xml:

    

All that was done is adding the "keystoreFile" and "keystorePass" attributes. The .keystore file is in my user directory (Windows Vista).

Errors come back when reloading the context or restarting Tomcat:

SEVERE: Error initializing socket factory
java.lang.ClassNotFoundException: Can't find any SSL implementation... 

(etc...)

This application is being deployed through Eclipse (Europa), on Windows Vista.

I've looked all over/searched the mailing list archives/marc.info/etc and not found anything that goes solves the issue.

Thank you for any help.


Chad
_________________________________________________________________
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by Chad Lehman <ic...@hotmail.com>.
[ISSUE RESOLVED]

> Subject: RE: Problems Configuring SSL / JSSE
> Date: Sat, 1 Mar 2008 21:54:09 -0600
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
>
>> From: Chad Lehman [mailto:icbiass@hotmail.com]
>> Subject: RE: Problems Configuring SSL / JSSE
>>
>> INFO: The Apache Tomcat Native library which allows optimal
>> performance in production environments was not found on the
>> java.library.path...
>
> Good; that means APR really isn't installed.
>
>> Otherwise, the logs don't appear to be generated when Tomcat
>> is run from Eclipse.
>
> They're generated, but they may be well hidden. Try running Tomcat by
> itself, not under Eclipse; sometimes IDEs create more confusion than
> they're worth.
>
>> INFO: Starting Coyote HTTP/1.1 on http-443
>> Mar 1, 2008 8:19:35 PM org.apache.jk.common.ChannelSocket init
>
> The associated timestamp line actually precedes the INFO, WARNING, etc.,
> line, so you've actually got pieces of two separate log entries there.
> It does indicate that port 443 is active.
>
>> When I browse jasper.jar, I see that org.apache.jk is an
>> empty package. Could that be a problem?
>
> No, and jasper.jar has nothing to do with Tomcat operating as a server;
> it's only for compilation of JSP files.
>
>> Additionally, I tried to put "import org.apache.jk.server;"
>> into a dummy servlet
>
> You're off in the weeds here. The jk module is used for communication
> between httpd (which you don't have or need) and Tomcat itself. In
> fact, you should probably comment out the AJP , normally on
> port 8009 - you won't be using it, and it just consumes resources
> (albeit not much).
>
> Clean things up, run Tomcat by itself, and see what happens. Look in
> the logs for any problems.

Chuck,

Running Tomcat by itself worked. Some .jar file I inserted into Eclipse is messing something up, I suppose.

Thanks a lot for the help!

+1

Chad
_________________________________________________________________
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Chad Lehman [mailto:icbiass@hotmail.com] 
> Subject: RE: Problems Configuring SSL / JSSE
> 
> INFO: The Apache Tomcat Native library which allows optimal 
> performance in production environments was not found on the 
> java.library.path...

Good; that means APR really isn't installed.

> Otherwise, the logs don't appear to be generated when Tomcat 
> is run from Eclipse. 

They're generated, but they may be well hidden.  Try running Tomcat by
itself, not under Eclipse; sometimes IDEs create more confusion than
they're worth.

> INFO: Starting Coyote HTTP/1.1 on http-443
> Mar 1, 2008 8:19:35 PM org.apache.jk.common.ChannelSocket init

The associated timestamp line actually precedes the INFO, WARNING, etc.,
line, so you've actually got pieces of two separate log entries there.
It does indicate that port 443 is active.

> When I browse jasper.jar, I see that org.apache.jk is an 
> empty package. Could that be a problem?

No, and jasper.jar has nothing to do with Tomcat operating as a server;
it's only for compilation of JSP files.  

> Additionally, I tried to put "import org.apache.jk.server;"
> into a dummy servlet

You're off in the weeds here.  The jk module is used for communication
between httpd (which you don't have or need) and Tomcat itself.  In
fact, you should probably comment out the AJP <Connector>, normally on
port 8009 - you won't be using it, and it just consumes resources
(albeit not much).

Clean things up, run Tomcat by itself, and see what happens.  Look in
the logs for any problems.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by Chad Lehman <ic...@hotmail.com>.


> Subject: RE: Problems Configuring SSL / JSSE
> Date: Sat, 1 Mar 2008 21:15:56 -0600
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
>
>> From: Chad Lehman [mailto:icbiass@hotmail.com]
>> Subject: RE: Problems Configuring SSL / JSSE
>>
>> The version is Java HotSpot Client VM 1.6.0_03-b05 (according
>> to java -version).
>
> That definitely has JSSE built in. Whatever you downloaded is for a
> much older JRE level, and most likely is the cause of the exceptions
> you're now seeing. Get back to where you were, and look in the logs for
> the real problem.

Chuck, 

Thank you for all the help so far. I undid the previous step. Back to square one. In the console window of Eclipse there's this:

INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path...

Otherwise, the logs don't appear to be generated when Tomcat is run from Eclipse. 

Additionally, there's this: 

INFO: Starting Coyote HTTP/1.1 on http-443
Mar 1, 2008 8:19:35 PM org.apache.jk.common.ChannelSocket init

...which indicates that Tomcat is being told to start a Connector on 443, doesn't it? That comes after the exceptions are listed in the log.

---
When I browse jasper.jar, I see that org.apache.jk is an empty package. Could that be a problem? Additionally, I tried to put "import org.apache.jk.server;" into a dummy servlet, and Eclipse complained that it could not be resolved (found). Could that be what's wrong?


Chad
_________________________________________________________________
Need to know the score, the latest news, or you need your HotmailĀ®-get your "fix".
http://www.msnmobilefix.com/Default.aspx
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Chad Lehman [mailto:icbiass@hotmail.com] 
> Subject: RE: Problems Configuring SSL / JSSE
> 
> The version is Java HotSpot Client VM 1.6.0_03-b05 (according 
> to java -version).

That definitely has JSSE built in.  Whatever you downloaded is for a
much older JRE level, and most likely is the cause of the exceptions
you're now seeing.  Get back to where you were, and look in the logs for
the real problem.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by Chad Lehman <ic...@hotmail.com>.


> Subject: RE: Problems Configuring SSL / JSSE
> Date: Sat, 1 Mar 2008 20:57:11 -0600
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
>
>> From: Chad Lehman [mailto:icbiass@hotmail.com]
>> Subject: RE: Problems Configuring SSL / JSSE
>>
>> Thanks again. I must've been blind the first time I set this
>> up, because I didn't see the part about the JSSE extensions
>> being installed. They weren't.
>
> You don't need the JSSE extensions - they're included with all JVM
> levels that Tomcat 6 runs on. You need to undo whatever you did, since
> that is likely to cause classloader problems when you have the same
> classes in multiple places in a given classloader hierarchy branch.
>
> Make sure you're looking at the doc for Tomcat 6, not anything older.
>
> What JVM version are you using?

Chuck,

The version is Java HotSpot Client VM 1.6.0_03-b05 (according to java -version).

_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Chad Lehman [mailto:icbiass@hotmail.com] 
> Subject: RE: Problems Configuring SSL / JSSE
> 
> Thanks again. I must've been blind the first time I set this 
> up, because I didn't see the part about the JSSE extensions 
> being installed. They weren't.

You don't need the JSSE extensions - they're included with all JVM
levels that Tomcat 6 runs on.  You need to undo whatever you did, since
that is likely to cause classloader problems when you have the same
classes in multiple places in a given classloader hierarchy branch.

Make sure you're looking at the doc for Tomcat 6, not anything older.

What JVM version are you using?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by Chad Lehman <ic...@hotmail.com>.
Chuck,


Thanks again. I must've been blind the first time I set this up, because I didn't see the part about the JSSE extensions being installed. They weren't.
However, I went and downloaded them, unzipped the .jars into the %JAVA_HOME%\jre\lib\ext directory, and am coming up with new errors:

INFO: Initializing Coyote HTTP/1.1 on http-80
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Caused by: java.lang.ExceptionInInitializerError
    at sun.text.normalizer.NormalizerBase.decompose(NormalizerBase.java:707)
    at sun.text.normalizer.NormalizerBase$NFKDMode.normalize(NormalizerBase.java:348)
    at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1592)
    at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1573)
    at java.text.Normalizer.normalize(Normalizer.java:146)
    at sun.security.x509.AVA.toRFC2253CanonicalString(AVA.java:986)
(ETC...)
Caused by: java.lang.RuntimeException: could not locate data
    at sun.text.normalizer.NormalizerImpl.<clinit>(NormalizerImpl.java:44)
    ... 53 more


Thanks

Chad


> Subject: RE: Problems Configuring SSL / JSSE
> Date: Sat, 1 Mar 2008 20:14:27 -0600
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> 
> > From: Chad Lehman [mailto:icbiass@hotmail.com] 
> > Subject: RE: Problems Configuring SSL / JSSE
> > 
> > There is no tcnative-1.dll here.
> 
> If that's the case, then there should be an entry in the logs about APR
> not being available; make sure that's the case.
> 
> Anything else in the logs, either during Tomcat startup or when you're
> actually trying to make the connection?  The catalina.*.log should show
> each connector starting up.
> 
> Your <Connector> settings are almost identical to mine, other than I
> don't use a variable in the keystoreFile attribute; try changing that to
> an explict absolute path.  Also make sure the redirectPort is set to 443
> in your port 80 <Connector>, and that you really did uncomment the 443
> 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 start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
Need to know the score, the latest news, or you need your HotmailĀ®-get your "fix".
http://www.msnmobilefix.com/Default.aspx

Re: Problems Configuring SSL / JSSE

Posted by Martin Gainty <mg...@hotmail.com>.
According to the doc If you are using APR make sure the
SSLEngine="NonCatalinaEngine"
although in my configuration I only see Catalina and Standalone engines

question I have is Should the op configure his SSLEngine="Standalone" ?

Martin
----- Original Message -----
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Saturday, March 01, 2008 9:14 PM
Subject: RE: Problems Configuring SSL / JSSE


> From: Chad Lehman [mailto:icbiass@hotmail.com]
> Subject: RE: Problems Configuring SSL / JSSE
>
> There is no tcnative-1.dll here.

If that's the case, then there should be an entry in the logs about APR
not being available; make sure that's the case.

Anything else in the logs, either during Tomcat startup or when you're
actually trying to make the connection?  The catalina.*.log should show
each connector starting up.

Your <Connector> settings are almost identical to mine, other than I
don't use a variable in the keystoreFile attribute; try changing that to
an explict absolute path.  Also make sure the redirectPort is set to 443
in your port 80 <Connector>, and that you really did uncomment the 443
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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Chad Lehman [mailto:icbiass@hotmail.com] 
> Subject: RE: Problems Configuring SSL / JSSE
> 
> There is no tcnative-1.dll here.

If that's the case, then there should be an entry in the logs about APR
not being available; make sure that's the case.

Anything else in the logs, either during Tomcat startup or when you're
actually trying to make the connection?  The catalina.*.log should show
each connector starting up.

Your <Connector> settings are almost identical to mine, other than I
don't use a variable in the keystoreFile attribute; try changing that to
an explict absolute path.  Also make sure the redirectPort is set to 443
in your port 80 <Connector>, and that you really did uncomment the 443
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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by Chad Lehman <ic...@hotmail.com>.
Hi Chuck,

Thank you for the reply. I'd actually seen your responses to this in the archives, but I don't have APR enabled. There is no tcnative-1.dll here.

I'm wondering if there's some .jar file I'm missing or something.

Thanks again.


Chad

> Subject: RE: Problems Configuring SSL / JSSE
> Date: Sat, 1 Mar 2008 19:45:55 -0600
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> 
> > From: Chad Lehman [mailto:icbiass@hotmail.com] 
> > Subject: Problems Configuring SSL / JSSE
> > 
> > I've done the .keystore stuff as outlined in the docs. 
> 
> Do you have APR enabled?  (Likely, on a Windows installation.)  If so,
> you ignored the big, bold note in the doc about using OpenSSL rather
> than JSSE.  Either follow the APR instructions for SSL, or rename the
> tcnative-1.dll in Tomcat's bin directory to start using JSSE.
> 
> SSL using JSSE:
> http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
> 
> SSL using APR/OpenSSL:
> http://tomcat.apache.org/tomcat-6.0-doc/apr.html#HTTPS
> 
>  - 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 start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008

RE: Problems Configuring SSL / JSSE

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Chad Lehman [mailto:icbiass@hotmail.com] 
> Subject: Problems Configuring SSL / JSSE
> 
> I've done the .keystore stuff as outlined in the docs. 

Do you have APR enabled?  (Likely, on a Windows installation.)  If so,
you ignored the big, bold note in the doc about using OpenSSL rather
than JSSE.  Either follow the APR instructions for SSL, or rename the
tcnative-1.dll in Tomcat's bin directory to start using JSSE.

SSL using JSSE:
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

SSL using APR/OpenSSL:
http://tomcat.apache.org/tomcat-6.0-doc/apr.html#HTTPS

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problems Configuring SSL / JSSE

Posted by Chad Lehman <ic...@hotmail.com>.
Looks like my email client removed the tag I pasted from the server.xml file:

    <Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               keystoreFile="${user.home}/.keystore" 
               keystorePass="changeit"
               clientAuth="false" sslProtocol="TLS" />

Sorry about that.

Chad
_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org