Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Problems with Tomcat + ssl

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
I'm trying to get an encryption for my Tomcat 6 running, but up till now I fail miserably. I tried to follow this two Tutorials (http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/) and (http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html) but I always get the ssl_error_rx_record_too_long error in the end. Numberous forum post suggest to edit the <VirtualHost *:443> tag, but gues what, Tomcat has none, only Apache has.

The interessting parts of the server.xml look like this:

<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

<Connector protocol="org.apache.coyote.http11.Http11AprProtocol" port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="../webapps/test.bin"
keystorePass="****" />

The commad which I used for generating the certificate was:
keytool -genkey -alias tomcat -keyalg RSA (I tried it with and without the option -selfcert)

Has someone an idea what could be wrong?

Greetings Ole


 
Saloon Keeper
Posts: 23536
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Ole.

That message comes from Apache, not Tomcat. So yes, you need to fix Apache.

When you front Tomcat with Apache, you instruct Apache to forward requests over a connector. Instead of using the direct-in default Tomcat ports of 8080 (http) and 8443 (https), you'd normally use the more common ports 80 (http) and 443 (https) in Apache. Apache would then forward to the Tomcat ports when it detects a Tomcat URL (as defined in Apache's config files).
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it's easy to fix, you only delete tc-native.dll in document bin of tomcat. With tomcat6, it has tc-native.dll, therefor it uses apr, if you want to apr, you should read apr documents
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic