tomcat 啟動 認證異常java.io.IOException: Alias name [cas] does not identify a key entry

來源:互聯網
上載者:User

標籤:poi   manager   過程   start   ESS   creates   ssl   protoc   .net   

  在搭建CAS server的過程中,Tomcat開啟https,配置秘鑰認證,認證是通過keytool產生的

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"               clientAuth="true" sslProtocol="TLS" keystoreFile="/home/workspace/server.keystore"                 keystorePass="111111"/>

  啟動tamcat後,提示如下報錯

org.apache.catalina.LifecycleException: Failed to initialize component [Connector[org.apache.coyote.http11.Http11Protocol-8443]]    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)    at org.apache.catalina.startup.Catalina.load(Catalina.java:632)    at org.apache.catalina.startup.Catalina.load(Catalina.java:655)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.lang.reflect.Method.invoke(Method.java:498)    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed    at org.apache.catalina.connector.Connector.initInternal(Connector.java:995)    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)    ... 12 moreCaused by: java.lang.IllegalArgumentException: Alias name [null] does not identify a key entry    at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:116)    at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:87)    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:225)    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1086)    at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:268)    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581)    at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:68)    at org.apache.catalina.connector.Connector.initInternal(Connector.java:993)    ... 13 moreCaused by: java.io.IOException: Alias name [null] does not identify a key entry    at org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:242)    at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:114)    ... 20 more

  解決

  重建秘鑰,並且通過keytool -list -keystore thekeystore

檢查秘鑰的類型,是PrivateKeyEntry就正常了。

  • PrivateKeyEntry,為私密金鑰,配置在tomcat的server.xml(CAS服務端)
  • trustedCertEntry,為公開金鑰,配置在jdk(應用服務端)

tomcat 啟動 認證異常java.io.IOException: Alias name [cas] does not identify a key entry

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.