for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Windows container - response was not received from the Virtual Machine hosting the Container. (0xc0370109)

Open athurgar opened this issue 9 years ago • 26 comments

Apologies, but I am new to Docker and am trying to get the ability to run different versions of SQL Server in a Windows container.

Downloaded image for Windows SQL Server (tried developer and express). Increased memory on Hyper-V to 4GB. (MobyLinuxVM) When trying to run image I get the following error message docker: Error response from daemon: container 46fbd6f96372d227b1ea9f51216f8b582269603a9178e2337308b5a300004a09 encountered an error during Start: failure in a Windows system call: The operation timed out because a response was not received from the Virtual Machine hosting the Container. (0xc0370109).

This was from both developer and express images. I am not using the default SQL Server port so there should be no conflict on the TCP port.

I then tried to create the HelloWorld image and got the same error message.

I have switched to Linux containers and was successfully able to run the microsoft/mssql-server-linux image.

I have been through the troubleshooting documentation but now have no idea how to debug or find information on this issue, Any help would be appreciated.

athurgar avatar Sep 05 '17 08:09 athurgar

Hi @athurgar We'll need some logs to be able to look into this. Please right click the Docker icon - then go to Diagnose and Feedback. Click upload diagnostic - then copy\paste the ID here

jasonbivins avatar Sep 06 '17 16:09 jasonbivins

I have same issue. Docker is failing completely when trying to use linux containers. B8559DEB-1377-4E0D-B3EF-22A8F0BF881B/2017-09-06_17-42-48

king-n0thing avatar Sep 06 '17 17:09 king-n0thing

Hi, What I have managed to work out is the following. Docker seems to be running fine. I was able to create a Linux container and run SQL Server 2017. docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=XXXXXXX" -e "MSSQL_PID=Developer" --cap-add SYS_PTRACE -p 1401:1433 -d microsoft/mssql-server-linux

Unable to get a Windows container to work for SQL Server 2016. docker run -d -p 1435:1435 -e sa_password=XXXXXXXX -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer. See log log 7th Sep 2017.txt

I have tested Hyper-V and there doesn't seem to be an issue there. I can create a VM with no problems. I have also created VM using the following ISO images - mobylinux,iso and boot2docker.iso. Also used the mobylinux.ps1 to create a VM.

Problem appears to be the creation of a MobyLinuxVM - when a VM is created (and this is not all the time) then Docker is unable to connect with it. I have tried creating my won MobyLinuxVM with different settings (e.g External switch, Gen 1 and Gen 2 VMs) but no success. When creating VMs I increase memory to 4GB and CPUs to 4. Also tried to create a docker machine (last resort) but alas no success. I am running Windows 10 Pro.

athurgar avatar Sep 07 '17 01:09 athurgar

Hi @athurgar I see in the logs you provided that everything seems to be working up until the point where it's trying to connect - then it's timing out. You mentioned that you're allocating 4gb of memory and 4 CPUS - can you make sure that the CPU and RAM is available? Docker will try to pre-allocate the memory and will crash or timeout if there isn't enough available.

Can you please send a diagnostic ID ?

Here's the error:
container 1ad7b75036239818f93dfd6da20f5b05213ab26472a10e5cf5a150128b7ab973 encountered an error during Start: failure in a Windows system call: The operation timed out because a response was not received from the Virtual Machine hosting the Container. (0xc0370109)"

jasonbivins avatar Sep 07 '17 14:09 jasonbivins

@athurgar

I just tested using the commands you provided - can you also make sure you're in Linux container mode for this container? microsoft/mssql-server-linux I got a strange error, then switched to Linux container mode and then I was able to pull it.

jasonbivins avatar Sep 07 '17 14:09 jasonbivins

Jason - Linux container works fine and SQL Server 2017 on Linux is working. With the Windows container, when Docker create the MobyLinuxVM it creates it with 2GB and 2CPUs. You can't change this till later. I think that the issue is with the creation of the MobyLinuxVM by Docker and its networking. From Hyper-V console you can see the VM, but can't connect to it, it has no IP address - even though the DockerNAT that it created has an IP. See attached images. config mobylinuxvm connect to mobylinuxvm dockernat

athurgar avatar Sep 07 '17 23:09 athurgar

@jasonbivins A diagnostic was uploaded with id: 0F39A06A-79D5-44D4-8ECC-543B4DDAE35E/2017-09-08_09-14-00

athurgar avatar Sep 07 '17 23:09 athurgar

@athurgar the Moby VM is unrelated to running Windows containers (eg. SQL Server in a Windows container).

What error do you get when switching to Windows containers and trying to run the SQL Server windows container?

