dotnet / dotnet/Docker.DotNet

IDockerClient.System.GetSystemInfoAsync() timeout error

Open
#383 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
416
PR merge metrics
No merged PRs in 30d

Description

**Output of `dotnet --info`:**

```
SDK de .NET Core (reflejando cualquier global.json):
Version: 2.1.505
Commit: b220231234

Entorno de tiempo de ejecución:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.505\

Host (useful for support):
Version: 2.1.9
Commit: dcedc87d22

.NET Core SDKs installed:
1.0.0 [C:\Program Files\dotnet\sdk]
1.0.4 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.505 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
```

**What version of Docker.DotNet?:**

```
Docker.DotNet version 3.125.2
```

**Steps to reproduce the issue:**
1. Have installed Docker Desktop Community for Windows version stable 2.0.0.3 (OS: Linux)
2. Create an ASP.NET CORE 2.1 Web Application with Docker Support enabled (OS: Linux)
3. Install from Nuget to the project Docker.DotNet (3.125.2)
4. In a Razor Page Model create put the following code

```C#
public async Task OnGetAsync()
{
DockerClient client = new DockerClientConfiguration(new Uri("npipe://./pipe/docker_engine")).CreateClient();
var cts = new CancellationTokenSource(TimeSpan.FromMinutes(5));
this.SystemInfo = await client.System.GetSystemInfoAsync(cts.Token);
}
```
5. When the page is loaded after less than one minute the error happens.

**What actually happened?:**
TimeoutException: The operation has timed out.

**What did you expect to happen?:**
An object of the class Docker.DotNet.Models.SystemInfoResponse

**Additional information:**
The problem always happens with or without passing to it a CancellationToken and also overriding the default timeout of the Web host in the method CreateWebHostBouilder of the class Program like this:

```C#
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args).UseKestrel(o =>
{
o.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(30);
}
).UseStartup();
```
The error also happens with or without TSL.
[AspNetCoreDockerMonitor Errors.zip](https://github.com/Microsoft/Docker.DotNet/files/3021035/AspNetCoreDockerMonitor.Errors.zip)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.