glassfish
  1. glassfish
  2. GLASSFISH-16036

enable-secure-admin, disable-secure-admin: add a check to fail gracefully if any instance is running.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.1_b43
    • Fix Version/s: future release
    • Component/s: admin
    • Labels:
      None

      Description

      Only the DAS should be running when running the commands enable-secure-admin / disable-secure-admin are executed.

      If disable-secure-admin is executed when clustered instance is running, it seems to leave the config in inconsistent state - and incorrect cluster state is reported. Please add a check to see if any instance is running before making any changes to the system config.

      Steps:

      • Create and Start two instance Cluster - cluster1. Both the instances are created on the same node as DAS.
      • asadmin enable-secure-admin
      • Stop the Cluster cluster1,
      • Restart DAS,
      • Start the Cluster cluster1
      • asadmin list-instances --long
        NAME HOST PORT PID CLUSTER STATE
        instance1 localhost 24848 26743 cluster1 running
        instance2 localhost 24849 26741 cluster1 running
      • asadmin disable-secure-admin
        [#|2011-02-16T11:54:48.427-0800|WARNING|glassfish3.1|null|_ThreadID=31;_ThreadName=pool-31-thread-1;|Unprocessed event : UnprocessedChangeEvent {PropertyName=enabled, OldValue = true, NewValue = false, Source = GlassFishConfigBean.com.sun.enterprise.config.serverbeans.SecureAdmin}

        , reason = secure.admin.change.requires.restart, when = 1297886087740|#]

      [#|2011-02-16T11:54:48.429-0800|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=352;_ThreadName=admin-thread-pool-4848(36);|Retryable...|#]

      remote failure: An error occurred during replication

      FAILURE: Command disable-secure-admin failed on server instance instance1: HTTP connection failed with code 403, message: Forbidden
      FAILURE: Command disable-secure-admin failed on server instance instance2: HTTP connection failed with code 403, message: Forbidden
      Command disable-secure-admin failed.

      ----------------------
      After this, incorrect cluster state is reported:

      % asadmin list-instances --long
      NAME HOST PORT PID CLUSTER STATE
      instance1 localhost 24848 -1 cluster1 not running [pending config changes are: disable-secure-admin; ]
      instance2 localhost 24849 -1 cluster1 not running [pending config changes are: disable-secure-admin; ]
      Command list-instances executed successfully.

      ----------------------
      stop-cluster fails to stop the cluster:

      % jps
      26139 ASMain
      26741 ASMain
      26743 ASMain
      23458 admin-cli.jar
      27586 Jps

      $ asadmin stop-cluster cluster1
      :
      :
      remote failure: instance1: Error trying to stop the instance named instance1 : HTTP connection failed with code 403, message: Forbidden
      instance2: Error trying to stop the instance named instance2 : HTTP connection failed with code 403, message: Forbidden

      The command stop-instance failed for: instance1 instance2

      ----------------------
      % jps
      26139 ASMain
      26741 ASMain
      26743 ASMain
      23458 admin-cli.jar
      27586 Jps

      ----------------------

      Workaround: Manually kill the instances, and restart the domain.

        Issue Links

          Activity

          Hide
          Tim Quinn added a comment -

          Ideally we will not need to add this check if the related issue 16024 is resolved. That issue will allow the Grizzly listener changes to take place in running DAS and instance processes without requiring restarts.

          Show
          Tim Quinn added a comment - Ideally we will not need to add this check if the related issue 16024 is resolved. That issue will allow the Grizzly listener changes to take place in running DAS and instance processes without requiring restarts.
          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
          Tim Quinn added a comment -

          The command sequence Harshad described works correctly. The command properly displays a message telling the user to restart all running servers, and list-instances shows correct information in all states.

          Show
          Tim Quinn added a comment - The command sequence Harshad described works correctly. The command properly displays a message telling the user to restart all running servers, and list-instances shows correct information in all states.

            People

            • Assignee:
              Tim Quinn
              Reporter:
              Harshad Vilekar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: