title: ssl tomcat certificate error
body: <p>I followed the following steps at <a href="http://www.globalsign.com/support/install/install_tomcat.php" rel="nofollow">http://www.globalsign.com/support/install/install_tomcat.php</a>, using the following entry in <code>server.xml</code>:</p>
  
  <pre><code>&lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" 
      keystoreFile="D:\Tomcat\ukdp.keystore" keystorePass="123456" keyAlias="ukdp"
             maxThreads="150" scheme="https" secure="true"
             clientAuth="false" sslProtocol="TLS" /&gt;
  </code></pre>
  
  <p>But the following exception occurs during startup:</p>
  
  <pre><code>SEVERE: Error initializing endpoint
  java.io.IOException: Alias name ukdp does not identify a key entry
  at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:412)
  at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:378)
  at 
  
  org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:125)
      at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)
      at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
      at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
      at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
      at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
  Mar 14, 2011 4:14:56 PM org.apache.catalina.startup.Catalina load
  </code></pre>
  
  <p>When I remove the <code>keyAlias</code> entry as follows:</p>
  
  <pre><code>&lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" 
  keystoreFile="D:\Tomcat\ukdp.keystore" keystorePass="123456" 
         maxThreads="150" scheme="https" secure="true"
         clientAuth="false" sslProtocol="TLS" /&gt;
  </code></pre>
  
  <p>The following exception occurs during startup:</p>
  
  <pre><code>SEVERE: Socket accept failed
  java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.
      at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:150)
      at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
      at java.lang.Thread.run(Unknown Source)
  Mar 14, 2011 4:20:31 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
  SEVERE: Socket accept failed
  java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.
      at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:150)
      at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
      at java.lang.Thread.run(Unknown Source)
  Mar 14, 2011 4:20:31 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
  SEVERE: Socket accept failed
  </code></pre>