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

An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full

Open ahoka opened this issue 9 years ago • 27 comments

Expected behavior

Normal operation or meaningful error message.

Actual behavior

Lost network access to some of the containers (but not all), docker ps fails with error message: Error response from daemon: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

Information

Diagnostic ID: 9DE458B7-12ED-4FC1-9313-0E2A381143FF/2016-12-14_12-25-04

Host version: Microsoft Windows [Version 10.0.14393]

Steps to reproduce the behavior

Running a fair amount of containers, around 20-25, with light internal load.

ahoka avatar Dec 14 '16 11:12 ahoka

Restarting docker seems to be a good workaround.

ahoka avatar Dec 14 '16 11:12 ahoka

Hi @ahoka Can we close the issue then or are you facing this issue often?

dgageot avatar Dec 18 '16 12:12 dgageot

What additional info do you need?

ahoka avatar Dec 21 '16 16:12 ahoka

@ahoka I had a look at your logs and there is nothing conclusive.

The error comes from from here:

[11:23:40.438][ApiProxy       ][Info   ] Dial Hyper-V socket 2b8eaf44-cd35-4bf0-b677-6891ae244767:23a432c2-537a-4291-bcb5-d62504644739
[11:23:40.442][ApiProxy       ][Info   ] Successfully dialed Hyper-V socket 2b8eaf44-cd35-4bf0-b677-6891ae244767:23a432c2-537a-4291-bcb5-d62504644739
[11:38:13.449][SegmentApi     ][Info   ] Usage statistic: heartbeat
[12:22:08.646][ApiProxy       ][Info   ] proxy >> GET /v1.24/containers/json
[12:22:08.669][ApiProxy       ][Info   ] Dial Hyper-V socket 2b8eaf44-cd35-4bf0-b677-6891ae244767:23a432c2-537a-4291-bcb5-d62504644739
[12:22:08.703][ApiProxy       ][Info   ] An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

The error code is this WSAENOBUFS 10055 and likely comes from the Hyper-V socket implementation.

I notice you are on Windows build 14393.0. There are have been several important updates and bug fixes to that build. Not sure this is relevant, but worth updating if you can.

