JBoss AS 7.1.2上的HTTPS

时间:2014-02-18 05:09:45

标签: jboss

我已按照以下链接在jboss AS 7.1.2上设置HTTPS

http://middlewaremagic.com/jboss/?p=992

但在此之后,当我启动jboss时,我收到以下错误:

10:31:05,481 ERROR [org.apache.coyote.http11.Http11AprProtocol]
        ↳ (MSC service thread 1-11) Error initializing endpoint: java.lang.Exception:
        ↳ Unable to load certificate key ../standalone/configuration/chap8.keystore
        ↳ (error:0906D06C:PEM routines:PEM_read_bio:no start line)
    at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method) [jbossweb-7.0.16.Final.jar:]
    at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:644) [jbossweb-7.0.16.Final.jar:]
    at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:121) [jbossweb-7.0.16.Final.jar:]
    at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.16.Final.jar:]
    at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.2.Final.jar:7.1.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

10:31:05,489 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11)
        ↳ MSC00001: Failed to start service jboss.web.connector.https:
        ↳ org.jboss.msc.service.StartException in service jboss.web.connector.https:
        ↳ JBAS018007: Error starting web connector
    at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:271)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: LifecycleException:  Protocol handler initialization failed: java.lang.Exception:
        ↳ Unable to load certificate key ../standalone/configuration/chap8.keystore
        ↳ (error:0906D06C:PEM routines:PEM_read_bio:no start line)
    at org.apache.catalina.connector.Connector.init(Connector.java:985)
    at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267)
    ... 5 more

请帮我解决这个问题。

2 个答案:

答案 0 :(得分:1)

自从JBoss使用本机APR库以来,我遇到了上述错误。通过使JBoss使用 JSE库而不是本机APR库来解决该问题。

在子系统标记中使用 native =“false”来解决问题。

答案 1 :(得分:0)

我知道这个问题是在一年前添加的,但有人可能会觉得这个答案很有帮助。 您正在使用org.apache.coyote.http11.Http11AprProtocol协议,该协议使用本机OpenSSL。提供的证书(基于文件扩展名)是JKS密钥库。 OpenSSL无法读取此格式,因此抛出error:0906D06C:PEM routines:PEM_read_bio:no start line。为了解决这个问题,您必须使用OpenSSL将密钥库转换为OpenSSL兼容格式(crt,pem,key)或生成新密钥等。还有一些配置差异。请参阅此JBoss docs。这适用于Jboss AS 7.3.2,但据我所知,7.1.2和7.3.2在这个问题上没有区别。