Lilia
Lilia

Reputation: 77

ActiveMQ Artemis can't get queue stat

There is a command of ./artemis that should display the statistics of queues : ./artemis queue stat (the last one):

The most commonly used artemis commands are:
    address     Address tools group (create|delete|update|show) (example ./artemis address create)
    browser     It will browse messages on an instance
    consumer    It will consume messages from an instance
    create      creates a new broker instance
    data        data tools group (print) (example ./artemis data print)
    help        Display help information
    mask        mask a password and print it out
    migrate1x   Migrates the configuration of a 1.x Artemis Broker
    producer    It will send messages to an instance
    queue       Queue tools group (create|delete|update|stat|purge) (example ./artemis queue create)

However, when I try to use it ./artemis queue stat --user=master --password=master --url=tcp://0.0.0.0:1616, I get

Exception in thread "main" ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ219014: Timed out after waiting 30,000 ms for response when sending packet -12]

The ActiveMQ Artemis broker is running on remote machine on port 1616.

The attempt of creating queue by these commands was successful, but I also failed to purge queue by this way.

Is there any ideas of what going wrong?

Upvotes: 0

Views: 1573

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 35142

If the broker is running on a different machine than the one where you're running the queue stat command then the url tcp://0.0.0.0:1616 will not work. The address 0.0.0.0 is a special meta-address which is only really useful for a process which is receiving network connections (i.e. acting as a server). This address allows the server to receive connections on all network interfaces. It will not function correctly on a client. You can read more about 0.0.0.0 here.

Upvotes: 1

Related Questions