Skip to content

After Windows Server 2019 boot containers not starting #39623

@robertmuehsig

Description

@robertmuehsig

Description

Windows Server 2019 does not start containers automatically on boot, even though the containers have been started with --restart always parameter.

Steps to reproduce the issue:

  1. Open up elevated PowerShell.
  2. Create a custom Docker network (driver nat), named blaa.
  3. Run a container like this: docker run -d --restart always --name testcontainer -p 8080:80 mcr.microsoft.com/windows/servercore:ltsc2019.
  4. Execute Restart-Computer.
    When the machine starts up, execute docker ps.

Describe the results you received:
docker ps shows that no containers are running.

Describe the results you expected:
docker ps lists the container named testcontainer.

Additional information you deem important (e.g. issue happens only occasionally):
Happens all the time.

Windows Event Log shows errors like this:
Failed to delete container 80e440a586087ed6dd1bf14bb152061eadf15d5343a2dcf6b5b2dd14e0ad98fd from containerd [error=no such container]

Output of docker version:

Client: Docker Engine - Enterprise
 Version:           19.03.1
 API version:       1.40
 Go version:        go1.12.5
 Git commit:        f660560464
 Built:             07/25/2019 20:59:52
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Enterprise
 Engine:
  Version:          19.03.0
  API version:      1.40 (minimum version 1.24)
  Go version:       go1.12.5
  Git commit:       87b1f470ad
  Built:            07/16/2019 23:39:21
  OS/Arch:          windows/amd64
  Experimental:     false

Output of docker info:

PS C:\Users\Administrator> docker info
Client:
 Debug Mode: false
 Plugins:
  cluster: Manage Docker clusters (Docker Inc., v1.0.1)

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 5
 Server Version: 19.03.0
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics l2bridge l2tunnel nat null overlay transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: process
 Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
 Operating System: Windows Server 2019 Standard Version 1809 (OS Build 17763.615)
 OSType: windows
 Architecture: x86_64
 CPUs: 16
 Total Memory: 31.95GiB
 Name: 14450hostserveu
 ID: IJUZ:NS4Z:QY3W:DGOK:TTC4:6ZYV:Z4GW:QWS4:OFDV:XWCF:JUGI:PWW7
 Docker Root Dir: C:\ProgramData\docker
 Debug Mode: false
 Username: sevitechq
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):

Windows Server 2019 (Version 1809)

The same stuff worked in a older Windows Server 2016 environment (with a much older docker version).

I guess this is related to this issue:
#38911

I also tried this, but this should already be fixed :/
#33542

My workaround (which only work in some scenarios): Use a scheduled task to start all stopped contains like this:

docker start $(docker ps -a -q -f status=exited)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/daemonCore Enginekind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.platform/windowsversion/19.03

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions