hivemq-community-edition
hivemq-community-edition copied to clipboard
[HiveMQTestContainer] - Latest versions doesnt start due to a docker image permission error
I am getting the following error when I run a test with HiveMQContainer
tag hivemq/hivemq-ce:latest
(latest
-> 2024.3
)
2024-02-27 19:47:02,646 ERROR [tc.hivemq/hivemq-ce:latest] (pool-2-thread-1) Log output from the failed container:
cp: cannot stat '/opt/hivemq/temp-extensions/*': No such file or directory
chmod: changing permissions of '/opt/hivemq/extensions': Operation not permitted
chmod: changing permissions of '/opt/hivemq/extensions/hivemq-allow-all-extension': Operation not permitted
chmod: changing permissions of '/opt/hivemq/extensions/hivemq-allow-all-extension/LICENSE': Operation not permitted
chmod: changing permissions of '/opt/hivemq/extensions/hivemq-allow-all-extension/README.html': Operation not permitted
chmod: changing permissions of '/opt/hivemq/extensions/hivemq-allow-all-extension/README.txt': Operation not permitted
chmod: changing permissions of '/opt/hivemq/extensions/hivemq-allow-all-extension/hivemq-allow-all-extension-1.0.0.jar': Operation not permitted
chmod: changing permissions of '/opt/hivemq/extensions/hivemq-allow-all-extension/hivemq-extension.xml': Operation not permitted
Reproducer:
hivemqContainer.withHiveMQConfig(MountableFile.forClasspathResource(CONFIG_FILE_NAME));
hivemqContainer.withCopyFileToContainer(MountableFile.forHostPath("src/test/resources/certs/hivemq.jks"),
"/opt/hivemq/conf/hivemq.jks");
hivemqContainer.withCopyFileToContainer(MountableFile.forHostPath("src/test/resources/certs/hivemq-trust-store.jks"),
"/opt/hivemq/conf/hivemq-trust-store.jks");
...
hivemqContainer.start();
Actual behavior
The above code should work as documented on HiveMQ testcontainers
Details
- Affected HiveMQ CE version(s):
2024.3
- Works on
2024.2
Could be related to this commit
There is an issue in the hivemq testcontainer that is causing these permission issues. Fix PR: https://github.com/testcontainers/testcontainers-java/pull/8399
This is already fixed and released with testcontainers 1.19.7.