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