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

[Bug]: Docker API Conflict on linux mint #1250

Closed
AskmethatFR opened this issue Sep 2, 2024 · 7 comments
Closed

[Bug]: Docker API Conflict on linux mint #1250

AskmethatFR opened this issue Sep 2, 2024 · 7 comments
Labels
question Have you tried our Slack workspace (https://testcontainers.slack.com)?

Comments

@AskmethatFR
Copy link

Testcontainers version

3.9.0

Using the latest Testcontainers version?

Yes

Host OS

Linux Mint

Host arch

x64

.NET version

8.0

Docker version

Client: Docker Engine - Community
 Version:           27.2.0
 API version:       1.47
 Go version:        go1.21.13
 Git commit:        3ab4256
 Built:             Tue Aug 27 14:15:13 2024
 OS/Arch:           linux/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.34.0 (165256)
 Engine:
  Version:          27.2.0
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.21.13
  Git commit:       3ab5c7d
  Built:            Tue Aug 27 14:15:15 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.20
  GitCommit:        8fc6bcff51318944179630522a095cc9dbf9f353
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Docker info

Client: Docker Engine - Community
 Version:    27.2.0
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.16.2-desktop.1
    Path:     /usr/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.2-desktop.2
    Path:     /usr/lib/docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.34
    Path:     /usr/lib/docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.15
    Path:     /usr/lib/docker/cli-plugins/docker-desktop
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /usr/lib/docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     /usr/lib/docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /usr/lib/docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     /usr/lib/docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /usr/lib/docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.13.0
    Path:     /usr/lib/docker/cli-plugins/docker-scout

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 5
 Server Version: 27.2.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.10.4-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 15.61GiB
 Name: docker-desktop
 ID: dc0a391d-2409-4637-9a34-55cb3a634631
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=unix:///home/alex/.docker/desktop/docker-cli.sock
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: daemon is not using the default seccomp profile

What happened?

When I try to run a test with TestContainer.MsSQL, the container never start with the 409 error.

In an another projet with Postgresql, the tests run correctly.

Here the code that configure the container

public class MsSqlTestContainerRunner
{
    private readonly MsSqlContainer _msSqlContainer
        = new MsSqlBuilder().Build();

    public Task InitializeAsync() => _msSqlContainer.StartAsync();

    public Task DisposeAsync() => _msSqlContainer.DisposeAsync().AsTask();

    public string GetConnectionString()
    {
        return _msSqlContainer.GetConnectionString();
    }
}

Here a usage in the xunit fixture :

public class VillaVerdeIntegrationFixture : IAsyncLifetime
{
    private MsSqlTestContainerRunner _containerRunner = new();

    public VillaVerdeDbContext Context { get; private set; }

    protected void ConfigureDbContext()
    {
        var optionsBuilder = new DbContextOptionsBuilder<VillaVerdeDbContext>();
        optionsBuilder.UseSqlServer(GetConnectionString());
        Context = new VillaVerdeDbContext(optionsBuilder.Options);
    }

    public string GetConnectionString()
    {
        return _containerRunner.GetConnectionString();
    }


    public async Task InitializeAsync()
    {
        await _containerRunner.InitializeAsync();
        ConfigureDbContext();

        await Context.Database.EnsureCreatedAsync();
    }

    public Task DisposeAsync() => _containerRunner.DisposeAsync();
} 

Relevant log output

Docker.DotNet.DockerApiException
Docker API responded with status code=Conflict, response={"message":"container 9ccefae02702cd87556237a2d91a9093780b7501ebb14a9b2e1616a32fdcb42b is not running"}

Additional information

No response

@AskmethatFR AskmethatFR added the bug Something isn't working label Sep 2, 2024
@HofmeisterAn
Copy link
Collaborator

Please set a breakpoint at DisposeAsync() and check the container logs. For some reason, the container exits or dies. Have you tried running the container using the CLI:

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=yourStrong(!)Password" -p 1433 mcr.microsoft.com/mssql/server:2019-CU18-ubuntu-20.04

@AskmethatFR
Copy link
Author

Hi,

I do not have any logs in the dispose.
But when I try to run the version used by tests container directly from my terminal I got an error. I think is not related to test container ( only the version of mssql image used ).

`SQL Server 2019 will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
This program has encountered a fatal error and cannot continue running at Mon Sep 2 12:01:44 2024
The following diagnostic information is available:

     Reason: 0x00000001
     Signal: SIGABRT - Aborted (6)
      Stack:
             IP               Function
             ---------------- --------------------------------------
             00005626ca66cbec <unknown>
             00005626ca66c632 <unknown>
             00005626ca66bc41 <unknown>
             00007f7ca09ac090 killpg+0x40
             00007f7ca09ac00b gsignal+0xcb
             00007f7ca098b859 abort+0x12b
             00005626ca5f52a2 <unknown>
             00005626ca681154 <unknown>
             00005626ca6b6248 <unknown>
             00005626ca6b602a <unknown>
             00005626ca60111a <unknown>
             00005626ca600d6f <unknown>
    Process: 9 - sqlservr
     Thread: 81 (application thread 0x138)
Instance Id: b828639a-5769-4ab9-94b6-bb91db946e42
   Crash Id: 0716fe57-4678-4ca5-ae8e-e7a98f37840d
Build stamp: f708684a2cfcb51177273c54f975ed8c62029cbc89aa962bf7d6b956f01a0c27

Distribution: Ubuntu 20.04.5 LTS
Processors: 16
Total Memory: 16766414848 bytes
Timestamp: Mon Sep 2 12:01:44 2024
Last errno: 2
Last errno text: No such file or directory
Capturing a dump of 9
Successfully captured dump: /var/opt/mssql/log/core.sqlservr.9_2_2024_12_1_44.9
Executing: /opt/mssql/bin/handle-crash.sh with parameters
handle-crash.sh
/opt/mssql/bin/sqlservr
9
/opt/mssql/bin
/var/opt/mssql/log/

 b828639a-5769-4ab9-94b6-bb91db946e42
 0716fe57-4678-4ca5-ae8e-e7a98f37840d

 /var/opt/mssql/log/core.sqlservr.9_2_2024_12_1_44.9

Ubuntu 20.04.5 LTS
Capturing core dump and information to /var/opt/mssql/log...
/bin/cat: /proc/9/maps: Permission denied
/bin/cat: /proc/9/environ: Permission denied
/usr/bin/find: '/proc/9/task/9/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/11/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/12/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/13/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/14/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/15/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/16/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/17/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/18/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/19/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/20/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/21/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/22/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/23/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/24/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/25/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/26/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/27/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/28/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/29/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/30/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/32/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/33/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/34/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/35/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/36/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/37/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/38/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/39/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/40/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/41/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/43/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/44/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/45/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/46/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/47/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/48/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/49/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/50/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/51/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/54/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/56/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/57/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/58/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/59/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/60/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/61/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/63/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/64/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/65/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/66/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/67/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/68/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/69/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/70/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/71/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/73/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/75/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/77/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/78/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/79/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/80/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/81/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/83/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/84/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/85/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/86/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/87/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/88/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/89/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/91/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/93/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/94/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/96/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/97/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/98/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/99/fdinfo': Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
/usr/bin/find: '/proc/9/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/9/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/11/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/12/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/13/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/14/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/15/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/16/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/17/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/18/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/19/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/20/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/21/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/22/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/23/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/24/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/25/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/26/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/27/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/28/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/29/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/30/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/32/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/33/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/34/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/35/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/36/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/37/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/38/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/39/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/40/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/41/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/43/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/44/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/45/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/46/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/47/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/48/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/49/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/50/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/51/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/54/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/56/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/57/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/58/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/59/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/60/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/61/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/63/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/64/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/65/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/66/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/67/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/68/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/69/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/70/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/71/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/73/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/75/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/77/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/78/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/79/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/80/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/81/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/83/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/84/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/85/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/86/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/87/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/88/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/89/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/91/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/93/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/94/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/96/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/97/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/98/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/99/fdinfo': Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
/usr/bin/find: '/proc/9/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/9/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/11/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/12/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/13/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/14/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/15/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/16/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/17/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/18/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/19/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/20/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/21/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/22/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/23/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/24/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/25/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/26/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/27/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/28/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/29/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/30/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/32/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/33/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/34/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/35/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/36/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/37/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/38/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/39/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/40/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/41/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/43/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/44/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/45/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/46/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/47/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/48/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/49/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/50/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/51/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/54/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/56/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/57/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/58/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/59/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/60/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/61/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/63/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/64/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/65/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/66/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/67/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/68/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/69/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/70/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/71/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/73/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/75/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/77/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/78/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/79/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/80/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/81/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/83/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/84/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/85/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/86/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/87/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/88/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/89/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/91/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/93/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/94/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/96/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/97/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/98/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/99/fdinfo': Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
/usr/bin/find: '/proc/9/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/9/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/11/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/12/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/13/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/14/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/15/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/16/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/17/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/18/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/19/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/20/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/21/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/22/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/23/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/24/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/25/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/26/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/27/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/28/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/29/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/30/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/32/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/33/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/34/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/35/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/36/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/37/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/38/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/39/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/40/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/41/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/43/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/44/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/45/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/46/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/47/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/48/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/49/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/50/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/51/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/54/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/56/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/57/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/58/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/59/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/60/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/61/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/63/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/64/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/65/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/66/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/67/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/68/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/69/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/70/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/71/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/73/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/75/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/77/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/78/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/79/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/80/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/81/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/83/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/84/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/85/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/86/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/87/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/88/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/89/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/91/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/93/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/94/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/96/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/97/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/98/fdinfo': Permission denied
/usr/bin/find: '/proc/9/task/99/fdinfo': Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
/usr/bin/find: '/proc/9/fdinfo': Permission denied
dmesg: read kernel buffer failed: Operation not permitted
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
Mon Sep 2 12:01:45 UTC 2024 Capturing program information
Dump already generated: /var/opt/mssql/log/core.sqlservr.9_2_2024_12_1_44.9, moving to /var/opt/mssql/log/core.sqlservr.9.temp/core.sqlservr.9.gdmp
Moving logs to /var/opt/mssql/log/core.sqlservr.9.temp/log/paldumper-debug.log
Mon Sep 2 12:01:45 UTC 2024 Capturing program binaries
Mon Sep 2 12:01:46 UTC 2024 Not compressing the dump files, moving instead to: /var/opt/mssql/log/core.sqlservr.09_02_2024_12_01_45.9.d`

@HofmeisterAn
Copy link
Collaborator

HofmeisterAn commented Sep 2, 2024

This looks very similar to: #1248. Can you please try mcr.microsoft.com/mssql/server:latest (from the CLI) too?

@AskmethatFR
Copy link
Author

It's working perfectly with the latest version.
I'm trying to run with the latest image like this :

private readonly MsSqlContainer _msSqlContainer
        = new MsSqlBuilder()
            .WithImage("mcr.microsoft.com/mssql/server:latest")
            .Build();

But the container never starts, and the test keeps running until it times out.

@HofmeisterAn
Copy link
Collaborator

But the container never starts, and the test keeps running until it times out.

Yes, this is a regression by Microsoft. It has already been fixed in the upcoming Testcontainers release (see #1220). There are two workarounds. You can simply override the default wait strategy and change it to (in the meantime):

private readonly MsSqlContainer _msSqlContainer = new MsSqlBuilder()
    .WithImage("mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04")
    .WithWaitStrategy(Wait.ForUnixContainer().UntilCommandIsCompleted("/opt/mssql-tools18/bin/sqlcmd", "-C", "-Q", "SELECT 1;"))
    .Build();

Does that help? I am sorry for the inconvenience, but both issues are not specific to Testcontainers and are out of our control.

@HofmeisterAn HofmeisterAn added question Have you tried our Slack workspace (https://testcontainers.slack.com)? and removed bug Something isn't working labels Sep 2, 2024
@AskmethatFR
Copy link
Author

It's works perfectly ! Thanks

@HofmeisterAn
Copy link
Collaborator

I will close the issue for now. The workaround won't be necessary with the next release. Since a few developers encountered issues with the latest MSSQL image, I will try to release a new version sometime this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Have you tried our Slack workspace (https://testcontainers.slack.com)?
Projects
None yet
Development

No branches or pull requests

2 participants