glassfish
  1. glassfish
  2. GLASSFISH-16225

start-cluster reports "Command start-cluster completed with warnings." even if no instances started

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.1_b04 , 4.0_b43
    • Component/s: admin
    • Labels:
      None

      Description

      Build 43 or continuous build. Executed the follow steps:
      ==============================================================================================================
      asadmin --passwordfile /export/home/password.txt --user admin --host localhost create-domain --adminport=3070 --instanceport=2070 --doma
      indir=/opt/glassfish3/glassfish/domains --savemasterpassword=true --usemasterpassword=true --savelogin=false --checkports=true --nopasswo
      rd=false domain4
      Using port 3070 for Admin.
      Using port 2070 for HTTP Instance.
      Default port 7676 for JMS is in use. Using 37157
      Default port 3700 for IIOP is in use. Using 37158
      Default port 8181 for HTTP_SSL is in use. Using 37159
      Using default port 3820 for IIOP_SSL.
      Using default port 3920 for IIOP_MUTUALAUTH.
      Default port 8686 for JMX_ADMIN is in use. Using 37160
      Default port 6666 for OSGI_SHELL is in use. Using 37161
      Default port 9009 for JAVA_DEBUGGER is in use. Using 37162
      Distinguished Name of the self-signed X.509 Server Certificate is:
      [CN=jed-asqe-7,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
      Distinguished Name of the self-signed X.509 Server Certificate is:
      [CN=jed-asqe-7-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
      No domain initializers found, bypassing customization step
      Domain domain4 created.
      Domain domain4 admin port is 3070.
      Domain domain4 admin user is "admin".
      Command create-domain executed successfully.
      asadmin --passwordfile /export/home/password.txt --user admin --host localhost --port 3070 start-domain --debug=true --domaindir=/opt/gla
      ssfish3/glassfish/domains --verbose=false domain4
      Waiting for domain4 to start .................
      Successfully started the domain : domain4
      domain Location: /opt/glassfish3/glassfish/domains/domain4
      Log File: /opt/glassfish3/glassfish/domains/domain4/logs/server.log
      Admin Port: 3070
      Debugging is enabled. The debugging port is: 37162
      Command start-domain executed successfully.
      asadmin --passwordfile /export/home/password.txt --user admin --host localhost --port 3070 create-cluster c4
      Command create-cluster executed successfully.
      jed-asqe-7#/export/home] asadmin --passwordfile /export/home/password.txt --user admin --host localhost --port 3070 create-local-instance
      --cluster c4 --node localhost-domain4 in44
      Rendezvoused with DAS on localhost:3070.
      Port Assignments for server instance in44:
      JMX_SYSTEM_CONNECTOR_PORT=28687
      JMS_PROVIDER_PORT=27677
      HTTP_LISTENER_PORT=28081
      ASADMIN_LISTENER_PORT=24849
      JAVA_DEBUGGER_PORT=29009
      IIOP_SSL_LISTENER_PORT=23820
      IIOP_LISTENER_PORT=23700
      OSGI_SHELL_TELNET_PORT=26666
      HTTP_SSL_LISTENER_PORT=28182
      IIOP_SSL_MUTUALAUTH_PORT=23920
      Command create-local-instance executed successfully.
      asadmin --passwordfile /export/home/password.txt --user admin --host localhost --port 3070 start-local-instance --node localhost-domain4
      in44
      Waiting for in44 to start ...............................
      Successfully started the instance: in44
      instance Location: /opt/glassfish3/glassfish/nodes/localhost-domain4/in44
      Log File: /opt/glassfish3/glassfish/nodes/localhost-domain4/in44/logs/server.log
      Admin Port: 24849
      Command start-local-instance executed successfully.
      asadmin --passwordfile /export/home/password.txt --user admin --host localhost --port 3070 stop-local-instance --node localhost-domain4 i
      n44
      Waiting for the instance to stop ...
      Command stop-local-instance executed successfully.
      asadmin --passwordfile /export/home/password.txt --user admin --host localhost --port 3070 start-cluster --verbose=true c4
      start-instance in44
      in44: Could not start instance in44 on node localhost-domain4 (localhost).

      Command failed on node localhost-domain4 (localhost): CLI801 Instance is already synchronized
      Command start-local-instance failed.

      The Master Password is required to start the domain. No console, no prompting possible. You should either create the domain with --save
      masterpassword=true or provide a password file with the --passwordfile option.

      To complete this operation run the following command locally on host localhost from the GlassFish install location /opt/glassfish3:

      asadmin start-local-instance --node localhost-domain4 --sync normal in44

      The command start-instance failed for: in44
      Command start-cluster completed with warnings.

      ==================================================

      At the last step "start-cluster completed with warnings.", but this cluster has only one instance, the start of that local instance failed: "The command start-instance failed for: in44". It means that the start of the cluster also failed, not "completed with warnings"

        Activity

        Hide
        Joe Di Pol added a comment -

        Agreed. If all instances in a cluster fail to start then start-cluster should report an error – not a warning.

        Show
        Joe Di Pol added a comment - Agreed. If all instances in a cluster fail to start then start-cluster should report an error – not a warning.
        Hide
        Joe Di Pol added a comment -

        I've reproduced this. In fact as things stand now start-cluster never reports an error. It is supposed to report an error if no instances started.

        This is being caused by a command replication annotation on start-cluster that is apparently mapping errors into warnings:

        @ExecuteOn(value=

        {RuntimeType.DAS}, ifFailure=FailurePolicy.Warn)

        If I change this to:

        @ExecuteOn(value={RuntimeType.DAS}

        )

        Then start-cluster reports the error as expected.

        I need to double check that making this change is safe.

        Show
        Joe Di Pol added a comment - I've reproduced this. In fact as things stand now start-cluster never reports an error. It is supposed to report an error if no instances started. This is being caused by a command replication annotation on start-cluster that is apparently mapping errors into warnings: @ExecuteOn(value= {RuntimeType.DAS}, ifFailure=FailurePolicy.Warn) If I change this to: @ExecuteOn(value={RuntimeType.DAS} ) Then start-cluster reports the error as expected. I need to double check that making this change is safe.
        Hide
        Joe Di Pol added a comment -
        • Why fix this issue in 3.1.1?

        start-cluster is reporting incorrect status on a complete failure. This could cause annoyance with customers as well as prevent them from performing correct error checking in their administrative scripts.

        • Which is the targeted build of 3.1.1 for this fix?

        Before MS2

        • Do regression tests exist for this issue?

        Regression tests exists for basic cluster and instance lifecycle operations. A new test would need to be written to verify this particular fix.

        • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

        Basic cluster lifecycle tests

        Show
        Joe Di Pol added a comment - Why fix this issue in 3.1.1? start-cluster is reporting incorrect status on a complete failure. This could cause annoyance with customers as well as prevent them from performing correct error checking in their administrative scripts. Which is the targeted build of 3.1.1 for this fix? Before MS2 Do regression tests exist for this issue? Regression tests exists for basic cluster and instance lifecycle operations. A new test would need to be written to verify this particular fix. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Basic cluster lifecycle tests
        Hide
        scatari added a comment -

        Approved. Please provide the exact build-id to track. The schedule is available here http://wikis.sun.com/display/GlassFish/3.1.1BuildSchedule

        Show
        scatari added a comment - Approved. Please provide the exact build-id to track. The schedule is available here http://wikis.sun.com/display/GlassFish/3.1.1BuildSchedule
        Hide
        Joe Di Pol added a comment -

        Fixed in 3.1.1 B4 (r46553) and 3.2 MS3 (r46581)

        ===================================================================
        Fixed in 3.1.1 (r46553)

        Project: glassfish
        Repository: svn
        Revision: 46553
        Author: jfdipol
        Date: 2011-04-29 19:00:21 UTC
        Link:

        Log Message:
        ------------
        Fix for 16225
        start-cluster reports "Command start-cluster completed with warnings."
        even if no instances started

        Needed to correct a command replication annotation that was
        mapping errors into warnings.

        Revisions:
        ----------
        46553

        Modified Paths:
        ---------------
        branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java

        Diffs:
        ------
        Index: branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java
        ===================================================================
        — branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java (revision 46552)
        +++ branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java (revision 46553)
        @@ -53,7 +53,7 @@

        @I18n("start.cluster.command")
        @Service(name = "start-cluster")
        -@ExecuteOn(value=

        {RuntimeType.DAS}, ifFailure=FailurePolicy.Warn)
        +@ExecuteOn(value={RuntimeType.DAS}

        )
        @CommandLock(CommandLock.LockType.NONE) // don't prevent _synchronize-files
        @Scoped(PerLookup.class)
        public class StartClusterCommand implements AdminCommand {

        Show
        Joe Di Pol added a comment - Fixed in 3.1.1 B4 (r46553) and 3.2 MS3 (r46581) =================================================================== Fixed in 3.1.1 (r46553) Project: glassfish Repository: svn Revision: 46553 Author: jfdipol Date: 2011-04-29 19:00:21 UTC Link: Log Message: ------------ Fix for 16225 start-cluster reports "Command start-cluster completed with warnings." even if no instances started Needed to correct a command replication annotation that was mapping errors into warnings. Revisions: ---------- 46553 Modified Paths: --------------- branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java Diffs: ------ Index: branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java =================================================================== — branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java (revision 46552) +++ branches/3.1.1/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/StartClusterCommand.java (revision 46553) @@ -53,7 +53,7 @@ @I18n("start.cluster.command") @Service(name = "start-cluster") -@ExecuteOn(value= {RuntimeType.DAS}, ifFailure=FailurePolicy.Warn) +@ExecuteOn(value={RuntimeType.DAS} ) @CommandLock(CommandLock.LockType.NONE) // don't prevent _synchronize-files @Scoped(PerLookup.class) public class StartClusterCommand implements AdminCommand {

          People

          • Assignee:
            Joe Di Pol
            Reporter:
            easarina
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: