helium / erlang-libp2p

An Erlang implementation of libp2p swarms
https://helium.github.io/erlang-libp2p
Apache License 2.0
120 stars 33 forks source link

IP change not detected #373

Open madninja opened 3 years ago

madninja commented 3 years ago

Many EU ISPs change consumer IP addresses every 24-48 hours.

There have been a number of reports where the IP address changes, and while the API has a recent peerbook record the IP address was not updated to reflect the change either never, or it took a very long time which put it past the time for the next IP update.

Restarting the hotspot seems to fix it every time this was observed.

The theory is that IP change detection is failing, not being done often enough or not being done at all?

ghost commented 3 years ago

16th+17th Sept. peerbook reflected stale IP from the day before. Today re-issued IP was reflected within 1hr in pb. Maybe needs some time to digest the updates. RAKv1

ghost commented 3 years ago

Last 4 days a re-issued IP not being reflected in peerbook for 12+hrs. And lag time seems to be increasing with every day. Reboot does not seem to reduce lag time. So could be p2p propagation issue again similar to June/July.

Chris-S44 commented 3 years ago

Mine seems to be working again. Sometimes after 2 hrs but sometimes takes 12hrs. That is too long

Alexvandersaal commented 3 years ago

Same problem with my miner, yesterday i rebooted him and everything works great, today i checked in the senscap dashboard and the public ip chnged but the listen ip not.

amegyeri commented 3 years ago

Still having the same issue, nebra miner, firmware 2021.09.27.3 hotspot is beaconing only after a restart in case if the ISP changes the IP. we need a workaround for this as restarting the device twice a week will do no good… dm me if I can help in any way.

kuito commented 3 years ago

I am seemingly having a similar problem with my Sensecap hs. I moved it to a new location (No location set on this hs yet) after it was synced at home and all troubleshooting I’ve done shows port is open, Bluetooth diagnostics show:

Connected to Blockchain: yes Dialable: yes In/outbound in green

it is connected via 2.4ghz WiFi. Ping returns good.

when I view Sensecap dashboard listener ip shows previous ip, peerping returns unknown, and peerbook inquiry fails— hs shows offline. It’s been 6+hrs thus far.

I’ve rebooted it once (unplugged, plugged back in) and still nothing. I will try when I wake up tomorrow morning — hoping it’s just slow and resolves itself—any recommendations would be appreciated in the meantime :)

aoganesyan commented 3 years ago

Any updates guys?

gamegrip commented 3 years ago

Hi Guys wanted to chime in, I have a SenseCap M1 (EU868) version.

The issue described here seems to be affecting my particular M1, Ive just come across this GIThub post and wasnt aware that this may also be affecting my setup.

I literally have changed everything from end to end for this HS even swapping the HS itself.

The newly setup HS did start working successfully for 4 Days. Checking daily - 4 Days later and................... I noticed the HS P2P Status values become UNHEALTHY/UNKNOWN again. Port Checking revealed 44158 as Closed again. The HS became offline after 6hrs in Helium Explorer.

I noticed again the Public IP had changed but the Listen IP did not.

Considering I have changed everything and this is still happening and driving me crazy at this point (Taken over a month of troubleshooting up until now :-/ ) I was out of options and somehow stumbled upon this through search.

Currently the HS is again Syncing after a Reboot and I am monitoring this to see if the Listen IP will update, and the HS begins working. I am also keeping a very close eye out on the Public IP address but looking at the above this could really be whats been making this HS setup consistently going offline.

Will update as I monitor.... man I hope its a software fix !!

Chris-S44 commented 3 years ago

Listen ip is still not updating after days

Nando-bog commented 3 years ago

I thought the issue had been resolved. But after the latest update in October it started happening again. I have two hotspots and it only happens with one. Both are sensecap. The one with problems shows a collection time that is way off in the dashboard. At the time it’s like 2 hours slow. I can provide troubleshooting info to devs.

Shaddow22 commented 3 years ago

Listen IP ist still not updating after days. Please fix this

slin1698 commented 3 years ago

Hey, it Seems to be that the Problems is (still) or again there. Me and many of my friends have the Problem. Even if we restart the miner it isnt doing Anything and there are the wrong ips. PLEASE do something against ist. We paid so much money for Our miners and we love to be Part of the Network but this is very very annoying.

Thank you !

dakky221 commented 3 years ago

I'm unsubscribing from this thread. My Sensecap is working as intended and my IP changes once per 24h and everything is good since they released the fix, so you guys must be talking about something else. Good luck.

slin1698 commented 3 years ago

