Troubleshoot "[Errno 111] Connection refused" error for RabbitMQ plugins
When installing the
RabbitMQ plugin, you may encounter the following error:
urlopen error [Errno 111] Connection refused: This error usually occurs when the plugin tries to connect with the RabbitMQ server but is unable to establish a connection.
Here are some ways you can troubleshoot the issue.
- Verify that the RabbitMQ service is running: The RabbitMQ server might not be running or is starting up. Ensure that the RabbitMQ service is up and running. You can execute the command below to check the status of the RabbitMQ server:
sudo systemctl status rabbitmq-server
- Check the host and port: You might be trying to connect to the wrong IP address or port. RabbitMQ typically runs on port 5672, and the management plugin runs on port 15672. Make sure you're connecting to the right host and port.
- Review network and firewall issues: Check if there are any firewall rules blocking access to the RabbitMQ server's port (usually 5672 and 15672). Ensure they are open in your firewall and that your internet connection is working correctly.
- Check the URL: Check if the RabbitMQ management interface URL is accessible from a browser. The default URL is http://localhost:15672/api/overview. If you are using a specific IP address, replace localhost with the IP address in the URL.
- Check logs: Review RabbitMQ's log files for any error messages or warnings that might provide more information about the issue. The log files are usually located in /var/log/rabbitmq/.
Once you've made changes based on the checks above, restart the Site24x7 server monitoring agent or re-register the plugin. Within five minutes, you should be able to view performance metrics in Site24x7.