4 Replies Latest reply on Dec 30, 2015 4:55 AM by Sreekanth Munarai

    JBoss SSL configuration

    Sreekanth Munarai Master

      Hi All,

       

      I'm trying to configure SSL at JBoss level. Below are the steps that i followed:

       

      1. i have created an  test.keystore certificate using below command:

             keytool -genkey -alias Test -keyalg RSA -keystore Test.keystore -validity 10950


      2. Placed it under the folder D:\Sreekanth\JBoss7.1AS\jboss-as-7.1.1.Final\standalone\configuration\Keystore\test.keystore


      3. Standalone.xml configuration changes :

       

        <connector name="https" protocol="HTTP/1.1" socket-binding="https" scheme="https" secure="true">

          <ssl name="Test-ssl" password="Test@123" protocol="TLSv1" key-alias="Test" certificate-key-file="${jboss.server.config.dir}/configuration/Keystore/test.keystore"/>

          </connector>

       

      When trying to start the server, getting below parse error:

      12:39:42,449 ERROR [org.jboss.as.server] JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: J

      BAS014676: Failed to parse configuration

              at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.1.1.Final.jar:7.1.

      1.Final]

              at org.jboss.as.server.ServerService.boot(ServerService.java:266) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]

      Caused by: com.ctc.wstx.exc.WstxParsingException: Received non-all-whitespace CHARACTERS or CDATA event in nextTag().

      at [row,col {unknown-source}]: [259,5]

              at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:606)

              at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:479)

              at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:464)

              at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1137)

              at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.nextTag(XMLExtendedStreamReaderImpl.java:152) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.web.WebSubsystemParser.parseConnector(WebSubsystemParser.java:831)

              at org.jboss.as.web.WebSubsystemParser.readElement(WebSubsystemParser.java:325)

              at org.jboss.as.web.WebSubsystemParser.readElement(WebSubsystemParser.java:65)

              at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:894) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_1(StandaloneXml.java:330) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:127) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:100) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.1.1.Final.jar:7.1.

      1.Final]

              ... 3 more

      It is throwing parsing error at line 259 where i have added ssl connector. I'm not able to find where i m going wrong. Please revert with your findings/suggestions. Thanks in advance.

      Sreekanth