Search code examples
apijmeterhttp-status-code-403activemq-artemis

JMeter 403 Forbidden


I have a problem with JMeter. When I try to send some request, it returns me a 403 Forbidden status code. I know that it needs an authentication, I've seen many things about that.

I'm working with Apache ActiveMQ Artemis. I need to execute some API request, which removes all messages in the queue. The API looks like that:

http://10.2.5.23:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22,component=addresses,address=%22TEST.GSH%22,subcomponent=queues,routing-type=%22anycast%22,queue=%22TEST.GSH%22/removeAllMessages()

When I try to execute it, it returns me a 403 Forbidden status code. I've tried to add HTTP Authorization Manager, added this url and typed username and password, but still it gives me the same output.

This is from where I login, also I added this in HTTP Authorization Manager and set the username and password. http://10.2.5.23:8161/console/login

Any idea or advice will help me.

I know that here are questions like mine, but I have not found what would help me.


Solution

  • The answer was quite simple. I've just added in HTTP Header Manager an authorization with Basic encoded. Now it works fine. But I have one question, why did HTTP Authorization Manager not work ? Why should i add authorization in header ? I can't make it only with HTTP Authorization Manager ?