Nice, for the last 3 days, every time my ip changed( 24 hours) i had the wrong ips for about 12-15 hours. Screenshot_20211019-170605_Samsung Internet

Shaddow22 commented 3 years ago

I have the same problem? What fix you talk about dakky?

slin1698 commented 3 years ago

@Vagabond please do anything about it..

Chris-S44 commented 3 years ago

It works properly. Just the API and sensecap dash can take long to up.

slin1698 commented 3 years ago

It works properly. Just the API and sensecap dash can take long to up.

You Sure? Today my dash Showed me 2 ip's. One p2p. And the nat type changed to symmetric. What means that ?

I dont think that it works for everybody, most german people have Problems. Screenshot_20211020-121955_Facebook

derhabib commented 3 years ago

Hey my Sensecap M1 doesnt update the IP aswell even if i am restarten the router it wont help.

westerwalder commented 3 years ago

same here, again and again. No ip update since 72 hours.. Fix this shitty implementation!

amegyeri commented 3 years ago

Still the same issue, with Nebra indoor. I have to unplug the device every 1-2 days to make it work. Even after the restart it takes many hours before it starts gettong challenges properly - probably because it takes time to publish the IP address through the p2p network. the provider itself is a 1G fiber, just the freakin’ DHCP destroys everything…

please try to fix finally…

westerwalder commented 3 years ago

same here, again and again. No ip update since 72 hours.. Fix this shitty implementation!

Took 96h to update it on its own. This is way too long..

esodot commented 3 years ago

My Listen IP is empty, no idea what to do

hilavoku commented 3 years ago

Hi have the same problem. Got my Sensecap Wednesday and recognized the problem immediately. I wrote a little program which runs at my homeserver and when my DSL router is getting a new IP from my provider it will reboot the Sensecap Miner. But this is a small help cause the Miner will keep the wrong Listen IP for several hours and this is hugely hitting my Gains. What we really need is a bug fix and also a real console for the SenseCap. The current locale Console just provides four basic action but no possibility of reading/writing some values directly.

snoopy4567 commented 3 years ago

Same problem. IP address changed and the listen address appears to be stuck on the IP old address. Can't remotely reboot the machine and obviously nothing is working. Nebra machine. Help! Oh and it's been days now.

andy210000 commented 3 years ago

HI I have the same problem,

https://api.helium.io/v1/hotspots/ has an ip address which is incorrect https://app.heliumstatus.io/ has a different ip address which is different from the api.helium.io one

neither of them are correct, please someone help me getting these updated !

Vagabond commented 3 years ago

