Repository navigation
Closed
Description
It seems to be both docker and testcontainers issue:
Running name.antonsmirnov.apptogether.dao.DeveloperDaoTest
08:08:56.040 [main] INFO EnvironmentAndSystemPropertyClientProviderStrategy - Found docker client settings from environment
08:08:56.060 [main] INFO DockerClientProviderStrategy - Found Docker environment with Environment variables, system properties and defaults. Resolved:
dockerHost=tcp://localhost:2375
apiVersion='{UNKNOWN_VERSION}'
registryUrl='https://index.docker.io/v1/'
registryUsername='root'
registryPassword='null'
registryEmail='null'
dockerConfig='DefaultDockerClientConfig[dockerHost=tcp://localhost:2375,registryUsername=root,registryPassword=<null>,registryEmail=<null>,registryUrl=https://index.docker.io/v1/,dockerConfigPath=/root/.docker,sslConfig=<null>,apiVersion={UNKNOWN_VERSION},dockerConfig=<null>]'
08:08:56.066 [main] INFO DockerClientFactory - Docker host IP address is localhost
08:08:56.227 [main] INFO DockerClientFactory - Connected to docker:
Server Version: 17.12.0-ce
API Version: 1.35
Operating System: Alpine Linux v3.7 (containerized)
Total Memory: 32171 MB
08:08:57.182 [testcontainers-netty-1-6] ERROR ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.DockerException: {"message":"authorization denied by plugin pipelines: Command not supported."}
at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:111) [testcontainers-1.7.2.jar:na]
at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1342) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:934) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [testcontainers-1.7.2.jar:na]
at org.testcontainers.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) [testcontainers-1.7.2.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.211 sec <<< FAILURE!
Fabric docker plugin had the same issue and they were able to fix it with relatively small changes in plugin. See issues:
- https://bitbucket.org/site/master/issues/15844/bug-in-authorization-plugin#comment-45553072
- https://bitbucket.org/site/master/issues/15505/maven-fabric8-plugin-fails-to-run-docker
This is blocker issue and can be easily fixed.
Reacted by Nick Iusiumbeli, Bojan Trajkovski and AmaarHassan
Activity
[-]Not working in Bitbucket pipeline.[/-][+]Not working in Bitbucket pipeline: "authorization denied by plugin pipelines: Command not supported."[/+]4ntoine commentedon May 17, 2018
testcontainers
1.7.2usedkiview commentedon May 17, 2018
Hey @4ntoine, thank for the feedback regarding Bitbucket pipeline.
I'm not sure yet it it's easy to fix, our aux container (Ryuk) needs to mount the docker socket and from a quick look at the linked discussion, this is forbidden in Bitbucket pipelines.
nathanburrell commentedon May 18, 2018
Hey @kiview test-containers works in pipelines, the issue above (as I described here: https://bitbucket.org/site/master/issues/15844/bug-in-authorization-plugin#comment-45561539) is not an issue in the auth plugin interaction with the custom java docker client nor an issue with how the library talks to docker (its working fine over tcp) its in how the MySqlContainer class by default mounts the mysql.conf file.
Users will (in order for this to work on pipelines), need to reconfigure the default (hostPath) directory for this file as we limit what paths can be mounted into docker containers due to the layout of how the containers and filesystems interact, and than the library works fine :)
kiview commentedon May 18, 2018
Hi @nathanburrell, thanks a lot for the clarification.
So how should we ideally tackle this? Change our
MySqlContainerimplementation, or mention it in the docs as a workaround for pipelines compatibility?4ntoine commentedon May 18, 2018
I believe paths should be adjusted to be in allowed by Bitbucket, see debug on local machine:

Issue testcontainers#700 - Not working in Bitbucket pipeline: "author…
kiview commentedon Jun 8, 2018
Hey @4ntoine, would you like to submit your fix as a PR? We can look into it together.
Whoops sorry, you've already submitted the PR in #704
4ntoine commentedon Jun 8, 2018
sorry i did not have time to fix, but i was able to use https://github.com/palantir/docker-compose-rule instead (it works)
dstepanov commentedon Aug 6, 2018
Can you provide a way to disable Ryuk?
I have found workaround:
It's ignoring first exception caused by Ryuk trying to connect to
docker.sock. Is there a way to not use sock interactions?bsideup commentedon Aug 6, 2018
Hi @dstepanov,
DIsabling Ryuk doesn't fix the issue, rather delays it. Does it work if you disable the startup checks? See here how to do that: https://www.testcontainers.org/usage/properties.html
22 remaining items
raulgomis commentedon Jan 24, 2019
Hey @rnorth ,
Any updates on this? Have you guys discussed it internally (cc: @kiview @bsideup)?
Having an opt-out parameter to disable Ryuk would work for all CI/CD use cases (like Bitbucket Pipelines). At the moment we have two sets of customers impacted:
I would appreciate your help here, so that we reduce the impact to our customers and they can keep using testcontainers happily in Bitbucket Pipelines.
Cheers,
Raul
rnorth commentedon Jan 24, 2019
Hi Raul, Nathan,
I’m very sorry for not replying sooner. Yes, we have had internal discussions and agree that disabling the Ryuk component via an environment variable is the best path forward.
@bsideup is working on it and we’d like to get this released very soon and communicated out to users.
Thank you for your help, and I apologise again.
Richard
Sent with GitHawk
kiview commentedon Jan 24, 2019
Hi @raulgomis,
we've discussed this together in our call yesterday and we decided to solve this with #1023.
This will be a quite non invasive hack/fix and most probably won't impact the Testcontainers UX on Bitbucket Pipelines negatively, since the containers should be removed by CI environment automatically after the build.
raulgomis commentedon Jan 24, 2019
Great news!
Thanks a lot team 🙌, our users will love that you guys are planning to fix it.
Cheers,
Raul
bsideup commentedon Jan 25, 2019
Hi @raulgomis & @nathanburrell,
I just pushed a PR:
#1181
If you set
TESTCONTAINERS_RYUK_DISABLEDenvironment variable totrue, we will not start Ryuk:https://5c4c37a5560ab600080292aa--testcontainers.netlify.com/features/configuration/#disabling-ryuk
Please try it with Jitpack (revision
03a5c368ae) if you have time:https://www.testcontainers.org/jitpack_dependencies/
schrieveslaach commentedon Jan 25, 2019
@bsideup, I tried to use your PR and now I can start containers with a docker setup providing container isolation with a user namespace mapping (see #712).
bsideup commentedon Jan 25, 2019
@schrieveslaach thanks for trying!
FYI the
usernsparameter will be supported once we integrate #1007schrieveslaach commentedon Jan 25, 2019
@bsideup, thanks for pointing out this PR. I was going to ask you exactly that question. 😉
rnorth commentedon Jan 30, 2019
We've now released this in Testcontainers 1.10.6!
Please upgrade as soon as you can and follow the steps here for disabling Ryuk: https://www.testcontainers.org/features/configuration/#disabling-ryuk
I'll close this ticket now, but please keep us posted if there are any new issues with this.
modye commentedon Jan 30, 2019
Thanks a lot, this is working like a charm in Bitbucket 😄
nathanburrell commentedon Jan 30, 2019
Thanks for actioning this quickly :)
We are organising some communicuations to customers in the coming weeks to tell them to update and set that variable, and I can also continue to start using test-containers more in the pipelines codebase itself ;)
andreppires commentedon May 28, 2019
Hey, @nathanburrell is test-containers fully working on the bitbucket pipeline at this point? I'm, guessing that it is, but I'm having some problems using it with Cassandra. Basically, locally the tests passed but on bitbucket pipeline that seems to be a problem to communicate with the Cassandra container.
czunker commentedon Aug 19, 2021
Hi,
Thanks a lot. The issues #700 and #1135 helped me, to get testcontainers running in Jenkins with
dind-rootlessinside Kubernetes.In hope, this might help someone else, a stripped down example for a Jenkins build job pod definition:
Maciag312 commentedon Oct 13, 2022
It seems upgrading test containers version to 1.16.0 solved the issue.