RabbitMQ queue deleting error (403 forbidden)

Sachith Muhandiram
2 min readNov 6, 2023

--

What I am going to share is a thing happened to our team recently when trying to delete a queue from RabbitMQ. This had happened to some unique actions we had taken earlier.

We have deployed RabbitMQ as the message broker for one of our micro-service based solution. One of our micro-service got stuck due to faulty data received from 3rd party application. Therefore all other requests are pending.

When we face such thing, what we do is:

  • Backup the existing pending messages.
  • Delete the queue
  • Recreated the queue
  • Republish the recovered messages back to RabbitMQ.

This time, we did the backup process and when try to delete the queue, we got 403 Forbidden error. We rechecked our admin privileges and tried re logging to the RabbitMQ console. But it was still same, could not delete the queue.

We found that , we had done some changes to nginx configuration. We found this after some backtracking changes to the system.

limit_except GET POST { deny all; }

When try deleting a queue, it was using DELETE method. Which was blocked by nginx.

To resolve this issue, we had changed nginx config and reload nginx. After that we could delete queues without an issue.

limit_except GET POST DELETE { deny all; }

As I mentioned earlier this happened to us due to this change we made to the system. If you face similar issue, it could be due to another issue.

Hope this post will help someone to debug and solve their issue in future.

--

--

Sachith Muhandiram
Sachith Muhandiram

Written by Sachith Muhandiram

DevOps who is willing to learn and try new things.

No responses yet