Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Unable to reconnect after MacBook sleeps #1287

Open
maggie44 opened this issue Dec 8, 2024 · 0 comments
Open

🐛 BUG: Unable to reconnect after MacBook sleeps #1287

maggie44 opened this issue Dec 8, 2024 · 0 comments

Comments

@maggie44
Copy link

maggie44 commented Dec 8, 2024

What version of nebula are you using? (nebula -version)

1.9.4

What operating system are you using?

Mac

Describe the Bug

Nebula connects and works fine on Mac. I am running from within a Docker container, using bridge networking. After I close my laptop, go away, and come back it occasionally fails to reconnect (after the Mac sleeps/hibernates/whatever Mac does), showing Handshake timed out. From inside the container, I can reach all the UDP sockets of the lighthouse, if I run the same container again with the same config it starts and connects fine, but for some reason the original container that was left running is unable to connect.

It seems calling a config reload fixes the issue without restarting the container, although as it’s a hard issue to replicate I have only been able to confirm that once:

func (c *C) ReloadConfig() {

Is there something that the ReloadConfig() is doing that isn't done during a timeout? Perhaps NAT tables shift in Docker when it wakes back up and the UDP connection needs re-establishing? Any thoughts to help debug this one appreciated.

Logs from affected hosts

time="2024-12-07T20:52:27Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=3249700910 localIndex=3249700910 remoteIndex=0 udpAddrs="[...:...]" vpnIp=100.64.0.1
time="2024-12-07T20:52:27Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=2722712268 localIndex=2722712268 remoteIndex=0 udpAddrs="[...:...]" vpnIp=100.64.0.2
time="2024-12-07T20:52:27Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=451846405 localIndex=451846405 remoteIndex=0 udpAddrs="[...:...]" vpnIp=100.64.0.3
time="2024-12-07T20:52:33Z" level=info msg="Handshake timed out" durationNs=6803663170 handshake="map[stage:1 style:ix_psk0]" initiatorIndex=3249700910 localIndex=3249700910 remoteIndex=0 udpAddrs="[...:...]" vpnIp=100.64.0.1
time="2024-12-07T20:52:33Z" level=info msg="Handshake timed out" durationNs=6803892545 handshake="map[stage:1 style:ix_psk0]" initiatorIndex=2722712268 localIndex=2722712268 remoteIndex=0 udpAddrs="[...:...]" vpnIp=100.64.0.2
time="2024-12-07T20:52:33Z" level=info msg="Handshake timed out" durationNs=6803942128 handshake="map[stage:1 style:ix_psk0]" initiatorIndex=451846405 localIndex=451846405 remoteIndex=0 udpAddrs="[...:...]" vpnIp=100.64.0.3

Config files from affected hosts


Potentially related to rebinding that I think only ever landed for ios? #394

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant