0

I am getting errors while trying to get an SSL enabled app running on a tomcat 6.x server. APR is enabled.

I created the certificates like so:

openssl genrsa -des3 -out key.pem 2048
passphrase

openssl req -new -x509 -key key.pem -out cert.pem -days 1095
passphrase

My ssl configuration looks like so:

<Connector protocol="org.apache.coyote.http11.Http11AprProtocol"
           port="8444" minSpareThreads="5" maxSpareThreads="75"
           enableLookups="true" disableUploadTimeout="true"
           acceptCount="100"  maxThreads="200"
     scheme="https" secure="true" SSLEnabled="true"
           clientAuth="false" sslProtocol="TLS"
                   SSLCertificateFile="/usr/local/tomcat/conf/ssl/cert.pem"
           SSLCertificateKeyFile="/usr/local/tomcat/conf/ssl/key.pem"
                  SSLPassword="passphrase"/>
           />

You may notice that the ports are non standard. This is because I have two separate tomcat applications on this system and they both use SSL. I don't think this is the problem because even if I shutdown the other tomcat and only run the problem tomcat instance I get the same error.

So one instance uses 8080/8443 and the problem one uses 8081/8444.
The good instance of tomcat always works perfectly. The problem install works fine without ssl. I have tried only running the problem instance but I still get the same problem, so I don't think the issue is related to this but thought I should disclose. I also tried using the functioning tomcat's ssl key and cert on the bad one and still got the same errors so I don't think it is that either.

Hence, I am perplexed.

Here are the errors I keep getting:

SEVERE: Error initializing endpoint java.lang.Exception: Invalid Server SSL Protocol
        at org.apache.tomcat.jni.SSLContext.make(Native Method)
        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:680)
        at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)


LifecycleException:  Protocol handler initialization failed: java.lang.Exception: Invalid Server SSL Protocol
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
        at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
        at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:530)

SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [98] Address already in use
        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
        at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:717)
        at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
        at org.apache.catalina.connector.Connector.start(Connector.java:1131)
        at org.apache.catalina.core.StandardService.start(StandardService.java:531)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)

LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.lang.Exception: Socket bind failed: [98] Address already in use
        at org.apache.catalina.connector.Connector.start(Connector.java:1138)
        at org.apache.catalina.core.StandardService.start(StandardService.java:531)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        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.start(Bootstrap.java:288)

Help appreciated.

springcorn
  • 611
  • 2
  • 15
  • 28

1 Answers1

0

Change the protocol from "org.apache.coyote.http11.Http11AprProtocol" to "org.apache.coyote.http11.Http11NioProtocol" in the tag." and try once

Zyber
  • 428
  • 4
  • 21