JBoss EAP throws IOException: Cannot recover key exception during startup

Solution Verified - Updated -

Issue

  • Why does JBoss throw a "java.io.IOException: Cannot recover key" exception during startup?
  • The following error is logged when starting JBoss Enterprise Application Platform 5:

    ERROR [Http11Protocol] Error initializing endpoint
    java.io.IOException: Cannot recover key
            at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:485)
            at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:142)
            at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
            at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:175)
    
  • The following error is logged when starting EAP 6:

    ERROR [org.apache.coyote.http11] (MSC service thread 1-2) JBWEB003043: Error initializing endpoint: java.io.IOException: Cannot recover key
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:488)
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:162)
        at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:967)
        at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:174)
    
  • The following error is logged trying to create a SSL connection EAP 7 :

    Caused by: java.security.UnrecoverableKeyException: Cannot recover key
    at sun.security.provider.KeyProtector.recover(KeyProtector.java:328)
    at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146)
    at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56)
    at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:473)
    at sun.security.provider.KeyStoreDelegator.engineGetEntry(KeyStoreDelegator.java:172)
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetEntry(JavaKeyStore.java:70)
    at java.security.KeyStore.getEntry(KeyStore.java:1521)
    at org.jboss.as.domain.management.security.FileKeystore.load(FileKeystore.java:134)
    

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content