Data Connection Lost Win10 (Server) Win10 (Clients) 37

Blaok chiblaok+wireguarddev at gmail.com
Mon Dec 30 22:01:12 CET 2019


I am experiencing the same issue. For me the problem occurs much less
frequently (one or two times per day) so it wasn't too much trouble to
me. My windows client is configured with 8 peers but most of the time
it communicates with only one of them. There is nothing other than
"Failed to write packet to TUN device: file already closed" in the log
that is related to the issue (unless there is debugging log that I did
not turn on).

I did some research myself earlier. I'm pretty sure "file already
closed" was reported by and only by
https://git.zx2c4.com/wireguard-go/tree/tun/tun_windows.go#n224 and
https://git.zx2c4.com/wireguard-go/tree/tun/tun_windows.go#n229 in the
Write function. However, I was unable to make anything to fix the
problem other than invoking a cmd script to reset the whole interface.
I think https://git.zx2c4.com/wireguard-go/commit/?id=2b242f93932e1c4ab8b45dd0f628dd4fe063699b
partially solves the problem. Without this commit, the problem can be
reproduced simply by making a large volume of traffic in a short
period (e.g. 100Mbps for a few minutes). Now with this commit I am
unable to manually reproduce it anymore, but that "Failed to write
packet to TUN device: file already closed" still happens every several
days.

Blaok

On Mon, Dec 30, 2019 at 1:52 AM eric brandl <ericb0813 at gmail.com> wrote:
>
> Issue I am having is sporadically around every 5 to 30 min all peer connections no longer send traffic over them, and the only way to get them working again is to restart the WireGuard server (Win 10) .
>
>
> The log shows this:
>
> 2019-12-28 01:39:46.625: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.629: [TUN] [GameNet] Binding v4 socket to interface 16 (blackhole=false)
>
> 2019-12-28 01:39:46.631: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.649: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.668: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.692: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.714: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
> 2019-12-28 01:39:46.730: [TUN] [GameNet] Failed to write packet to TUN device: file already closed
>
>
> Server Config:
>
> [Interface]
> PrivateKey = SNIP
> ListenPort = 5687
> Address = 10.152.152.1/24
> MTU = 1360
>
> [Peer]
> PublicKey = BMIr6jiTNpu1wiSAqTLBUBFnM3DBW+RMdvapkmnFAiY=
> AllowedIPs = 10.152.152.2/32
>
> [Peer]
> PublicKey = gY0SvOX8lKfLkMXHIwA6pNnB8ooc36vCOPlQ0WmR5Es=
> AllowedIPs = 10.152.152.3/32
>
> [Peer]
> PublicKey = NcbtXceq1dh3khRv+YXXXw9RmJJH+r0acVIGbJ3qWSY=
> AllowedIPs = 10.152.152.4/32
>
> [Peer]
> PublicKey = LkMrfhjHOz6VgL9gTsBkcahkw++RMYokMbJnViQ9xVM=
> AllowedIPs = 10.152.152.5/32
>
> [Peer]
> PublicKey = YAKEhGM4Wr1SYSb197ugyV7IKqUOh+Jzpg7NVNLa3AM=
> AllowedIPs = 10.152.152.6/32
>
> [Peer]
> PublicKey = MZ1ycd1MdUvFUDpRxgY0hc7/jwTP9TuuYB6uwmyYdmQ=
> AllowedIPs = 10.152.152.7/32
>
> [Peer]
> PublicKey = Re5hkZG10PuN993GVRkkYCjjnyKyk96SCN4vFP5l/mM=
> AllowedIPs = 10.152.152.8/32
>
> [Peer]
> PublicKey = Yrx9W1PC60Uw9tpsRIByV0U+aW3eE210X1LCxTnk21w=
> AllowedIPs = 10.152.152.10/32
>
> Example Client Config:
>
> [Interface]
> PrivateKey = generated_private_key
> ListenPort = 5687
> Address = 10.152.152.3/24
> MTU = 1360
>
> [Peer]
> PublicKey = wQE513lYAgeLMcA72rGUnAcqknTYRlC2+oyWKI4Q1j4=
> AllowedIPs = 10.152.152.0/24
> Endpoint = SNIP:5687
> PersistentKeepalive = 40
>
> Things I have tried:
>
> Rolling back to 35
>
> Changing MTU
>
> Switching NIC in Proxmox from Intel to Realtek and back
>
>
> Other Notes:
>
> With only two peers connected it seems to be less of an issue, with 8 or so connected we get this issue quicker.
>
> _______________________________________________
> WireGuard mailing list
> WireGuard at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard


More information about the WireGuard mailing list