Replies: 3 comments 3 replies
-
Try Right now, you are asking the CLI to tell you about the status of all nodes, but some of them don't respond yet, so the error seems to be the correct behaviour. They could be unresponsive for all kinds of other reasons, including actual cluster issues. Cluster membership will be completely reworked in 4.0, so the behaviour in this situation might change in the relatively near future. |
Beta Was this translation helpful? Give feedback.
-
suggests that the node is still booting, the hostname is off or CLI tools do not resolve the hostname of their own container the way the host or other containers do. This is not a crash. See RabbitMQ node logs for evidence. |
Beta Was this translation helpful? Give feedback.
-
@tijoer - forming dev clusters in docker works much better using docker compose. Please see the following: https://github.com/lukebakken/docker-rabbitmq-cluster |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everybody,
I setup a small repository with a Devcontainer that provides a small script with reproducible behavior. You can find it here: https://github.com/tijoer/RabbitMQStartupBug/tree/main and click on the button in the Readme.md to start a Devcontainer and then run the script in a terminal.
Situation
https://github.com/tijoer/RabbitMQStartupBug/blob/main/demonstratedBug.sh
I want to start three RabbitMQ Nodes in a Docker network:
In the next step I want to join these three instances in a cluster, using the following code:
However as soon as the first
rabbitmqctl cluster_status
is run, the startup will fail with the following text:https://github.com/tijoer/RabbitMQStartupBug/blob/main/output.txt
Expected behavior
Three running nodes, all connected to a cluster. You can check the Ports tab in the Devcontainer and should see three running instances and be able to open the management boards.
What workaround did I try instead
Not working
Running rabbitmqctl cluster_status on rabbit-1 in a loop to check if the node is up an healthy.
Working
Adding a
sleep 2
into the script. (Horrible solution but it works.)Affected versions
I tried 3.11 and 3.12-RC1. I only tried the official images and did not install it myself.
Assumption
Starting the RabbitMQ nodes with a passed Erlang cookie and then running rabbitmqctl commands against the node results in unexpected behavior. There might also be some connection with running the containers with --detach, but I am not sure about that.
Additional information
This bug is mostly a problem in integration test scenarios, where you want to spin up and down RabbitMQ clusters to run your testcases against them. In most production scenarios the startup would just be repeated again and everything works fine.
Beta Was this translation helpful? Give feedback.
All reactions