glassfish
  1. glassfish
  2. GLASSFISH-14734

Many asadmin commands failed for instances that were created before a security was enabled.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.1
    • Fix Version/s: not determined
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,734

      Description

      Build 30. If instances were created before enable-secure-admin, then many
      commands with these instances - failed. There has to be a method to enable
      security for the instances that were created before.

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

      Command create-admin-object failed on server instance in4:
      javax.net.ssl.SSLHandshakeException: Remote host closed connection during
      handshake
      Command create-jdbc-resource failed on server instance in4:
      javax.net.ssl.SSLHandshakeException: Remote host closed connection during
      handshake
      org.glassfish.api.admin.CommandException: remote failure: Error trying to stop
      the instance named in
      1 : javax.net.ssl.SSLHandshakeException: Remote host closed connection during
      handshake
      Command stop-instance failed.
      Application deployed with name webapps-caching.
      WARNING: Command _deploy did not complete successfully on server instance in1:
      javax.net.ssl.SSLHand
      shakeException: Remote host closed connection during handshake
      WARNING: Command _deploy did not complete successfully on server instance in2:
      javax.net.ssl.SSLHand
      shakeException: Remote host closed connection during handshake
      Command deploy completed with warnings.

      Command set failed on server instance in1: javax.net.ssl.SSLHandshakeException:
      Remote host closed connection during handshake
      Command set failed on server instance in2: javax.net.ssl.SSLHandshakeException:
      Remote host closed connection during handshake
      org.glassfish.api.admin.CommandException: remote failure: Error trying to
      restart the instance named
      in4 : javax.net.ssl.SSLHandshakeException: Remote host closed connection
      during handshake
      Command restart-instance failed.

        Activity

        Hide
        easarina added a comment -

        I did the steps from Tim's script:
        =============================================================
        bash-3.2$ # Remove any trace of the DAS's self-signed cert

        bash-3.2$ rm ~/.asadmntruststore
        rm: /Users/Tim/.asadmintruststore: No such file or directory

        bash-3.2$

        bash-3.2$ # Enable secure admin

        bash-3.2$ asadmin enable-secure-admin

        Command enable-secure-admin executed successfully.

        bash-3.2$ #

        bash-3.2$ #

        bash-3.2$ # Restart the DAS

        bash-3.2$ asadmin stop-domain

        Waiting for the domain to stop a.sadmin. start-.doma

        Command stop-domain executed successfully.

        bash-3.2$ asadmin start-domain

        Waiting for domain1 to start ................................................

        Successfully started the domain : domain1

        domain Location:
        /Users/Tim/asgroup/v3/H/publish/glassfish3/glassfish/domains/domain1

        Log File:
        /Users/Tim/asgroup/v3/H/publish/glassfish3/glassfish/domains/domain1/logs/server
        .log

        Admin Port: 4848

        Command start-domain executed successfully.
        ========================================================

        Then in this testes eexecuted list-instances to issued a certificate.

        Then created local instances and run a test, most tests failed, the main issue
        is decribed in this bug.

        Show
        easarina added a comment - I did the steps from Tim's script: ============================================================= bash-3.2$ # Remove any trace of the DAS's self-signed cert bash-3.2$ rm ~/.asadmntruststore rm: /Users/Tim/.asadmintruststore: No such file or directory bash-3.2$ bash-3.2$ # Enable secure admin bash-3.2$ asadmin enable-secure-admin Command enable-secure-admin executed successfully. bash-3.2$ # bash-3.2$ # bash-3.2$ # Restart the DAS bash-3.2$ asadmin stop-domain Waiting for the domain to stop a.sadmin. start-.doma Command stop-domain executed successfully. bash-3.2$ asadmin start-domain Waiting for domain1 to start ................................................ Successfully started the domain : domain1 domain Location: /Users/Tim/asgroup/v3/H/publish/glassfish3/glassfish/domains/domain1 Log File: /Users/Tim/asgroup/v3/H/publish/glassfish3/glassfish/domains/domain1/logs/server .log Admin Port: 4848 Command start-domain executed successfully. ======================================================== Then in this testes eexecuted list-instances to issued a certificate. Then created local instances and run a test, most tests failed, the main issue is decribed in this bug.
        Hide
        easarina added a comment -

        Re-run the tests using latests b30. Did not see this issue any more.

        Show
        easarina added a comment - Re-run the tests using latests b30. Did not see this issue any more.
        Hide
        Tim Quinn added a comment -

        Closing. Cannot reproduce.

        Show
        Tim Quinn added a comment - Closing. Cannot reproduce.
        Hide
        easarina added a comment -

        I was able to reproduce this issue using 3.1.2 fcs build 23. I've unzipped the build, started domain, executed change-admin-password, the executed the follow steps. As you can see I was not able to stop an instance, also the instance. According to list-instance, the instance was not running, according to start-instance, it was running.

        asadmin enable-secure-admin
        Enter admin user name> admin
        Enter admin password for user "admin">
        You must restart all running servers for the change in secure admin to take effect.
        Command enable-secure-admin executed successfully.
        asadmin disable-secure-admin
        Enter admin user name> admin
        Enter admin password for user "admin">
        You must restart all running servers for the change in secure admin to take effect.
        Command disable-secure-admin executed successfully.
        asadmin create-node-ssh --nodehost jed-asqe-7 node2
        Enter admin user name> admin
        Enter admin password for user "admin">
        Command create-node-ssh executed successfully.
        asadmin create-instance --node node2 i2
        Enter admin user name> admin
        Enter admin password for user "admin">
        Command _create-instance-filesystem executed successfully.
        Port Assignments for server instance i2:
        JMX_SYSTEM_CONNECTOR_PORT=28687
        JMS_PROVIDER_PORT=27677
        HTTP_LISTENER_PORT=28081
        ASADMIN_LISTENER_PORT=24849
        JAVA_DEBUGGER_PORT=29010
        IIOP_SSL_LISTENER_PORT=23821
        IIOP_LISTENER_PORT=23701
        OSGI_SHELL_TELNET_PORT=26667
        HTTP_SSL_LISTENER_PORT=28182
        IIOP_SSL_MUTUALAUTH_PORT=23921
        The instance, i2, was created on host jed-asqe-7
        Command create-instance executed successfully.
        asadmin start-instance i2
        Enter admin user name> admin
        Enter admin password for user "admin">
        Waiting for i2 to start ...................................
        Successfully started the instance: i2
        instance Location: /opt/glassfish3/glassfish/nodes/node2/i2
        Log File: /opt/glassfish3/glassfish/nodes/node2/i2/logs/server.log
        Admin Port: 24849
        Command start-local-instance executed successfully.
        The instance, i2, was started on host jed-asqe-7
        Command start-instance executed successfully.
        asadmin stop-instance i2
        Enter admin user name> admin
        Enter admin password for user "admin">
        remote failure: Error trying to stop the instance named i2 : javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
        Command stop-instance failed.
        asadmin enable-secure-admin
        Enter admin user name> admin
        Enter admin password for user "admin">
        You must restart all running servers for the change in secure admin to take effect.
        Command enable-secure-admin executed successfully.
        asadmin stop-instance i2
        Enter admin user name> admin
        Enter admin password for user "admin">
        remote failure: Error trying to stop the instance named i2 : javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
        Command stop-instance failed.

        asadmin list-instances
        Enter admin user name> admin
        Enter admin password for user "admin">
        i2 not running
        Command list-instances executed successfully.
        asadmin start-instance i2
        Enter admin user name> admin
        Enter admin password for user "admin">
        Instance i2 is already running.
        Command start-instance executed successfully.
        =========================================================

        Reproduced the issue on two platforms.

        Show
        easarina added a comment - I was able to reproduce this issue using 3.1.2 fcs build 23. I've unzipped the build, started domain, executed change-admin-password, the executed the follow steps. As you can see I was not able to stop an instance, also the instance. According to list-instance, the instance was not running, according to start-instance, it was running. asadmin enable-secure-admin Enter admin user name> admin Enter admin password for user "admin"> You must restart all running servers for the change in secure admin to take effect. Command enable-secure-admin executed successfully. asadmin disable-secure-admin Enter admin user name> admin Enter admin password for user "admin"> You must restart all running servers for the change in secure admin to take effect. Command disable-secure-admin executed successfully. asadmin create-node-ssh --nodehost jed-asqe-7 node2 Enter admin user name> admin Enter admin password for user "admin"> Command create-node-ssh executed successfully. asadmin create-instance --node node2 i2 Enter admin user name> admin Enter admin password for user "admin"> Command _create-instance-filesystem executed successfully. Port Assignments for server instance i2: JMX_SYSTEM_CONNECTOR_PORT=28687 JMS_PROVIDER_PORT=27677 HTTP_LISTENER_PORT=28081 ASADMIN_LISTENER_PORT=24849 JAVA_DEBUGGER_PORT=29010 IIOP_SSL_LISTENER_PORT=23821 IIOP_LISTENER_PORT=23701 OSGI_SHELL_TELNET_PORT=26667 HTTP_SSL_LISTENER_PORT=28182 IIOP_SSL_MUTUALAUTH_PORT=23921 The instance, i2, was created on host jed-asqe-7 Command create-instance executed successfully. asadmin start-instance i2 Enter admin user name> admin Enter admin password for user "admin"> Waiting for i2 to start ................................... Successfully started the instance: i2 instance Location: /opt/glassfish3/glassfish/nodes/node2/i2 Log File: /opt/glassfish3/glassfish/nodes/node2/i2/logs/server.log Admin Port: 24849 Command start-local-instance executed successfully. The instance, i2, was started on host jed-asqe-7 Command start-instance executed successfully. asadmin stop-instance i2 Enter admin user name> admin Enter admin password for user "admin"> remote failure: Error trying to stop the instance named i2 : javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake Command stop-instance failed. asadmin enable-secure-admin Enter admin user name> admin Enter admin password for user "admin"> You must restart all running servers for the change in secure admin to take effect. Command enable-secure-admin executed successfully. asadmin stop-instance i2 Enter admin user name> admin Enter admin password for user "admin"> remote failure: Error trying to stop the instance named i2 : javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake Command stop-instance failed. asadmin list-instances Enter admin user name> admin Enter admin password for user "admin"> i2 not running Command list-instances executed successfully. asadmin start-instance i2 Enter admin user name> admin Enter admin password for user "admin"> Instance i2 is already running. Command start-instance executed successfully. ========================================================= Reproduced the issue on two platforms.
        Hide
        Tim Quinn added a comment -

        I was not able to reproduce this problem using the current trunk for GlassFish 4.0.

        We did have issues with earlier releases but to my knowledge those were all fixed.

        If this problem recurs with 4.0 please re-open the issue.

        Show
        Tim Quinn added a comment - I was not able to reproduce this problem using the current trunk for GlassFish 4.0. We did have issues with earlier releases but to my knowledge those were all fixed. If this problem recurs with 4.0 please re-open the issue.

          People

          • Assignee:
            Tim Quinn
            Reporter:
            easarina
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: