9 Replies Latest reply on May 11, 2018 11:49 AM by honza889

    Restarting the HTTP socket without restarting the Wildfly service.

    gir489

      We are looking at migrating from Norton security certificates to LetsEncrypt, which gives out free SSL certificates, but they expire in 90 days...

       

      This presents a problem to us. We don't want to have to redeploy the site every 90 days, we want it to contiguously run, and like we're doing with the EAR, we just want to call /redeploy on it, and have it continue operating.

       

      However, we haven't found a way to reset the HTTP sockets like we can with the EAR. I found this feature request: [WFLY-4321] restart of http connector without restarting whole web container - JBoss Issue Tracker

      In it, the developer on the last page recommends to run this command: /subsystem=undertow/server=default-server/https-listener=https:remove() {allow-resource-service-restart=true}.

       

      When I run it the first time, it says {"outcome" => "success"}, and in the Wildfly console it says:

      10:28:16,106 INFO  [undertow] WFLYUT0008: Undertow HTTPS listener https suspending

      10:28:16,106 INFO  [undertow] WFLYUT0007: Undertow HTTPS listener https stopped, was bound to 0.0.0.0:443.

       

      But then it never comes back... It stops listening.

       

      Eventually, Wildfly will barf and spits out this error:

       

      10:30:00,235 ERROR [EventCache] Problem running the scavenger in the EventCache: java.lang.IllegalStateException: WFLYEE0043: Component is stopped

              at org.jboss.as.ee.component.BasicComponent.waitForComponentStart(BasicComponent.java:110)

              at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:194)

              at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)

       

      I then go to reboot the server, but the HTTPS listener didn't work. I noticed it was rewriting my standalone.xml. I have to revert the standalone.xml to HEAD to get it to work again.