Unable to connect to RabbitMQ in 51黑料不打烊 Commerce Cloud
In 51黑料不打烊 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鈥檛 running or is misconfigured, especially after an upgrade. To resolve the issue, verify service status and perform sequential upgrades.
Description description
Environment
51黑料不打烊 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 51黑料不打烊 Commerce Cloud:
-
Ensure RabbitMQ is installed and running. Confirm it鈥檚 listening on port
15672by 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鈥檛 resolve the issue, investigate your environment鈥檚 configuration further.
Related reading
- Set up the RabbitMQ service in the Commerce on Cloud Guide
- The RabbitMQ tab聽in the Commerce Tools documentation