I'm looking into this again. One problem is I don't have access to any affected hotspot (and I've not seen it on a Helium hotspot). I will try to work with some makers to get access to logs and see what I'm missing.

In general are people punching a static port through to the hotspot, or are they using uPNP or PMP? If you are punching a static port through and are having this problem have you tried not doing that?

Vagabond commented 3 years ago

Again, if people who are regularly experiencing the issue can send me an email to andrew at helium dot com with their information, including:

Hotspot manufacturer Hotspot serial number Hotspot 'animal name' ISP Router model Router configuration (uPNP, PMP, static port map, etc) How often your external IP changes

I'll get in touch with the relevant hardware manufacturer and try to get access to some diagnostics.

shawaj commented 3 years ago

If anyone has a Nebra device with this issue, let me know and I can get access for you @Vagabond

andy210000 commented 3 years ago

If anyone has a Nebra device with this issue, let me know and I can get access for you @Vagabond

I have nebra with this issue @shawaj

andy210000 commented 3 years ago

I'm looking into this again. One problem is I don't have access to any affected hotspot (and I've not seen it on a Helium hotspot). I will try to work with some makers to get access to logs and see what I'm missing.

In general are people punching a static port through to the hotspot, or are they using uPNP or PMP? If you are punching a static port through and are having this problem have you tried not doing that?

I've just remove the static port and turned back on UPNP to see if that works. @Vagabond

Ive also emailedyou

Vagabond commented 3 years ago

Related to this I found a bug in the peer resolution code on the seed nodes, which would drastically slow down peerbook update propogation. We are rolling out a fix for that as well.

andy210000 commented 3 years ago

Related to this I found a bug in the peer resolution code on the seed nodes, which would drastically slow down peerbook update propogation. We are rolling out a fix for that as well.

@Vagabond fantastic, have you got the email with my details? can you confirm what the issue is yet?

snoopy4567 commented 3 years ago

You might be onto something with unpnp .. The router was setup that way when I first plugged the Nebra in. It was telling me it was relayed so I turned it off assigned an internal static IP to it and then setup a port forward. Could that have screwed it up? I can try tuning unpnp back on in a little while and see if that helps.

On Nov 8, 2021, at 11:38 AM, andy210000 @.***> wrote:

Related to this I found a bug in the peer resolution code on the seed nodes, which would drastically slow down peerbook update propogation. We are rolling out a fix for that as well.

@Vagabond https://github.com/Vagabond fantastic, have you got the email with my details? can you confirm what the issue is yet?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/helium/erlang-libp2p/issues/373#issuecomment-963347343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMRPYCBHHSSWJIHKKVYVN3UK74ITANCNFSM5CIMUQUQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Vagabond commented 3 years ago

upnp and pmp both have built in ways to inform the hotspot of external IP changes, the "punch a hole" method doesn't have access to that information directly and has to infer an IP change, which clearly can be error prone.

snoopy4567 commented 3 years ago

Sorry unpnp is a no go on the tp-link Archer 1200 … doesn’t work on a ping to the port.

On Nov 8, 2021, at 11:38 AM, andy210000 @.***> wrote:

Related to this I found a bug in the peer resolution code on the seed nodes, which would drastically slow down peerbook update propogation. We are rolling out a fix for that as well.

@Vagabond https://github.com/Vagabond fantastic, have you got the email with my details? can you confirm what the issue is yet?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/helium/erlang-libp2p/issues/373#issuecomment-963347343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMRPYCBHHSSWJIHKKVYVN3UK74ITANCNFSM5CIMUQUQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

shawaj commented 3 years ago

If anyone has a Nebra device with this issue, let me know and I can get access for you @Vagabond

I have nebra with this issue @shawaj

@andy210000 can you email the Hotspot details from the label on the unit to support@nebra.com and let me know the ticket number? Please add a link to this thread also

andy210000 commented 3 years ago

If anyone has a Nebra device with this issue, let me know and I can get access for you @Vagabond

I have nebra with this issue @shawaj

@andy210000 can you email the Hotspot details from the label on the unit to support@nebra.com and let me know the ticket number? Please add a link to this thread also

Hi Aaron,

Ticket (#311140) just raised @shawaj

amegyeri commented 3 years ago

If anyone has a Nebra device with this issue, let me know and I can get access for you @Vagabond

I also have the issue with Nebra indoor miner.. @shawaj

andy210000 commented 3 years ago

hi @Vagabond

I can now !peerbook my device and it gives me the correct IP address, however !peerping still gives me the old IP address

shawaj commented 3 years ago

If anyone has a Nebra device with this issue, let me know and I can get access for you @Vagabond

I also have the issue with Nebra indoor miner.. @shawaj

@amegyeri can you do the same as requested here https://github.com/helium/erlang-libp2p/issues/373#issuecomment-963579452

amegyeri commented 3 years ago

If anyone has a Nebra device with this issue, let me know and I can get access for you @Vagabond

I also have the issue with Nebra indoor miner.. @shawaj

@amegyeri can you do the same as requested here #373 (comment)

Done, Ticket (#311157).

Thank you! @shawaj

snoopy4567 commented 3 years ago

I emailed you @vagabond with my info but I don't have a ticket because I have no idea how to create a ticket.

snoopy4567 commented 3 years ago

I'm not sure what you did or if you did but Heliumstatus.io comes back all clean. In any case case thanks for your help. Now lets see if I can get this thing to sync up.

haze94 commented 3 years ago

Can you please take me out of Cc thank you

Sent from my iPhone

On Nov 8, 2021, at 6:48 PM, snoopy4567 @.***> wrote:



I'm not sure what you did or if you did but Heliumstatus.io comes back all clean. In any case case thanks for your help. Now lets see if I can get this thing to sync up.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/helium/erlang-libp2p/issues/373#issuecomment-963678927, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVNF4RLFNCZ3WBGPJR4M4W3ULBOT5ANCNFSM5CIMUQUQ.

shawaj commented 3 years ago

@haze94 you have to click the unsubscribe link in the email or on the github issue page

andy210000 commented 3 years ago

@Vagabond the peerbook seems to have updated however the peerping has not, its still using the old IP address.

kuito commented 3 years ago

@Vagabond the peerbook seems to have updated however the peerping has not, its still using the old IP address.

Give it a bit of time.. it is my experience that if the peerbook has updated correctly then the listener ip/peer ping will follow. :)

andy210000 commented 3 years ago

@Vagabond still not seeing any difference on the API listener IP

Passiveminer commented 3 years ago

@Vagabond i am facing same issue with peerbook, i have sensecap