-
Notifications
You must be signed in to change notification settings - Fork 294
How to debug container that fails to start #676
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
Comments
Can you please post |
Output from docker info
Output from docker version
The container is built from a dockerfile based on microsoft/iis. The dockerfile simply does some IIS configuration. The docker build command completes successfully, but the container will not start. Note: The container starts fine if I don't do the IIS config. |
This issue is still happening and makes docker basically unusable. I have narrowed the issue down to the volumes command in docker compose. If I try and map a directory on the host machine to the container, I will get this issue 90% of the time. But if I just keep on trying (change nothing), it will eventually work. So it takes me about 30 mins to get my containers up and running. The real issue is the "black-box ness". I simply have no idea how to debug this. The logs are basically useless. |
Just for clarity, I am aware of other issues with mapping volumes and this does not seem related.
|
Hi, I see the same error on my Windows 10 machine. I am using docker-compose; when the volume mounts are commented out, containers start. Otherwise, they fail most of the time with the error given by the OP. This is how my compose file looks like:
Output from docker version:
Output from docker info:
|
Also seeing this problem here. Docker info:
Docker version:
Dockerfile for troublesome container: FROM microsoft/iis:nanoserver
WORKDIR C:/inetpub/wwwroot
VOLUME //C:/inetpub/wwwroot
|
I got the same problem on Windows 10 with nanoserver based images. It disappeared as soon as i moved all VOLUME statements to the end of the Dockerfile. |
Experiencing this as well any time my compose file has volumes. |
Same here with docker-compose docker-compose.ymlversion: '3.4'
services:
series5-db:
image: microsoft/mssql-server-windows-express
environment:
- sa_password=This1sthesapassword1
- ACCEPT_EULA=Y
volumes:
- db-data:C:\data
networks:
- series5-net
series5-spa:
build: .
image: series5/spa
ports:
- "8080:80"
- "877:877/udp"
volumes:
- C:\Git\Series5\output\web-logs:C:\inetpub\sites\Series5\Spa\App_Data\logs
depends_on:
- series5-db
networks:
- series5-net
volumes:
db-data:
# web-logs:
networks:
series5-net:
driver: nat Environmentdocker info output Containers: 5
Running: 2
Paused: 0
Stopped: 3
Images: 40
Server Version: 17.12.0-ce
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd gelf json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 16299 (16299.15.amd64fre.rs3_release.170928-1534)
Operating System: Windows 10 Pro
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 7.886GiB
Name: W10CCROWHURSTLT
ID: 3EQ5:TYLN:ZC43:DTZF:CZAP:WGT7:DM4F:VEHM:ETXJ:MQY7:ELB7:Y6GR
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 44
System Time: 2018-01-13T16:20:09.4193165Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false docker version output Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:05:22 2017
OS/Arch: windows/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.24)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:15:52 2017
OS/Arch: windows/amd64
Experimental: true |
Just found the reason for the failure in my specific case: I accidentally baked into the image a non-empty folder that my volume was then mapping to. This issue still stands however: how to debug this type of generic failure? |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/lifecycle frozen |
I am experiencing this issue - I have no mounted volumes.
My docker-compose.yml:
|
Ok so my issues seems transient, as once I did all of the following it cleared:
I have no idea what the problem was. |
/remove-lifecycle stale |
I have a very simple console app and docker file, but when I run it I get "encountered an error during CreateProcess: failure in a Windows system call: the system cannot find the file specified". I don't know how to get any more information (such as which file is missing).
|
I am experiencing this issue.: I can successfully run a plain vanilla container based on microsoft/mssql-server-windows-express no problem, and can successfully build a new image with a dockerfile as per below. But i cannot get my new container to run. It bombs out with: Im not using mount. I am a bit confused about the interplay between the original CMD in the microsoft dockerfiles, so i just copied that again ain an attempt to get container running , as my new Dockerfile needs a CMD statement: CMD .\start -sa_password $env:sa_password -ACCEPT_EULA $env:ACCEPT_EULA -Verbose Dockerversion: Windows version: windows 10 enterprise N 1803 Docker file: escape=`FROM microsoft/mssql-server-windows-express:latest AS XXXSQL #ARG SPIKE_VERSION ARG SPIKE_VERSION=1.66 #label image ID LABEL name = "XXXSQL" set environment variablesENV sa_password=${SpikeDBConnPassword} RUN Get-Childitem Env: DOCKER expose these external public ports to the IIS container running on the same container default network and the host for SQL adminEXPOSE 1433 1434 3389 5985 5986 #set working directory in containers - needs \ ! RUN Get-Location ; WORKDIR c:// COPY ["./DockerPowershellScripts/" , "/dockerpowershellscripts/"] ENV sa_password="XXXX9999999!" #this line is essentially copied form the original MS image dockerfiles, except with attach_dbs removed. |
I was also having this exact issue: I found 2 solutions for my case:
|
I tried with windowsservercore:1709 image aswell but getting the same error while trying to start the container. C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 12345678edbfert encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106)dockerfileFROM mcr.microsoft.com/windows/servercore:1709
|
@jibinjose087 , I was able to repro your particular case, and I was able to fix it by changing |
@cowlinator Thank you for your quick reply, I tried the solution that you have mentioned and I am able to start the container and mount the volume only if it is empty. If the volume in our case C:/application contains folders or files then I am getting the following error. =========
|
@jibinjose087 , for this particular instance, you are correct, it is because the volume mount target is not empty. Changing It's unfortunate that docker waits until |
@cowlinator , Yes you are correct the volume mount happens only when the container folder is empty. In my case I am running test cases inside the container so as per the code /application/ABC/TestData folder contains some files which are required for running test cases and once the test is completed the results are also getting generated inside the same folder. If I am able to mount the folder /application/ABC/TestData locally then I can easily get the reports otherwise I need to login to container to get the data. The last line of the Dockerfile CMD command is CMD nunit3-console.exe test.dll so when we run the container it will get executed and I can't copy the files to any other folder before exiting the container Keeping data on host machine and changing the report generation folder is difficult due to some restrictions. Is there any alternative solution you can think of to solve this issue? |
I've isolated this error to being caused by trying to mount a volume against a folder in the container/image that already contains data. Supposedly this should still be possible re their documentation. I see people talking about issues with volumes related to this error, anyone have references to discussions about that? Also ditto to the fact that we need a way to see internally what's causing this error! |
My case was an environment variable declared as myVar theVarValue, changing to myVar=theVarValue made it. |
Expected behavior
I am trying to start a container and I get the following error:
How can I get more logs as to why the container failed to start?
Actual behavior
Container fails to start
Information
The only logs I can find:
The text was updated successfully, but these errors were encountered: