Tomcat Boot Certificate exception java.io.IOException:Alias name [CAS] does not identify a key entry

Source: Internet
Author: User
Tags app service cas

In the process of building CAS server, Tomcat turns on HTTPS, configures the key certificate, and the certificate is generated by Keytool

<connector port="8443"Protocol="Org.apache.coyote.http11.Http11Protocol"MaxThreads=" Max"Sslenabled="true"Scheme="HTTPS"Secure="true"ClientAuth="true"Sslprotocol="TLS"keystorefile="/home/workspace/server.keystore"Keystorepass="111111"/>

After starting the Tamcat, prompt the following error

Org.apache.catalina.LifecycleException:Failed to initialize component [connector[ org.apache.coyote.http11.http11protocol-8443] at Org.apache.catalina.util.LifecycleBase.init (Lifecyclebase.java: the) 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: +) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) 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)    ...  Amorecaused by:java.lang.IllegalArgumentException:Alias Name [NULL] does not identify a key entry at Org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext (abstractjsseen Dpoint.java: the) at ORG.APACHE.TOMCAT.UTIL.NET.ABSTRACTJSSEENDPOINT.INITIALISESSL (Abstractjsseendpoint.java: the) 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: the) at Org.apache.catalina.connector.Connector.initInternal (Connector.java:993)    ...  -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: the)    ...  -More

Solve

Regenerate the secret key and passkeytool -list -keystore thekeystore

Check the type of secret key, it is Privatekeyentry is normal.

    • Privatekeyentry, for the private key, configured on Tomcat's Server.xml (CAS service side)
    • Trustedcertentry, for public key, configured on JDK (app service side)

Tomcat Boot Certificate exception java.io.IOException:Alias name [CAS] does not identify a key entry

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.