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

Nodes do not reconnect automatically after connection to signaling server is lost #19

Open
sagar-chandarana opened this issue Sep 25, 2023 · 2 comments · May be fixed by #27
Open

Nodes do not reconnect automatically after connection to signaling server is lost #19

sagar-chandarana opened this issue Sep 25, 2023 · 2 comments · May be fixed by #27
Assignees
Labels
bug Something isn't working

Comments

@sagar-chandarana
Copy link

sagar-chandarana commented Sep 25, 2023

After disconnecting from wifi and connecting again on my laptop, it just goes into an endless loop of Stream Closed, despite having sent and received a kick after reconnection.

The only thing that actually helps to reconnect is to restart the weron vpn ip process

command

# node 1 (nixOS laptop)
weron -v 6 vpn ip --community 'somecomm' --password 'strongpass' --key 'longkey' --ips 10.10.1.1/24 --static --dev weron0

# node 2 (nixOS homelab)
weron -v 6 vpn ip --community 'somecomm' --password 'strongpass' --key 'longkey' --ips 10.10.1.2/24 --static --dev weron0

logs from node1 (laptop)

# fresh connection on starting weron
{"level":"info","id":"[\"10.10.1.2/24\"]","time":"2023-09-25T16:00:47-03:00","message":"Connected to peer"}

# disconnecting wifi
{"level":"debug","error":"Stream closed","channelID":"weron/ip/primary","peerID":"[\"10.10.1.2/24\"]","time":"2023-09-25T15:53:23-03:00","message":"Could not write to peer, continuing"}
... # repeats same message

# reconnecting wifi
{"level":"debug","label":"weron/ip/id","peer":"451a9302-6c3d-4197-ad61-f215c6c8c937","time":"2023-09-25T15:53:23-03:00","message":"Connected to channel"}
{"level":"debug","channelID":"weron/ip/id","peerID":"[\"10.10.1.2/24\"]","candidates":1,"timestamp":1695667830493778484,"time":"2023-09-25T15:53:23-03:00","message":"Sending greeting"}
{"level":"debug","label":"weron/ip/primary","peer":"451a9302-6c3d-4197-ad61-f215c6c8c937","time":"2023-09-25T15:53:23-03:00","message":"Connected to channel"}
{"level":"debug","channelID":"weron/ip/id","peerID":"[\"10.10.1.2/24\"]","time":"2023-09-25T15:53:23-03:00","message":"Received greeting"}
{"level":"debug","channelID":"weron/ip/id","peerID":"[\"10.10.1.2/24\"]","id":"","time":"2023-09-25T15:53:23-03:00","message":"Sending kick"}
{"level":"debug","channelID":"weron/ip/id","peerID":"[\"10.10.1.2/24\"]","id":"[\"10.10.1.2/24\"]","time":"2023-09-25T15:53:23-03:00","message":"Received kick"}

{"level":"debug","error":"Stream closed","channelID":"weron/ip/primary","peerID":"[\"10.10.1.2/24\"]","time":"2023-09-25T15:53:23-03:00","message":"Could not write to peer, continuing"}
... # repeats
@sagar-chandarana
Copy link
Author

Thank you for your amazing work btw! I find it quite fascinating that I can just setup a VPN between a few nodes in seconds without having to setup an account a website (zerotier, tailscale) or setting up discovery server (nebula, n2n).

@pojntfx
Copy link
Owner

pojntfx commented Jul 30, 2024

This is definitely a bug, probably in the negotiation protocol. I'll take a look at this in the future, there is still a bit of yak shaving to do in the meantime (mostly in https://github.com/pojntfx/panrpc)

@pojntfx pojntfx self-assigned this Jul 30, 2024
@pojntfx pojntfx added the bug Something isn't working label Jul 30, 2024
@pojntfx pojntfx changed the title Reconnection Nodes do not reconnect after connection to signaling server is lost Jul 30, 2024
@pojntfx pojntfx changed the title Nodes do not reconnect after connection to signaling server is lost Nodes do not reconnect automatically after connection to signaling server is lost Jul 30, 2024
@Suall1969 Suall1969 linked a pull request Sep 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants