[GH-ISSUE #30] WG peer handshake fails disrupting the VPN connection periodically #14

Open
opened 2026-10-13 21:05:11 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @elringus on GitHub (Oct 1, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/30

I've installed AmneziaWG server to a self-hosted VPS (Ubuntu 22.04) via the Amnezia app and set up the client on a Keenetic KN-1810 router following the official guide (https://docs.amnezia.org/ru/documentation/instructions/keenetic-os-awg/).

It's working fine, but periodically, about once per hour, the connection drops for 0.5-1.5 minutes.

Here is the router log when that happens:

[I] 14:06:12 kernel: wireguard: Wireguard0: retrying handshake with peer "xxx" (3) (x.x.x.x:31673) because we stopped hearing back after 2169110528 seconds
[I] 14:06:17 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 2164852204 seconds, retrying (try 5)
[I] 14:06:22 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 2164852204 seconds, retrying (try 5)
[I] 14:06:33 kernel: Core::Syslog: last message repeated 2 times.
[I] 14:06:38 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 1 seconds, retrying (try 5)
[I] 14:06:43 kernel: wireguard: Wireguard0: retrying handshake with peer "xxx" (3) (x.x.x.x:31673) because we stopped hearing back after 2412081728 seconds
[I] 14:06:43 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 256 seconds, retrying (try 5)
[I] 14:06:48 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 2164852204 seconds, retrying (try 5)

— ignore the weird seconds values, as that seem to be a Keenetic bug, which they claim doesn't affect anything.

I've spotted a similar report (https://github.com/amnezia-vpn/amnezia-client/issues/1041), where the author found that setting an optional Listen port resolved their issue and attempted the same, but it didn't help in my case.

Can someone please suggest what else I can try to fix/debug this further?

Originally created by @elringus on GitHub (Oct 1, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/30 I've installed AmneziaWG server to a self-hosted VPS (Ubuntu 22.04) via the Amnezia app and set up the client on a Keenetic KN-1810 router following the official guide (https://docs.amnezia.org/ru/documentation/instructions/keenetic-os-awg/). It's working fine, but periodically, about once per hour, the connection drops for 0.5-1.5 minutes. Here is the router log when that happens: ``` [I] 14:06:12 kernel: wireguard: Wireguard0: retrying handshake with peer "xxx" (3) (x.x.x.x:31673) because we stopped hearing back after 2169110528 seconds [I] 14:06:17 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 2164852204 seconds, retrying (try 5) [I] 14:06:22 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 2164852204 seconds, retrying (try 5) [I] 14:06:33 kernel: Core::Syslog: last message repeated 2 times. [I] 14:06:38 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 1 seconds, retrying (try 5) [I] 14:06:43 kernel: wireguard: Wireguard0: retrying handshake with peer "xxx" (3) (x.x.x.x:31673) because we stopped hearing back after 2412081728 seconds [I] 14:06:43 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 256 seconds, retrying (try 5) [I] 14:06:48 kernel: wireguard: Wireguard0: handshake for peer "xxx" (3) (x.x.x.x:31673) did not complete after 2164852204 seconds, retrying (try 5) ``` — ignore the weird seconds values, as that seem to be a Keenetic bug, which they claim doesn't affect anything. I've spotted a similar report (https://github.com/amnezia-vpn/amnezia-client/issues/1041), where the author found that setting an optional `Listen port` resolved their issue and attempted the same, but it didn't help in my case. Can someone please suggest what else I can try to fix/debug this further?
Author
Owner

@it800 commented on GitHub (Dec 5, 2024):

Same issue here, on the other Keenetic models though. I have reported the problem to the Keenetic support team, however it seems that the problem might be on the AWG site, since other users face it not just on the routers. The problem starts randomly and can be fixed only by manual intervention: you should turn the AWG connection off and back on, then it returns back to normal for another random amount of time.

<!-- gh-comment-id:2519438395 --> @it800 commented on GitHub (Dec 5, 2024): Same issue here, on the other Keenetic models though. I have reported the problem to the Keenetic support team, however it seems that the problem might be on the AWG site, since other users face it not just on the routers. The problem starts randomly and can be fixed only by manual intervention: you should turn the AWG connection off and back on, then it returns back to normal for another random amount of time.
Author
Owner

@mglants commented on GitHub (Jan 16, 2025):

Same thing seen in openwrt, with kernel mode support

<!-- gh-comment-id:2595732402 --> @mglants commented on GitHub (Jan 16, 2025): Same thing seen in openwrt, with kernel mode support
Author
Owner

@dem1tris commented on GitHub (Mar 21, 2025):

Same thing, both from keenetic and iOS

<!-- gh-comment-id:2744388301 --> @dem1tris commented on GitHub (Mar 21, 2025): Same thing, both from keenetic and iOS
Author
Owner

@kaidengreed commented on GitHub (Jul 12, 2025):

Maybe it is relevant and will help someone. After spending one sleepless night, through trial and error, I think I found a solution to my similar problem. When adding a new VPN Wireguard (AmneziaWG) connection, the Keenetic router does not set the PresharedKey and VPN does not connect at all. And in the log the following entry appears:

wireguard: Wireguard2: handshake for peer "xxxxxxxxxxx" (31) (xxx.xxx.xxx.xxx:xxxxx) did not complete after 5 seconds, retrying (try 9)
wireguard: Wireguard2: invalid handshake response from xxx.xxx.xxx.xxx:xxxxx

In this case You need to open the configuration file and copy it manually to the connection settings. It's strange, when adding the first VPN connection, it was apparently added automatically, but with 2, 3, etc. the field remained empty.

<!-- gh-comment-id:3064513496 --> @kaidengreed commented on GitHub (Jul 12, 2025): Maybe it is relevant and will help someone. After spending one sleepless night, through trial and error, I think I found a solution to my similar problem. When adding a new VPN Wireguard (AmneziaWG) connection, the Keenetic router does not set the **PresharedKey** and VPN does not connect at all. And in the log the following entry appears: wireguard: Wireguard2: handshake for peer "xxxxxxxxxxx" (31) (xxx.xxx.xxx.xxx:xxxxx) did not complete after 5 seconds, retrying (try 9) wireguard: Wireguard2: invalid handshake response from xxx.xxx.xxx.xxx:xxxxx In this case You need to open the configuration file and copy it manually to the connection settings. It's strange, when adding the first VPN connection, it was apparently added automatically, but with 2, 3, etc. the field remained empty.
Author
Owner

@rogaliiik commented on GitHub (Jul 13, 2025):

Maybe it is relevant and will help someone. After spending one sleepless night, through trial and error, I think I found a solution to my similar problem. When adding a new VPN Wireguard (AmneziaWG) connection, the Keenetic router does not set the PresharedKey and VPN does not connect at all. And in the log the following entry appears:

wireguard: Wireguard2: handshake for peer "xxxxxxxxxxx" (31) (xxx.xxx.xxx.xxx:xxxxx) did not complete after 5 seconds, retrying (try 9) wireguard: Wireguard2: invalid handshake response from xxx.xxx.xxx.xxx:xxxxx

In this case You need to open the configuration file and copy it manually to the connection settings. It's strange, when adding the first VPN connection, it was apparently added automatically, but with 2, 3, etc. the field remained empty.

thank you so much, i spent 3 hours to deal with it, and it's unbelievable you write your comment just two days ago

<!-- gh-comment-id:3067183466 --> @rogaliiik commented on GitHub (Jul 13, 2025): > Maybe it is relevant and will help someone. After spending one sleepless night, through trial and error, I think I found a solution to my similar problem. When adding a new VPN Wireguard (AmneziaWG) connection, the Keenetic router does not set the **PresharedKey** and VPN does not connect at all. And in the log the following entry appears: > > wireguard: Wireguard2: handshake for peer "xxxxxxxxxxx" (31) (xxx.xxx.xxx.xxx:xxxxx) did not complete after 5 seconds, retrying (try 9) wireguard: Wireguard2: invalid handshake response from xxx.xxx.xxx.xxx:xxxxx > > In this case You need to open the configuration file and copy it manually to the connection settings. It's strange, when adding the first VPN connection, it was apparently added automatically, but with 2, 3, etc. the field remained empty. thank you so much, i spent 3 hours to deal with it, and it's unbelievable you write your comment just two days ago
Author
Owner

@JV-777 commented on GitHub (Jul 15, 2025):

Maybe it is relevant and will help someone. After spending one sleepless night, through trial and error, I think I found a solution to my similar problem. When adding a new VPN Wireguard (AmneziaWG) connection, the Keenetic router does not set the PresharedKey and VPN does not connect at all. And in the log the following entry appears:

wireguard: Wireguard2: handshake for peer "xxxxxxxxxxx" (31) (xxx.xxx.xxx.xxx:xxxxx) did not complete after 5 seconds, retrying (try 9) wireguard: Wireguard2: invalid handshake response from xxx.xxx.xxx.xxx:xxxxx

In this case You need to open the configuration file and copy it manually to the connection settings. It's strange, when adding the first VPN connection, it was apparently added automatically, but with 2, 3, etc. the field remained empty.

Same, THX bro!

<!-- gh-comment-id:3075347452 --> @JV-777 commented on GitHub (Jul 15, 2025): > Maybe it is relevant and will help someone. After spending one sleepless night, through trial and error, I think I found a solution to my similar problem. When adding a new VPN Wireguard (AmneziaWG) connection, the Keenetic router does not set the **PresharedKey** and VPN does not connect at all. And in the log the following entry appears: > > wireguard: Wireguard2: handshake for peer "xxxxxxxxxxx" (31) (xxx.xxx.xxx.xxx:xxxxx) did not complete after 5 seconds, retrying (try 9) wireguard: Wireguard2: invalid handshake response from xxx.xxx.xxx.xxx:xxxxx > > In this case You need to open the configuration file and copy it manually to the connection settings. It's strange, when adding the first VPN connection, it was apparently added automatically, but with 2, 3, etc. the field remained empty. Same, THX bro!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#14
No description provided.