Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-2423

activemq:browse command requires user and password parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 7.2.0
    • activemq
    • None

    Description

      Starting with ActiveMQ 5.11.0 and 5.10.1 it is possible to use the command activemq:browse again.

      Currently it's necessary to provide the user and password parameters.

      karaf@root> jms:send jms/amq-broker test-queue "test message 1"
      karaf@root> jms:send jms/amq-broker test-queue "test message 2"
      karaf@root> browse --amqurl tcp://localhost:61616 --user smx --password smx  test-queue
      JMS_BODY_FIELD:JMSText = test message 1
      JMS_HEADER_FIELD:JMSExpiration = 0
      JMS_HEADER_FIELD:JMSMessageID = ID:lenovo-43362-1422306328716-15:5:1:1:1
      JMS_HEADER_FIELD:JMSPriority = 4
      JMS_HEADER_FIELD:JMSDestination = test-queue
      JMS_HEADER_FIELD:JMSTimestamp = 1422306717010
      JMS_HEADER_FIELD:JMSRedelivered = false
      JMS_HEADER_FIELD:JMSDeliveryMode = persistent
      
      JMS_BODY_FIELD:JMSText = test message 2
      JMS_HEADER_FIELD:JMSExpiration = 0
      JMS_HEADER_FIELD:JMSMessageID = ID:lenovo-43362-1422306328716-15:6:1:1:1
      JMS_HEADER_FIELD:JMSPriority = 4
      JMS_HEADER_FIELD:JMSDestination = test-queue
      JMS_HEADER_FIELD:JMSTimestamp = 1422306719567
      JMS_HEADER_FIELD:JMSRedelivered = false
      JMS_HEADER_FIELD:JMSDeliveryMode = persistent
      

      Otherwise the command fails

      karaf@root> browse --amqurl tcp://localhost:61616   test-queue
      ERROR: java.lang.RuntimeException: Failed to execute browse task. Reason: javax.jms.JMSSecurityException: User name [null] or password is invalid.
      java.lang.RuntimeException: Failed to execute browse task. Reason: javax.jms.JMSSecurityException: User name [null] or password is invalid.
      	at org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:155)
      	at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
      	at org.apache.activemq.karaf.commands.ActiveMQCommandSupport.doExecute(ActiveMQCommandSupport.java:49)
      	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
      	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
      	at org.apache.karaf.shell.console.jline.Console.run(Console.java:184)
      	at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
      Error executing command: javax.jms.JMSSecurityException: User name [null] or password is invalid.
      

      We should find a solution how can we configure credentials for this command (e.g. like for the ActoveMQ web console). We should probably open a new issue in ActiveMQ JIRA, but opening it here to track the problem.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sobkowiak Krzysztof Sobkowiak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: