11 Replies Latest reply on Jul 20, 2017 5:52 AM by Fred S

    How to disable HTTP, only HTTPS

    Daniel Novo Newbie

      Hi,

       

      In Wildfly 8.2 it's possible to disable http and use only https?

       

      Thanks

        • 1. Re: How to disable HTTP, only HTTPS
          Tomaz Cerar Master

          sure, just remove all http-listeners

          1 of 1 people found this helpful
          • 2. Re: How to disable HTTP, only HTTPS
            Daniel Novo Newbie

            Hi Tomaz,

             

            I've removed this

             

            <http-listener name="default" socket-binding="http"/>

             

            and add

             

            <https-listener name="default-ssl" socket-binding="https" security-realm="SSLRealm"/>

             

            Now i'm get this error:

             

            19:46:20,910 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([

                ("subsystem" => "ejb3"),

                ("service" => "remote")

            ]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.ejb3.connector is missing [jboss.remoting.remotingConnectorInfoService.http-remoting-connector]"]}

            19:46:21,049 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

            JBAS014775:    New missing/unsatisfied dependencies:

                  service jboss.remoting.remotingConnectorInfoService.http-remoting-connector (missing) dependents: [service jboss.ejb3.connector]

             

            What's missing?

            • 3. Re: How to disable HTTP, only HTTPS
              Frank Langelage Master

              There are references to the http-listener from other subsystems.

              Look for connector-ref="default" or http-listener="default".

              Those references have to be adjusted.

              • 4. Re: How to disable HTTP, only HTTPS
                Daniel Novo Newbie

                Thanks Frank

                 

                Changed connector-ref in remoting subsystem and problem solved!

                 

                <subsystem xmlns="urn:jboss:domain:remoting:2.0">

                            <endpoint worker="default"/>

                            <http-connector name="http-remoting-connector" connector-ref="default-ssl" security-realm="ApplicationRealm"/>

                </subsystem>

                • 5. Re: How to disable HTTP, only HTTPS
                  Girish Pathak Newbie

                  Hi Daniel Same issue i also faced with wildfly 10 ,I followed same which you mentioned above but I am getting following Exception can you please help me where I am going wrong , I can't remove EJB extensions and EJB subsystems :

                  2017-05-08 17:59:55,997 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "ejb3")]) - failure description: {

                      "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined,

                      "WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {

                          "Services that were unable to start:" => [

                              "jboss.ejb.default-local-ejb-receiver-service",

                              "jboss.ejb3.ejbClientContext.default",

                              "jboss.ejb3.localEjbReceiver.value"

                          ],

                          "Services that may be the cause:" => ["jboss.remoting.remotingConnectorInfoService.http-remoting-connector"]

                      }

                  }

                   

                  2017-05-08 17:59:55,997 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

                      ("subsystem" => "ejb3"),

                      ("service" => "remote")

                  ]) - failure description: {

                      "WFLYCTL0412: Required services that are not installed:" => ["jboss.remoting.remotingConnectorInfoService.http-remoting-connector"],

                      "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.ejb3.connector is missing [jboss.remoting.remotingConnectorInfoService.http-remoting-connector]"]

                  }

                  • 6. Re: How to disable HTTP, only HTTPS
                    Frank Langelage Master

                    It seems you did something different.

                    EJB Remoting is referring to a remoting-connector:

                            <remote connector-ref="http-remoting-connector" thread-pool-name="default"/>

                     

                    If you don't need remote EJBs you possibly can also remove this line.

                     

                    The remoting-connector is set up usually as

                        <subsystem xmlns="urn:jboss:domain:remoting:3.0">
                            <endpoint/>
                            <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
                       </subsystem>

                     

                    And the connector-ref attribute here is referring to an http-listener with this name

                                <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>

                     

                    If you only want to have a https-listener and no http-listener at all, you can remove the http-listener entry in undertow subsystem and set th ename of the https-listener to "default".

                    2 of 2 people found this helpful
                    • 7. Re: How to disable HTTP, only HTTPS
                      Girish Pathak Newbie

                      Thanks a lot Frank you are right EJB Remoting was referring to a remoting-connector , I removed and it worked for me .

                      • 8. Re: How to disable HTTP, only HTTPS
                        Fred S Newbie

                        Hi Girish,

                         

                        I have the same issue with Wildfly-10.1.0.Final.

                        I only want to have a https-listener and no http-listener at all so i did the following configuration :

                         

                        Disable Http listener

                        <http-listener name="default" socket-binding="http" enabled="false" redirect-socket="https" enable-http2="true"/>

                         

                        Reference the http-listener in the connector-ref attribute in the remoting subsystem (Instead of the initial reference to the http-listener default

                        <subsystem xmlns="urn:jboss:domain:remoting:3.0">

                           <endpoint/>

                           <http-connector name="http-remoting-connector" connector-ref="https" security-realm="ApplicationRealm"/>

                        </subsystem>

                         

                        But on startup the following error are traced in the console :

                         

                        09:47:58,174 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "webservices")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}

                         

                        If i remove the webservices (under CLI : /subsystem=webservices:remove) startup is Ok.

                         

                        what's the problem ?

                         

                        Thanks for help

                         

                        • 9. Re: How to disable HTTP, only HTTPS
                          Frank Langelage Master

                          Try to remove the http-listener completely instead of just disabling it. Maybe this solves your issue.

                          The webservices subsystem does URL-rewrite.See Published WSDL customization - JBoss Web Services - Project Documentation Editor . Enabled by default.

                          There it determines values for wsdl-host, wsdl-port and wsdl-secure-port. For wsdl-port is written: "Otherwise the HTTP port will be identified by querying the list of installed HTTP connectors".

                          • 10. Re: How to disable HTTP, only HTTPS
                            Girish Pathak Newbie

                            Hi Fred, Instead of removing existing subsystems from standalone.xml you can remove remote connector ref tag i.e. <p><remote connector-ref="http-remoting-connector" thread-pool-name="default"/></p> completely  and http-listener completely including <p> <socket-binding name="http" port="${jboss.http.port:8080}"/>  </p> it should work no need to remove subsystems.

                            • 11. Re: How to disable HTTP, only HTTPS
                              Fred S Newbie

                              Hi Girish,

                               

                              Thanks for your reply and thanks for Francks reply to..

                              After reading your post (and also Frank'sreply) post I studied one more time my configuration and i have made some more tests.

                              I have already see the docs relative to webservices subsystem and tried to define values forwsdl-host, wsdl-port and wsdl-secure-port thinking this would stop the subsystem to initialize this properties "by querying the list of installed HTTP connectors" without sucess.

                              My thought was that the problem has nothing to do with the <remote connector-ref="http-remoting-connector" thread-pool-name="default"/> as i had configured it to use the https listener :  <http-connector name="http-remoting-connector" connector-ref="https" security-realm="ApplicationRealm"/>.

                               

                              So i tried only tto remove the http listener (done by CLI : /subsystem=undertow/server=default-server/http-listener=default:remove) instead of disable it (keeping also the http socket binding).

                              And that did the tricks !

                              At fisrt I tried to use the enabled attribute of the http-listener as my will was to try removing the less possible default configuration by it doesn't work ... I seems to me a bug of the webservices subsystem ?