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

Network connections hang repeatadly

Open mindhaq opened this issue 7 years ago • 33 comments

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: 8E0C399A-ACD3-4735-8F9A-17A30CC977D1/20181217014140

Expected behavior

After starting services in Docker images, I want to connect locally via TCP/IP, and I don't want to restart Docker every 15 minutes to keep connections.

Actual behavior

I'm doing development work, and my Apps connect to a MariaDB, a MongoDB, a Redis DB and various other HTTP-based services.

After a short while, all network connections just hang, and will stop just after the client times out. Reconnecting is not possible anymore. Restarting apps or containers does not help.

Restarting Docker does help, but only for a short while.

Information

  • Windows Version: Windows 10 Pro Version 1809 Build 17763.194
  • Docker for Windows Version: 2.0.0.0-win81 (29211) 4271b9e

Problem is new since I think last Docker update. Happens to me quite similar on a mac machine as well.

All docker commands like docker ps or docker exec to connect to the containers work just fine. The containers also seem to be running without problems. There's just no connection.

Steps to reproduce the behavior

  1. Connect to running containers
  2. Work normally
  3. Wait for it to happen

mindhaq avatar Dec 17 '18 01:12 mindhaq

I reset my docker installation, and uploaded new diagnostics to 8E0C399A-ACD3-4735-8F9A-17A30CC977D1/20181217114513

Problem remains.

Errors in the logfile:

[11:29:45.487][VpnKit         ][Error  ] vpnkit.exe: Socket.Stream: caught Eine vorhandene Verbindung wurde vom Remotehost geschlossen.


[11:29:56.655][VpnKit         ][Error  ] vpnkit.exe: Socket.Stream: caught Eine vorhandene Verbindung wurde vom Remotehost geschlossen.


[11:29:58.414][VpnKit         ][Error  ] vpnkit.exe: Socket.Stream: caught Eine vorhandene Verbindung wurde vom Remotehost geschlossen.


[11:30:07.719][VpnKit         ][Error  ] vpnkit.exe: Socket.Stream: caught Eine vorhandene Verbindung wurde vom Remotehost geschlossen.


[11:30:10.323][VpnKit         ][Error  ] vpnkit.exe: Socket.Stream: caught Eine vorhandene Verbindung wurde vom Remotehost geschlossen.


[11:30:17.295][VpnKit         ][Error  ] vpnkit.exe: Socket.Stream: caught Eine vorhandene Verbindung wurde vom Remotehost geschlossen.

mindhaq avatar Dec 17 '18 10:12 mindhaq

I have the same problem on Docker version 18.09.0, build 4d60db4

OS Name Microsoft Windows 10 Enterprise Version 10.0.17134 Build 17134

Started after last update. Network only lasts a few minutes after a restart of docker. Containers keep running.

llenrup avatar Dec 17 '18 23:12 llenrup

Similar to what I have (#3100)

JPMoresmau avatar Dec 18 '18 06:12 JPMoresmau

Thanks for your report. Does anyone have a set of reproduction steps including Dockerfiles/ docker-compose.yml files that they could share? It would help a lot if I could reproduce the problem locally.

djs55 avatar Dec 21 '18 16:12 djs55

Not sure how it's reproducible. This is what I just did:

  • start postgres: docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres
  • run my app that is using the postgres JDBC driver to do a few queries

After one minute of activity, the docker log show the error about the connection being forcibly closed by the remote host and the container is unreachable.

JPMoresmau avatar Dec 21 '18 16:12 JPMoresmau

Hello,

I'm experiencing a similar issue since the latest docker update. The problem is definitely related to vpnkit and happens when a container perform a download query (wget, package manager...)

Docker containers network hang a the query fails.

I have the following errors in service.txt leading to a crash of vpnkit.exe:

[14:26:36.022][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.022][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.022][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.022][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Upstream DNS server 0.0.0.0:53 has dropped 6 packets in a row: assuming it's offline

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:36.023][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 0.0.0.0:53 caught Lwt.Resolution_loop.Canceled returning Eof

[14:26:41.051][Moby           ][Info   ] [   52.910571] hv_balloon: Received INFO_TYPE_MAX_PAGE_CNT
[14:26:41.068][Moby           ][Info   ] [   52.920557] hv_balloon: Data Size is 8
[14:26:42.398][VpnKit         ][Error  ] Process died

Then when it restarts I see the following error:

[14:26:47.648][VpnKit ][Error ] vpnkit.exe: While watching /etc/resolv.conf: ENOENT Hope this helps even if I don't know how to reproduce this issue.

romain-gigault avatar Jan 04 '19 13:01 romain-gigault

I had the same issue with 2.0.0-win81. Downgrading to 18.06.1-ce-win73 fixed it. Re-upgrading to 2.0.0-win81 broke it again. It is reproducible running localstack.

pmsanford avatar Jan 09 '19 21:01 pmsanford

Same issue with Version 2.0.0.2 (30215) on Windows 10pro: I have to restart Docker in order to connect to the containers again.

This is the only error entry I could find in the log file:

 [14:28:41.172][VpnKit         ][Error  ] vpnkit.exe: Socket.Stream: caught An existing connection was forcibly closed by the remote host.

Uploaded diagnostics ID: A522ACFF-B6E5-4DDD-BCD9-C5119CC0090A/20190115143005

abosisio avatar Jan 15 '19 13:01 abosisio

Still happening on Version 2.0.0.2 (30215), Mac and Windows.

mindhaq avatar Jan 18 '19 11:01 mindhaq

@djs55 In #3257 (closed as dupe) I have a repeatable case to demonstrate the issue.

marwatk avatar Jan 21 '19 15:01 marwatk

@marwatk thanks for the pointer to the repro steps -- I'll try them to see if they work for me.

djs55 avatar Jan 21 '19 22:01 djs55

Is there a workaround, while we wait for fix?

talgat-ruby avatar Jan 22 '19 21:01 talgat-ruby

@talgat-ruby Downgrade to version 18.06.1-ce-win73 available here (links to older installers can be found on the release notes page here)

pmsanford avatar Jan 22 '19 22:01 pmsanford

The fix from #426 worked for me thanks @djs55

llenrup avatar Feb 14 '19 03:02 llenrup

Release 31259 does NOT fix the issue for me.

JPMoresmau avatar Feb 24 '19 13:02 JPMoresmau

Release 31259 does NOT fix the issue for me.

Confirmed. I'm experiencing the same thing, same version.

lundy405 avatar Feb 25 '19 01:02 lundy405

Have you tried the 31088 build that @djs55 posted here?

marwatk avatar Feb 25 '19 16:02 marwatk

I have not...should I go with the 31088 build, or the latest edge build?

lundy405 avatar Feb 25 '19 16:02 lundy405

According to djs55 here there's been at least one edge build that didn't have the fix, I suppose it's possible there are more. @djs55, any idea if the fix has made it into any edge builds?

marwatk avatar Feb 25 '19 16:02 marwatk

I can try 31088 but would a fix be in 31088 that wouldn't be present in 31259 (31259 being greater than 31088)?

JPMoresmau avatar Feb 25 '19 16:02 JPMoresmau