5 Replies Latest reply on Mar 29, 2017 7:13 PM by James Perkins

    Management Interfaces stopping before server fully shutdown

    John Farrelly Newbie

      (I'm using WildFly 10.1.0.Final).

       

      In our product, we use jboss-cli.sh to monitor if WildFly is running (jboss-cli.sh -c --controller=${JBOSS_HOST}:${JBOSS_MANAGEMENT_PORT} "read-attribute server-state").  We've been using this mechanism to determine if JBoss/WildFly is running since JBoss 7.1.1.Final.

      What we are seeing in WildFly 10.1.0.Final is that WildFly shuts down the native interface before it has closed all other services.  This means that some long-running business logic thread in WildFly can stop it from shutting down, but the native interface has already stopped, making it seem that WildFly has stopped.

       

      I can see that other services (such as undertow) stay up until the long running business logic thread has completed.  Is there a way to ensure that the native interface services stay running until the container is actually shutting down (in a similar fashion to how undertow works)?

       

      Here's the management section of my standalone.xml:

      <management>
          <security-realms>
              <security-realm name="ManagementRealm">
                  <authentication>
                      <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
                  </authentication>
              </security-realm>
              <security-realm name="ApplicationRealm">
                  <authentication>
                      <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                  </authentication>
              </security-realm>
          </security-realms>
          <management-interfaces>
              <native-interface security-realm="ManagementRealm">
                  <socket-binding native="management-native"/>
              </native-interface>
              <http-interface security-realm="ManagementRealm">
                  <socket-binding http="management-http"/>
              </http-interface>
          </management-interfaces>
      </management>
      

       

      EDIT:

      I forgot to mention, that we use jboss-cli.sh to issue the shutdown command:

      jboss-cli.sh -c --controller=${JBOSS_HOST}:${JBOSS_MANAGEMENT_PORT} --command=":shutdown"