I would also normally suggest to try the Beta channel as this has an updated Linux kernel with some significant changes and updated to the Hyper-V socket implementation on the Linux side, however, there are some known issues with Hyper-V in Windows build you are on and the 4.8 Linux kernel used in the Beta channel (https://github.com/docker/for-win/issues/274), but it's worth try.

rn avatar Dec 29 '16 12:12 rn

Thanks for the RCA. I haven't encountered this problem again, so you can close the issue.

ahoka avatar Dec 29 '16 13:12 ahoka

I seem to be experiencing this (or a similar) issue.

Diagnostic ID: 30667474-C49F-4185-B957-3A7AE1F38393/2017-01-23_11-19-16

I am running fairly few containers (only running 4 containers), but I am putting a high load on one particular (mssql-server-linux) running about 10 services on the host machine as well as a handfull of websites and API's all pulling from the mssql container.

micdah avatar Jan 23 '17 10:01 micdah

I seem to be experiencing this (or a similar) issue. Diagnostic ID: DD0B897E-F560-41B6-B1E8-D4D0675B2E39/2017-02-10_10-12-16

parha avatar Feb 10 '17 09:02 parha

+1

I am experiencing this issue as well. I am on the latest OS and Docker for windows.

BringerOD avatar Apr 25 '17 21:04 BringerOD

Having the same issue with the latest update. The issue occurred after a full computer reboot.

Diagnostic ID: 1AB0DE4F-CCDE-4719-A361-1A2678C3C27A/2017-04-26_09-22-18

  • Windows 10 x64
  • Docker Version 17.03.1-ce-win5 (10743)

Restarting docker seems to fix the issue for me as well.

dvlsg avatar Apr 26 '17 16:04 dvlsg

I can confirm this issue. Having it after docker is running for a few days. Some containers are still responding, others are completely offline.

Diagnostic ID: 3A9706C4-8F98-4B7C-A5D0-7B6A53327748/2017-06-15_07-01-16

Version: 17.06.0-rc2-ce-win14 (12510)
Channel: edge
Sha1: e4067577a34951ceb09b9e7d029cbdff2ca0ffb4
Started on: 2017/06/09 10:23:48.460
Resources: C:\Program Files\Docker\Docker\Resources
OS: Windows 10 Pro
Edition: Professional
Id: 1607
Build: 14393
BuildLabName: 14393.1198.amd64fre.rs1_release_sec.170427-1353

tobias-kuendig avatar Jun 15 '17 05:06 tobias-kuendig

An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

Diagnostic ID: 7D3B6C3A-9617-4CD7-8513-C98A06C313AE/2017-06-17_02-26-15

@dgageot reopen and investigate please

wclr avatar Jun 16 '17 21:06 wclr

BTW I followed advice in this article (linked from this

The default maximum number of ephemeral TCP ports is 5000 in the products that are included in the "Applies to" section. A new parameter has been added in these products. To increase the maximum number of ephemeral ports, follow these steps:

  • Start Registry Editor.
  • Locate the following subkey in the registry, and then click Parameters: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  • On the Edit menu, click New, and then add the following registry entry: Value Name: MaxUserPort Value Type: DWORD Value data: 65534 Valid Range: 5000-65534 (decimal) Default: 0x1388 (5000 decimal)

At least after this docker started even without machine restart.

wclr avatar Jun 16 '17 21:06 wclr

Having the same issue with the latest update.

A diagnostic was uploaded (before restarting docker) with id: CA5C10D3-2322-4065-B4E3-30B231C9718A/2017-12-29_09-31-15

Windows 10 Pro x64 Docker Version 17.09.1-ce-win42 (14687) | Channel: stable | 3176a6a

Restarting docker did help, but not a motivating experience to build a confidence in the application delivery using Docker for Windows.

Thanks

npagare avatar Dec 29 '17 15:12 npagare

I just ran into this issue. I tried rebooting the "Docker for Windows Service" from the Windows service control manager.

I see a crash in the Windows Event Viewer that matches the time at which I shut down the service:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
  <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" /> 
  <EventID Qualifiers="49152">7034</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x8080000000000000</Keywords> 
  <TimeCreated SystemTime="2018-03-13T19:27:29.805008700Z" /> 
  <EventRecordID>7587</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="996" ThreadID="23632" /> 
  <Channel>System</Channel> 
  <Computer>...</Computer> 
  <Security /> 
</System>
<EventData>
  <Data Name="param1">Docker for Windows Service</Data> 
  <Data Name="param2">1</Data> 
  <Binary>63006F006D002E0064006F0063006B00650072002E0073006500720076006900630065000000</Binary> 
</EventData>
</Event>

Ther service rebooted successfully, but docker ps now spits this error message:

$ docker ps
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.35/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

AndreLouisCaron avatar Mar 13 '18 19:03 AndreLouisCaron

why is this issue closed? @dgageot

ahmadalli avatar Apr 11 '18 09:04 ahmadalli

I am also getting the same error:

Error response from daemon: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

   at Docker.Backend.DockerDaemonChecker.Check(Func`1 isDaemonProcessStillRunning) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\DockerDaemonChecker.cs:line 63
   at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.<Register>b__0(Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 46
   at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 144

The only way to make it work again was to reset it to the Factor Defaults which is a shame because I had to re run my configuration scripts and relevant data to the containers.

aftabnaveed avatar May 16 '18 02:05 aftabnaveed

Ditto C0E0B938-B361-43E8-90AA-5F34568953A8/2018-06-25_10-27-22

lanzkron avatar Jun 25 '18 07:06 lanzkron

I also just experienced the same issue. 34619F3D-3A33-4AC4-BC23-19BAFAF640BA/2018-07-04_13-53-54

TheSimpleZ avatar Jul 04 '18 11:07 TheSimpleZ

I also just experienced the same issue 0F9EF870-22C7-4B40-A718-4CD9933072B8/20180806081344

hcaicedo avatar Aug 06 '18 15:08 hcaicedo

I have the same problem: 78F48B3E-5CB7-4611-9D97-38ECF142ADA2/20180912164107

bmccode avatar Sep 12 '18 13:09 bmccode