glassfish
  1. glassfish
  2. GLASSFISH-20675

password alias does not work for create-jmsdest

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0_b89_RC5
    • Component/s: jms
    • Labels:
      None
    • Environment:

      Windows 7

      Description

      Password alias does not work for create-jmsdest.

      To reproduce the issue

      1. Create password alias
      asadmin create-password-alias jms-password

      2. Set password alias
      C:\>asadmin set server.jms-service.jms-host.default_JMS_host.admin-password=$

      {ALIAS=jmspassword-alias}

      3. Execute create-jmsdest

      C:\>asadmin create-jmsdest --desttype queue JMSQueue2
      remote failure: Unable to create JMS Destination.
      Command create-jmsdest failed.

      server.log shows the following error.

      [2013-07-02T12:35:20.874+1000] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=35 _ThreadName=admin-listener(2)] [timeMillis: 1372732520874] [levelValue: 1000] [[
      Error in dealiasing the password ${ALIAS=jmspassword-alias}

      : Alias jmspassword-alias does not exist]]

      [2013-07-02T12:35:20.887+1000] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=35 _ThreadName=Thread-4] [timeMillis: 1372732520887] [levelValue: 1000] [[
      java.lang.SecurityException: JMX connector server jmxrmi: Failure detected during authentication com.sun.messaging.jmq.auth.api.FailedLoginException: [B4051]: Forbidden admin
      at com.sun.messaging.jmq.jmsserver.management.agent.MQJMXAuthenticator.authenticate(MQJMXAuthenticator.java:135)
      at javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:232)
      at javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:199)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      4. Note that create-jms-resource works as expected.
      C:\>asadmin create-jms-resource --restype javax.jms.ConnectionFactory jms/DurableConnectionFactory
      Connector resource jms/DurableConnectionFactory created.
      Command create-jms-resource executed successfully.

        Activity

        Hide
        David Zhao added a comment - - edited

        The case is invalid that you are using different password alias. It is jms-password when creating, and jmspassword-alias when saving.

        1. Create password alias
        asadmin create-password-alias jms-password

        2. Set password alias
        C:\>asadmin set server.jms-service.jms-host.default_JMS_host.admin-password=${ALIAS=jmspassword-alias}

        Show
        David Zhao added a comment - - edited The case is invalid that you are using different password alias. It is jms-password when creating, and jmspassword-alias when saving. 1. Create password alias asadmin create-password-alias jms-password 2. Set password alias C:\>asadmin set server.jms-service.jms-host.default_JMS_host.admin-password=${ALIAS= jmspassword-alias }
        Hide
        tak09 added a comment - - edited

        I still have the same problem with the same password alias.
        Please see below.

        Microsoft Windows [Version 6.1.7601]
        Copyright (c) 2009 Microsoft Corporation. All rights reserved.

        C:\>asadmin start-domain
        Waiting for domain1 to start ..........................
        Successfully started the domain : domain1
        domain Location: C:\glassfish\glassfish-4.0\glassfish4\glassfish\domains\domain1
        Log File: C:\glassfish\glassfish-4.0\glassfish4\glassfish\domains\domain1\logs\server.log
        Admin Port: 4848
        Command start-domain executed successfully.

        C:\>asadmin create-password-alias jms-password-alias
        Enter the alias password>
        Enter the alias password again>
        Command create-password-alias executed successfully.

        C:\>asadmin set server.jms-service.jms-host.default_JMS_host.admin-password=$

        {ALIAS=jms-password-alias}
        server.jms-service.jms-host.default_JMS_host.admin-password=${ALIAS=jms-password-alias}

        Command set executed successfully.

        C:\>asadmin create-jmsdest --desttype queue JMSQueue2
        remote failure: Unable to create JMS Destination.
        Command create-jmsdest failed.

        C:\>

        Show
        tak09 added a comment - - edited I still have the same problem with the same password alias. Please see below. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\>asadmin start-domain Waiting for domain1 to start .......................... Successfully started the domain : domain1 domain Location: C:\glassfish\glassfish-4.0\glassfish4\glassfish\domains\domain1 Log File: C:\glassfish\glassfish-4.0\glassfish4\glassfish\domains\domain1\logs\server.log Admin Port: 4848 Command start-domain executed successfully. C:\>asadmin create-password-alias jms-password-alias Enter the alias password> Enter the alias password again> Command create-password-alias executed successfully. C:\>asadmin set server.jms-service.jms-host.default_JMS_host.admin-password=$ {ALIAS=jms-password-alias} server.jms-service.jms-host.default_JMS_host.admin-password=${ALIAS=jms-password-alias} Command set executed successfully. C:\>asadmin create-jmsdest --desttype queue JMSQueue2 remote failure: Unable to create JMS Destination. Command create-jmsdest failed. C:\>
        Hide
        David Zhao added a comment -

        What are the error messages in server.log?

        Show
        David Zhao added a comment - What are the error messages in server.log?
        Hide
        tak09 added a comment -

        [2013-07-02T16:02:02.925+1000] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1372744922925] [levelValue: 1000] [[
        java.lang.SecurityException: JMX connector server jmxrmi: Failure detected during authentication com.sun.messaging.jmq.auth.api.FailedLoginException: [B4051]: Forbidden admin
        at com.sun.messaging.jmq.jmsserver.management.agent.MQJMXAuthenticator.authenticate(MQJMXAuthenticator.java:135)
        at javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:232)
        at javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:199)

        ....... contiunes.

        Show
        tak09 added a comment - [2013-07-02T16:02:02.925+1000] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1372744922925] [levelValue: 1000] [[ java.lang.SecurityException: JMX connector server jmxrmi: Failure detected during authentication com.sun.messaging.jmq.auth.api.FailedLoginException: [B4051] : Forbidden admin at com.sun.messaging.jmq.jmsserver.management.agent.MQJMXAuthenticator.authenticate(MQJMXAuthenticator.java:135) at javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:232) at javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:199) ....... contiunes.
        Hide
        tak09 added a comment -

        server.log and screenshot are available here.
        https://www.dropbox.com/sh/ohsgcldetn89r2m/zecKTw3tWb

        Show
        tak09 added a comment - server.log and screenshot are available here. https://www.dropbox.com/sh/ohsgcldetn89r2m/zecKTw3tWb
        Hide
        David Zhao added a comment -

        The error message means wrong password - either alias is not found or the unaliased password is wrong.

        1. Please make sure you can do create-jmsdest successfully without password alias, for example, asadmin set server.jms-service.jms-host.default_JMS_host.admin-password=admin

        2. Make sure you created password alias with correct password: It is 'admin' by default.

        I tried password alias by inputing password 'admin' at my environment, and create-jmsdest does work for me.

        Show
        David Zhao added a comment - The error message means wrong password - either alias is not found or the unaliased password is wrong. 1. Please make sure you can do create-jmsdest successfully without password alias, for example, asadmin set server.jms-service.jms-host.default_JMS_host.admin-password=admin 2. Make sure you created password alias with correct password: It is 'admin' by default. I tried password alias by inputing password 'admin' at my environment, and create-jmsdest does work for me.
        Hide
        Kevin Dean added a comment -

        This may be related to https://java.net/jira/browse/GLASSFISH-20938; see that issue for a description of the underlying problem.

        Show
        Kevin Dean added a comment - This may be related to https://java.net/jira/browse/GLASSFISH-20938 ; see that issue for a description of the underlying problem.

          People

          • Assignee:
            David Zhao
            Reporter:
            tak09
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: