2 Replies Latest reply on Jun 5, 2015 2:11 AM by v.karthigeyan

    Disable Http access only Https without using security-constraint in web.xml (Migrate from jboss 6 to wildfly8.2)

    v.karthigeyan

      Migrate Jboss6 to WildFly8.2

      Working on https keystone connection in wildlfy8.2. After configuring my application on standalone-full.xml conf using http://blog.eisele.net/2015/01/ssl-with-wildfly-8-and-undertow.html. I was able to access both http and https on my application. I have to access https alone blocking http. After adding security-constraint inside web.xml i was able to redirect to https. But i don't want to include anything in web.xml in my new version it affects my old jboss users.

      In a situation there are people who use jboss6 application without SSL keystore configuration and people using same applications in Https . Older version of jboss allows both http and https to be configured in server.xml itself. In wildfly we have to edit application war file instead of server config files.

      Note : I got this link having same issue got resolved in  https://developer.jboss.org/thread/253008?_sscc=t. made the changes as instructed. But it doesn't work, we are using standalone-full.xml instead of standalone.xml.


      I dont know where my http port set reffered from or it looks into default standalone.xml insted of standalone-full.xml

      After making changes i am getting

       

      jboss.deployment.subunit."XXX.ear"."XXXEJB3.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "XXXEJB3.jar" of deployment "XXX.ear"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
      Caused by: java.lang.IllegalStateException: JBAS017350: Could not find the port number listening for protocol HTTP/1.1
      at org.wildfly.extension.undertow.WebServerService.getPort(WebServerService.java:67)

      at org.jboss.as.webservices.config.WebServerInfoImpl.getPort(WebServerInfoImpl.java:36)


        • 1. Re: Disable Http access only Https without using security-constraint in web.xml (Migrate from jboss 6 to wildfly8.2)
          ctomc

          You get complaint from webservices subsystem about not being able to find HTTP port.

           

          are you using any web services in your application?

          1 of 1 people found this helpful
          • 2. Re: Disable Http access only Https without using security-constraint in web.xml (Migrate from jboss 6 to wildfly8.2)
            v.karthigeyan

            Yes we are use web-services

             

            I found the problem  i didn't add <wsdl-port> and <modify-wsdl-address> to webservice subsystem

            after adding it got resolved

             

            <subsystem xmlns="urn:jboss:domain:webservices:1.2">

                        <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>

                         <modify-wsdl-address>true</modify-wsdl-address>

                         <wsdl-port>80</wsdl-port>

                        <endpoint-config name="Standard-Endpoint-Config"/>

                        <endpoint-config name="Recording-Endpoint-Config">

                            <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">

                                <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>

                            </pre-handler-chain>

                        </endpoint-config>

                        <client-config name="Standard-Client-Config"/>

                    </subsystem>

             

            Thanks tomaz