glassfish
  1. glassfish
  2. GLASSFISH-16204

Replace hardcoded 20 timeout for server startup in AdminAdapter with configurable value

    Details

      Description

      The AdminAdapter.service method contains the following code:

      if (!latch.await(20L, TimeUnit.SECONDS)) {

      This statement waits up to 20 seconds for the server to become ready before processing any asadmin command.
      Depending on the number and type of applications that are deployed to the server, it may take more than 20 seconds for the server to start, and when starting the server and running commands from a script, it is desirable to be able to increase this value.

      This RFE requests that the hardcoded "20L" be turned into a configurable parameter for the system either through an environment variable or a system property.

      This problem was reported on the glassfish users mailing list on 3/14/2011.

        Activity

        Hide
        Tom Mueller added a comment -

        A fix for this issue was initially identified for possible inclusion in the 3.2 release, but after further 3.2 planning, the feature or improvement did not make the cut. This issue is being targeted for a future release. If based on a reevaluation, it is targeted for 3.2, then update the "fix version" again.

        Show
        Tom Mueller added a comment - A fix for this issue was initially identified for possible inclusion in the 3.2 release, but after further 3.2 planning, the feature or improvement did not make the cut. This issue is being targeted for a future release. If based on a reevaluation, it is targeted for 3.2, then update the "fix version" again.
        Hide
        Kevin Dean added a comment -

        This is highly aggravating; it just bit me as I was working on my deployment scripts. There is a workaround. The following snippet of Ant code waits for the JMX service to start on port 8686. As that's the last thing that GlassFish does on startup, it's a good way of checking the state of the server. Share and enjoy. And yes, please fix.

        <echo message="Waiting for startup to complete..."/>

        <!-- GlassFish has completed startup but hasn't loaded the applications; JMX service port is the last to open so watch for it. -->
        <waitfor maxwait="600" maxwaitunit="second" checkevery="1" checkeveryunit="second" timeoutproperty="startup_timeout">
        <socket server="localhost" port="8686"/>
        </waitfor>

        <if>
        <isset property="startup_timeout"/>

        <then>
        <fail message="GlassFish startup timed out."/>
        </then>
        </if>

        Show
        Kevin Dean added a comment - This is highly aggravating; it just bit me as I was working on my deployment scripts. There is a workaround. The following snippet of Ant code waits for the JMX service to start on port 8686. As that's the last thing that GlassFish does on startup, it's a good way of checking the state of the server. Share and enjoy. And yes, please fix. <echo message="Waiting for startup to complete..."/> <!-- GlassFish has completed startup but hasn't loaded the applications; JMX service port is the last to open so watch for it. --> <waitfor maxwait="600" maxwaitunit="second" checkevery="1" checkeveryunit="second" timeoutproperty="startup_timeout"> <socket server="localhost" port="8686"/> </waitfor> <if> <isset property="startup_timeout"/> <then> <fail message="GlassFish startup timed out."/> </then> </if>

          People

          • Assignee:
            kumara
            Reporter:
            Tom Mueller
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: