Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HiveMQTestContainer] - Latest versions doesnt start due to a docker image permission error #468

Closed
pjgg opened this issue Feb 27, 2024 · 2 comments

Comments

@pjgg
Copy link

pjgg commented Feb 27, 2024

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
@SgtSilvio
Copy link
Member

There is an issue in the hivemq testcontainer that is causing these permission issues.
Fix PR: testcontainers/testcontainers-java#8399

@SgtSilvio
Copy link
Member

This is already fixed and released with testcontainers 1.19.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants