Unable to connect to RabbitMQ in Adobe Commerce Cloud
In Adobe Commerce on Cloud infrastructure development or integration environment, the RabbitMQ service fails to connect, resulting in a connection refused error. This typically occurs when the service isn’t running or is misconfigured, especially after an upgrade. To resolve the issue, verify service status and perform sequential upgrades.
Description description
Environment
Adobe Commerce on Cloud infrastructure
Issue/Symptoms
An error is encountered indicating a failure to connect to RabbitMQ in the development/integration environment, which includes the following error: stream_socket_client(): Unable to connect to tcp://rabbitmq.internal:5672 (Connection refused).
This indicates that the RabbitMQ service is either not running or not reachable at the specified host and port, and the issue may occur after upgrading RabbitMQ.
Resolution resolution
To fix the RabbitMQ connection issue in Adobe Commerce Cloud:
-
Ensure RabbitMQ is installed and running. Confirm it’s listening on port
15672
by running:code language-none curl -u guest:guest http://rabbitmq.internal:15672/api/vhosts |json_pp
-
If you see the following error, RabbitMQ may not be installed or configured correctly:
code language-none Only sequential upgrades are supported. Please refer to https://docs.platform.sh/add-services/rabbitmq.html#upgrading.
-
If you were upgrading RabbitMQ, restart the upgrade process and ensure you follow the correct version sequence. Do not skip intermediate versions. Upgrade RabbitMQ from the original version in the following order:
- 3.8 to 3.9
- 3.9 to 3.10
- 3.10 to 3.11
- 3.11 to 4.0
- 4.0 to 4.1
-
Ensure the application uses valid credentials and has the necessary permissions to connect to RabbitMQ.
If these steps don’t resolve the issue, investigate your environment’s configuration further.
Related reading
- Set up the RabbitMQ service in the Commerce on Cloud Guide
- The RabbitMQ tab in the Commerce Tools documentation