friism avatar Sep 07 '17 23:09 friism

@friism - log file for SQL windows container was uploaded previously and diagnostics have been uploaded. Question: If Docker doesn't need or use the MobyLinuxVm for Windows why does it create this VM? My understanding was that used Hyper-V as the mechanism for the Windows container. In fact if you have Hyper-V removed as a component in your Windows install and you run Docker it will actually add the Hyper-V component and start it, then create the MobyLinuxVM

athurgar avatar Sep 08 '17 00:09 athurgar

@athurgar
According the logs, you're getting a timeout error when the Daemon tries to communicate with Hyper-V

Access to the MobyLinuxVM is actually disabled through Hyper-V as part of the install as normally you shouldn't be making any changes there. I tested on my side and I can't even change the memory setting sin Hyper-V using the default installation options. Can you try again without making any edits to the VM ?

and just to make sure we're on the same page - by Linux container mode i mean this setting:

image

Thanks!

jasonbivins avatar Sep 08 '17 14:09 jasonbivins

@athurgar I dug through the system.evtx included with the diagnostics - and I do see that there were some issues with Hyper-V doing a bugcheck and crashing yesterday. Everything seems to be ok from what I can see except for a crash that looks like it was the BSOD ! Since the error seems to be coming from Hyper-V Can you disable Windows fast-boot and see if that helps? Control Panel-->Power Options I've seen quite a few articles and forum posts regarding Fast-boot and issues with Hyper-V

jasonbivins avatar Sep 08 '17 14:09 jasonbivins

@jasonbivins - started again and MobyLinuxVM was created with default settings - still getting the same error. Yes I have switched to Windows containers, I only used the Linux container with SQL Server 2017 as a test. This has now been blown away as I have uninstalled and reinstalled Docker and Hyper-V. Will test disabling of fast-boot. Much appreciate your help.

athurgar avatar Sep 08 '17 21:09 athurgar

@jasonbivins - uploaded diagnostics after changes to power settings - no difference A diagnostic was uploaded with id: 0F39A06A-79D5-44D4-8ECC-543B4DDAE35E/2017-09-09_09-56-14

athurgar avatar Sep 08 '17 23:09 athurgar

Tried on another Windows 10 machine that had just been updated to Creator. Still the same error.

A diagnostic was uploaded with id: EA0A0FBE-D501-43D5-B069-7822A59C25E6/2017-09-14_13-54-15

athurgar avatar Sep 14 '17 04:09 athurgar

Maybe there is no enough memory to run SQL Server 2017 on Windows containers.

JaxLgj avatar Sep 14 '17 09:09 JaxLgj

I have tried increasing the memory and CPU on the Hyper-V VM created for the windows container, no difference. The Linux version runs perfectly. The more I look at this it appears to be a connectivity issue between the docker image connecting to the Hyper-V. Nothing to do with resources - may just be a networking issue.

I was hoping to present this to the local SQL User Group this month, but it appears that it will not work and there is no solution.

athurgar avatar Sep 14 '17 09:09 athurgar

Hi @athurgar It does look like a connectivity issue, but I havent been able to reproduce it. You're still getting the same timeout error.

[09:55:24.783][WindowsDockerDaemon][Error ] time="2017-09-09T09:55:24.782988200+10:00" msg="Handler for POST /v1.30/containers/b6ad68955651b8597acacd54524ae30e9ab319c4e7d5112d4eda08d8e4bff935/start returned error: container b6ad68955651b8597acacd54524ae30e9ab319c4e7d5112d4eda08d8e4bff935 encountered an error during Start: failure in a Windows system call: The operation timed out because a response was not received from the Virtual Machine hosting the Container. (0xc0370109)"

One more thing to try is to upgrade your Hyper-V configuration to 8.1 - there were a lot of changes to Hyper-V memory and NAT networks in the creators update, it might help

image

jasonbivins avatar Sep 15 '17 16:09 jasonbivins

Hi @jasonbivins,

Tried to change Hyper-V to 8.1 no success. Seems like a few people have the same problem.

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/deploy/upgrade-virtual-machine-version-in-hyper-v-on-windows-or-windows-server

I feel like I should just give up, this is just NOT a happening thing.

athurgar avatar Sep 17 '17 07:09 athurgar

@athurgar if you're just interested in running Docker Windows containers, you can also try just uninstalling Docker for Windows and installing the Docker Engine directly.

https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/configure-docker-daemon#manual-installation

friism avatar Sep 17 '17 16:09 friism

@friism How does this help? I'm having same problem on one windows10 machine

1oglop1 avatar Oct 31 '17 09:10 1oglop1