DotNet.Testcontainers.Containers.ResourceReaperException : Initialization has been cancelled. - ADO self hosted build agent #1359
Unanswered
GeorgeB-RIB
asked this question in
Q&A
Replies: 1 comment 4 replies
-
|
Can you please try to mount the raw socket: |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm stuck. Can anybody assist me? We are running a Azure DevOps self hosted linux agent in a docker container and auto-scaling it using KEDA in our AKS cluster.
I'm trying to use dotnet-testcontainers to run unit and integration tests using the following CI pipeline and docker-compose file:
CI Pipeline:
docker-compose file:
The ADO agent docker image has docker installed and running along with all of the other build agent capabilities that we require.
I keep running into the following error (see output) when attempting to run testcontainers on our hosted linux agent. (It works perfectly using MS-Hosted runner-agents that run on vmImage as opposed to our docker image.
Testscontainers Error build output:
Starting test execution, please wait... A total of 1 test files matched the specified pattern. Failed Test2 [1 m 2 s] Error Message: DotNet.Testcontainers.Containers.ResourceReaperException : Initialization has been cancelled. Stack Trace: at DotNet.Testcontainers.Containers.ResourceReaper.GetAndStartNewAsync(Guid sessionId, IDockerEndpointAuthenticationConfiguration dockerEndpointAuthConfig, IImage resourceReaperImage, IMount dockerSocket, ILogger logger, Boolean requiresPrivilegedMode, TimeSpan initTimeout, CancellationToken ct) in /_/src/Testcontainers/Containers/ResourceReaper.cs:line 236 at DotNet.Testcontainers.Containers.ResourceReaper.GetAndStartNewAsync(Guid sessionId, IDockerEndpointAuthenticationConfiguration dockerEndpointAuthConfig, IImage resourceReaperImage, IMount dockerSocket, ILogger logger, Boolean requiresPrivilegedMode, TimeSpan initTimeout, CancellationToken ct) in /_/src/Testcontainers/Containers/ResourceReaper.cs:line 248 at DotNet.Testcontainers.Containers.ResourceReaper.GetAndStartDefaultAsync(IDockerEndpointAuthenticationConfiguration dockerEndpointAuthConfig, ILogger logger, Boolean isWindowsEngineEnabled, CancellationToken ct) in /_/src/Testcontainers/Containers/ResourceReaper.cs:line 135 at DotNet.Testcontainers.Clients.TestcontainersClient.RunAsync(IContainerConfiguration configuration, CancellationToken ct) in /_/src/Testcontainers/Clients/TestcontainersClient.cs:line 297 at DotNet.Testcontainers.Containers.DockerContainer.UnsafeCreateAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 416 at Testcontainers.WebDriver.WebDriverContainer.UnsafeCreateAsync(CancellationToken ct) in /_/src/Testcontainers.WebDriver/WebDriverContainer.cs:line 74 at DotNet.Testcontainers.Containers.DockerContainer.StartAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 280 at TestContainerSeleniumTest.Tests2.Test2() in /azp/_work/1/BIM6D-POC/TestContainerSeleniumTest/TestContainerSeleniumTest/UnitTests2.cs:line 22 at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted() at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](TestExecutionContext context, Func`1 invoke) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(TestExecutionContext context, Func`1 invoke) at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context) at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context) at NUnit.Framework.Internal.Execution.SimpleWorkItem.<>c__DisplayClass3_0.<PerformWork>b__0() at NUnit.Framework.Internal.ContextUtils.<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at NUnit.Framework.Internal.ContextUtils.DoIsolated(ContextCallback callback, Object state) at NUnit.Framework.Internal.ContextUtils.DoIsolated[T](Func`1 func) at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork() Standard Output Messages:It's obvious that RYUK cannot start up but I cannot figure out why. Is it due to a misconfiguration or because the type of DnD scenario I'm trying to make work?
Beta Was this translation helpful? Give feedback.
All reactions