Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-6799

Artemis producer command when prompting for a user / password raise an error

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Hide
      • Create a broker instance, do not allow anonymous access. 
      • Try sending messages with the artemis producer command without passing the user/password and you will be prompted with an error stack as given in the description
      Show
      Create a broker instance, do not allow anonymous access.  Try sending messages with the artemis producer command without passing the user/password and you will be prompted with an error stack as given in the description

    Description

      If I pass the user and password to the Artemis producer command I have no issue and it works as expected:

      ./artemis producer --destination helloword --message-count 100 --user *** --password *** --url tcp://<my_host>:61616

      However, if I omit the user and password, and I let artemis to prompt me for both, I am getting the exception:

      Exception in thread "main" javax.jms.JMSSecurityException: AMQ229031: Unable to validate user from /10.112.4.141:44418. Username: null; SSL certificate subject DN: unavailable
      at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:554)
      at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:446)
      at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:306)
      at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:254)
      at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionChannel(ClientSessionFactoryImpl.java:1419)
      at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:736)
      at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:317)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnection.authorize(ActiveMQConnection.java:650)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:901)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:284)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:279)
      at org.apache.activemq.artemis.cli.commands.messages.Producer.execute(Producer.java:142)
      at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:160)
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:108)
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:135)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134)
      at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50)
      Caused by: ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ229031: Unable to validate user from /10.112.4.141:44418. Username: null; SSL certificate subject DN: unavailable]

      Even, my audit log indicates that no user is passed in that case:

      2022-07-01 15:44:07,639 [AUDIT](Thread-0 (activemq-netty-threads)) AMQ601716: User anonymous@10.112.4.141:44418 failed authentication, reason: AMQ229031: Unable to validate user from /10.112.4.141:44418. Username: null; SSL certificate subject DN: unavailable

      Attachments

        Activity

          People

            rhn-support-jbertram Justin Bertram
            rhn-support-ychopada Yashashree Chopada
            Michal Toth Michal Toth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: