ssl - 在启用 SSL 的情况下启动 Tomcat 6 时出错

标签 ssl protocols tomcat6 http-1.1

我最近从 godaddy 获得了 ssl 证书。我正确创建了 keystore 并将以下内容放入我的 server.xml 中:

 <Connector port="8443" protocol="org.apache.coyote.Http11Protocol" SSLEnabled="true"
               maxThreads="200" scheme="https" secure="true" keystoreFile="C:\SSLCerts\mykeystore.keystore" keystorePass="password"
               clientAuth="false" sslProtocol="TLS" />

我最初有协议(protocol)=“HTTP/1.1”,但我收到一条错误,指出 keystoreFile 和 keystorePass 没有匹配的值。这导致端口 8443 上出现绑定(bind)错误。我运行了 netstat 并确保 8443 上没有任何运行;做了一些谷歌搜索,发现可以解决该问题以更改上述协议(protocol)。

添加该更改后,我收到以下错误:

SEVERE: Failed to start connector [Connector[org.apache.coyote.Http11Protocol-84
43]]
LifecycleException:  service.getName(): "Catalina";  Protocol handler start fail
ed: java.lang.NullPointerException
        at org.apache.catalina.connector.Connector.start(Connector.java:1102)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
40)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jun 21, 2012 1:23:57 PM org.apache.coyote.ajp.AjpAprProtocol start

有谁知道需要做什么才能解决这个问题?

最佳答案

protocol="org.apache.coyote.Http11Protocol" 不是有效的协议(protocol)。您需要 protocol="org.apache.coyote.http11.Http11Protocol"。请注意您缺少的额外 http11 包。

这可能会让您回到 key 存储的问题。

关于ssl - 在启用 SSL 的情况下启动 Tomcat 6 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11139336/

相关文章:

ssl - 使用单个证书保护 api 子域

swift - Swift 协议(protocol)中的弱属性只能是类或类绑定(bind)协议(protocol)类型

ios - 重新分配SKScene委托(delegate)协议(protocol)

swift - 如何在 Swift 存储属性中创建协议(protocol)及其扩展?

java - JAX-RS REST 服务如何通过注释处理身份验证?

postgresql - Npgsql Visual Studio 客户端 SSL 证书

android - 在通过 jmeter/burpsuite 为 Android/iOS 应用程序代理 session 时添加 SSL 证书异常

android - 所有设备的 Android Trusted Credentials 中的凭据是否?

java - 检查 solr/home 属性和日志。 ClassCastException : class org. apache.lucene.analysis.icu.ICUFoldingFilterFactory

java - 查找 tomcat6 中特定应用程序的类加载器中的 jar