TOMCAT SSL Configuration

Source: Internet
Author: User

Recently configuring the Tomcat certificate encounters such a problem, simply share the following:

The error message is as follows:

06-dec-2016 11:26:35.079 severe [main]  org.apache.catalina.core.standardservice.initinternal failed to initialize connector  [Connector[http/1.1-443]] org.apache.catalina.lifecycleexception: failed to initialize  component [connector[http/1.1-443]]at org.apache.catalina.util.lifecyclebase.init ( lifecyclebase.java:111) 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:873) at  Org.apache.catalina.util.LifecycleBase.init (lifecyclebase.java:107) at  Org.apache.catalina.startup.Catalina.load (catalina.java:606) at org.apache.catalina.startup.catalina.load ( catalina.java:629) 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:311) At org.apache.catalina.startup.bootstrap.main (bootstrap.java:494) Caused by:  org.apache.catalina.lifecycleexception: protocol handler initialization failedat  Org.apache.catalina.connector.Connector.initInternal (connector.java:1012) at  Org.apache.catalina.util.LifecycleBase.init (lifecyclebase.java:107) ... 12 morecaused by:  java.lang.illegalargumentexception: java.io.ioexception: alias name tomcat does  not identify a key entryat  Org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext (abstractjsseendpoint.java:103) at  ORG.APACHE.TOMCAT.UTIL.NET.ABSTRACTJSSEENDPOINT.INITIALISESSL (abstractjsseendpoint.java:81) at  Org.apache.tomcat.uTil.net.NioEndpoint.bind (nioendpoint.java:245) At org.apache.tomcat.util.net.abstractendpoint.init ( abstractendpoint.java:866) At org.apache.tomcat.util.net.abstractjsseendpoint.init ( abstractjsseendpoint.java:213) At org.apache.coyote.abstractprotocol.init (AbstractProtocol.java:558) at  org.apache.coyote.http11.abstracthttp11protocol.init (abstracthttp11protocol.java:65) at  Org.apache.catalina.connector.Connector.initInternal (connector.java:1010) ...  13 morecaused by:  java.io.ioexception: alias name tomcat does not identify a key  entryat org.apache.tomcat.util.net.jsse.jsseutil.getkeymanagers (jsseutil.java:213) at  Org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext (abstractjsseendpoint.java:101) ...  20  more This problem is because the alias is not set, Tomcat will use "Tomcat" as your jks etc by default. The alias of the certificate file, because the certificate file alias is not the "Tomcat" by default in most cases, so long as the certificate alias is viewed through the Keytool tool: Command >> keytool -keystore  xxx.jks&nbsp-list Enter the password to see the alias alias, in the configuration file added: keyalias= "alias alias"  , details as shown below. 


Keytool-keystore m.jks-list

Keystore type:jkskeystore provider:sunyour Keystore contains 1 entryserver (alias), Dec 6, Privatekeyentry (entry type), Cert Ificate fingerprint (SHA1): ae:49:98:23:0f:5e:28:58:01:6c:6d:e0:65:12:b5:70:75:64:ea:38


In the Tomcat server.xml file configuration


<connector port= "443" protocol= "http/1.1" sslenabled= "true"

maxthreads= "Scheme=" "https" secure= "true"

Keystorefile= "/usr/local/tomcat/conf/my.jks" keystorepass= "password" keyalias= "Server "

Clientauth= "false" sslprotocol= "TLS"/>


Restart Tomcat, browser access

TOMCAT SSL Configuration

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.