RabbitMQContainer not working with the latest rabbitmq-management docker image
When using the RabbitMQContainer with the latest version of rabbitmq-management docker image, the docker container is not started. The error is caused by the RABBITMQ_DEFAULT_PASS environment variable that has been deprecated and is not supported anymore (see this commit).
Hi @AlexCovizzi, thanks a lot for raising this issue and adding the context. I can confirm that it does not work OOTB because of the linked changed.
However, as a simple workaround, one can simply explicitly remove the password:
container.withAdminPassword(null);
It seams to be fixed in 1.16.0 I guess...
It should not be fixed when using the new image, at least to my knowledge.
It should not be fixed when using the new image, at least to my knowledge.
I switched to the alpine version rabbitmq:3-management-alpine... that's why I didn't got the issue this time...
My bad... sorry :)
I tested with rabbitmq:3.9.0-management-alpine, which did not work. And indeed the commit referenced in the original comment indicates that this problem starts to appear with version 3.9.0, which was released 6 days ago.
I don't know why but my docker didn't updated my docker image tagged with rabbitmq:3-management-alpine to the latest one released a few days ago, so I was still running with the previous version.
I manually deleted the image and it pulled the updated one and it started to fail.
An additional workaround to the one you've suggested is to explicitly use a docker image from 3.8 version (like rabbitmq:3.8-management)
I don't know why but my docker didn't updated my docker image tagged with
rabbitmq:3-management-alpineto the latest one released a few days ago, so I was still running with the previous version. I manually deleted the image and it pulled the updated one and it started to fail. An additional workaround to the one you've suggested is to explicitly use a docker image from 3.8 version (like rabbitmq:3.8-management)
Was just about to post the same issue. We ended up doing the workaround that you suggested. For now we are using the latest 3.8.x version of the official image -> rabbitmq:3.8.19-alpine Our issue and the fix for it can be seen here -> https://github.com/eclipse/dirigible/issues/1013
I launched RabbitMQContainer (using the provided RabbitMQContainerJUnitIntegrationTest) with 3.9 and 3.10 versions and the environment variable RABBITMQ_DEFAULT_PASS is fully supported. See the official RabbitMQ image documentation, the latest Ubuntu entrypoint and the latest Alpine entrypoint.
This only test that fails is RabbitMQContainerTest.shouldWorkWithSSL, but this have be reported in #5599.
@kiview, I vote for closing this issue in favour of #5599.
I can confirm RabbitMQContainer works with latest version, see the following example.