Skip to main content

Troubleshooting Guide: RabbitMQ Connectivity Issues in R2R

RabbitMQ is a critical component in the R2R architecture, used for message queuing and task orchestration. Connectivity issues can disrupt the entire system. This guide will help you diagnose and resolve common RabbitMQ connectivity problems.

1. Verify RabbitMQ Service Status

First, ensure that the RabbitMQ service is running:
If you don’t see the RabbitMQ container running, start it:

2. Check RabbitMQ Logs

View the RabbitMQ container logs:
Look for error messages related to connectivity, authentication, or resource issues.

3. Verify RabbitMQ Connection Settings

Ensure that the connection settings in your R2R configuration match the RabbitMQ service:
  1. Check the SERVER_TASKQUEUE_RABBITMQ_URL environment variable in the hatchet-setup-config service.
  2. Verify that the URL format is correct: amqp://user:password@hatchet-rabbitmq:5672/

4. Common Issues and Solutions

4.1 Authentication Failures

Symptom: Logs show authentication errors. Solution:
  1. Verify the RabbitMQ credentials:
  2. If necessary, reset the password:
  3. Update the SERVER_TASKQUEUE_RABBITMQ_URL in your R2R configuration with the new credentials.

4.2 Network Connectivity

Symptom: Services can’t connect to RabbitMQ. Solution:
  1. Ensure all services are on the same Docker network:
  2. Verify that the RabbitMQ service is accessible within the network:

4.3 Port Conflicts

Symptom: RabbitMQ fails to start due to port conflicts. Solution:
  1. Check if the ports are already in use:
  2. Modify the port mappings in your Docker Compose file if necessary.

4.4 Resource Constraints

Symptom: RabbitMQ becomes unresponsive or crashes frequently. Solution:
  1. Check RabbitMQ resource usage:
  2. Increase resources allocated to the RabbitMQ container in your Docker Compose file:

4.5 File Descriptor Limits

Symptom: RabbitMQ logs show warnings about file descriptor limits. Solution:
  1. Increase the file descriptor limit for the RabbitMQ container:

5. Advanced Troubleshooting

5.1 RabbitMQ Management Interface

Access the RabbitMQ Management Interface for detailed diagnostics:
  1. Enable the management plugin if not already enabled:
  2. Access the interface at http://localhost:15672 (use the credentials defined in your Docker Compose file).

5.2 Network Packet Capture

If you suspect network issues, capture and analyze network traffic:
Analyze the captured file with Wireshark for detailed network diagnostics.

5.3 RabbitMQ Cluster Status

If you’re running a RabbitMQ cluster, check its status:

6. Preventive Measures

  1. Implement health checks in your Docker Compose file:
  2. Set up monitoring and alerting for RabbitMQ using tools like Prometheus and Grafana.
  3. Regularly backup RabbitMQ definitions and data:
By following this guide, you should be able to diagnose and resolve most RabbitMQ connectivity issues in your R2R deployment. If problems persist, consider seeking help from the RabbitMQ community or consulting the official RabbitMQ documentation for more advanced troubleshooting techniques.