n42n / n3n

Peer to Peer VPN
https://n3n.dev
86 stars 9 forks source link

Restarting edge can lead to "address already in use" errors #45

Open hamishcoleman opened 4 months ago

hamishcoleman commented 4 months ago

The supernode is supposed to keep any address from being reused for a period after the last message from that host. This allows an edge to release the address during a controlled shutdown/restart but also alows a crash stop/start to eventually reuse the address.

During a recent stop/start test in a production environment, it was noted that the "not release" message was still occurring over 5 minutes after the edge was restarted

[src/edge_utils.c:2716] ERROR: authentication error, MAC or IP address already in use or not released yet by supernode
VergLsm commented 1 month ago

I have the same problem.

hamishcoleman commented 3 weeks ago

This error is clearly occuring in more situations than it should be, so it will still be investigated.

That being said, there are a number of actions you can take to make it less impacting - have you seen the FAQ entry?

hamishcoleman commented 3 weeks ago

Silly github, I simply mentioned it in a release, I didnt say "Fixes"

VergLsm commented 3 weeks ago

I have read the FAQs, and it appears that the Supernode does not forget the edge, while the edge continuously throws an 'already in use' error indefinitely.

I am currently using v3.4.1 of n3n. Would it be advisable for me to upgrade to the pre-release v3.4.2?

hamishcoleman commented 3 weeks ago

This release is intended to add some missing expiry logic to the path the supernode is using - so yes, you could test upgrading to it.

However, I have not had a chance to try to trigger the issue with 3.4.2 (I dont have a quick way to reproduce the issue, so I just need to have some time to repeatedly kill off an edge) so I cannot say that the new version is fully tested yet.

hamishcoleman commented 2 weeks ago

@VergLsm - I've tested my fix and v3.4.2 works for me - are you able to report back how that version has gone for you?

VergLsm commented 2 weeks ago

I am still using v3.4.1 and have been too busy lately. I will upgrade to v3.4.2 later to see if it works for me.