Troubleshoot Error 401 (Unauthorized error) for RabbitMQ
When installing the RabbitMQ monitoring plugins, you may encounter the following error:
HTTP Error 401: Unauthorized: This error occurs when the user attempts to access the /api/overview endpoint of RabbitMQ server, which requires authentication, but the credentials were not provided or were incorrect.Here are some ways to troubleshoot the issue and resolve the error:
- Check the credentials in the plugin .cfg file: Ensure you have provided correct credentials in the RabbitMQ plugin configuration (.cfg) file to connect with the RabbitMQ server.
- Try accessing with the default credentials: If you haven't changed your credentials, try accessing the API with the following credentials:
Username: guest
Password: guest
- Provide authentication: When accessing the API, make sure to provide authentication. If you're using curl, you can provide the username and password as follows:
curl -i -u guest:guest http://localhost:15672/api/overview
- Reset credentials: If you've changed the default credentials and forgot them, you may need to reset them. You can do this by updating the RabbitMQ configuration and restarting the service.
- Provide the necessary user permissions: Ensure that the user trying to access RabbitMQ has the required permissions. In newer versions of RabbitMQ, the guest user is typically limited to the local host. If you're attempting to access the API from a remote machine where you've installed the Site24x7 server agent, you'll need to employ a different user or adjust the permissions for the guest user.
- Try accessing the RabbitMQ management UI: Try accessing the RabbitMQ management UI, which is usually at http://localhost:15672/. If you can successfully log in with your credentials, the issue might be related to how you're providing the credentials to the API.
- Examine the logs: Check the RabbitMQ logs for any authentication-related errors or warnings. This can provide more insight into why the authentication is failing.
- Verify RabbitMQ configuration: Ensure that there's no custom configuration in your RabbitMQ setup that may cause the management interface to behave unexpectedly. Check the RabbitMQ configuration file for any settings related to user management or authentication.
- Create a new user: As a temporary solution, you can create a new user, assign the necessary permissions, and then use this user to access the API:
rabbitmqctl add_user new_username new_password
rabbitmqctl set_user_tags new_username administrator
rabbitmqctl set_permissions -p / new_username ".*" ".*" ".*"
After creating the new user, attempt to access the API using the new credentials.
- Reinstall the management plugin: Sometimes, disabling and then re-enabling the management plugin can resolve issues:
rabbitmq-plugins disable rabbitmq_management
rabbitmq-plugins enable rabbitmq_management
Once you've made changes based on the checks above, restart the Site24x7 server monitoring agent or reregister the plugin. Within five minutes, you should be able to view performance metrics in Site24x7.

Related Articles
Troubleshoot the Error 404 and Error 99 for RabbitMQ
When installing the RabbitMQ plugin, you may encounter the following errors: HTTP Error 404: Not Found: This error usually occurs when Site24x7's RabbitMQ monitoring plugin attempts to access the /api/overview page of RabbitMQ, but the resource ...
Troubleshoot the Unauthorized user (Error 401) when installing Tomcat plugins
When installing Tomcat plugins, you may encounter the following error: Unauthorized user. Does not have permissions. HTTP Error 401: This error usually occurs when the user accessing the Tomcat Manager application does not have the necessary ...
Troubleshoot the "pymysql module not found" error when installing the MySQL plugin
If you're encountering the pymysql module not found error, it likely means that the pymysql Python library is not installed on the server. pymysql is a Python package that provides a way to interact with MySQL databases using Python code and is used ...
API exceeded error
Why do I get an API exceeded error after a few attempts? Every API has a certain limit to the number of requests a user can hit within a period of time, called the rate limit. An error message is triggered when a user does one of the following ...
How to configure the NGINX status page for monitoring NGINX performance
The NGINX plugin uses the NGINX status page to pull the performance metrics of the NGINX server. You may encounter the following errors while installing the NGINX plugin integration: Error_code : HTTP Error 404: This error usually indicates that the ...