NebraLtd / hm-gatewayrs

Light Hotspot (gateway-rs) Container for Helium
MIT License
5 stars 9 forks source link

devices with very old region parameters (in format region_868) cause miner to get in crash loop and eventually crap out #55

Closed shawaj closed 1 year ago

shawaj commented 1 year ago

Miner - https://admin.cloud.nebra.com/#/device/29607/show Dash - https://dashboard.nebra.com/admin/device/devices/3a431d434f1cc112/ Explorer - https://app.hotspotty.net/hotspots/112h4zwWHL36zEcczphpQaN8YRdSBSG2mDaCzuekxxy2qoAoDRyD/rewards Discord - https://discord.com/channels/404106811252408320/404106811252408322/1116519788294979684

Weird issue, but at some point in the past helium-miner gave regions as format region_eu868 instead of just EU868. This has now been reverted, however, if a miner has been turned off for a long time and just turned on in last few months, since the solana update they will not work as the gateway-rs tries to start with this older region format and fails like the below output. It should then try to get the region from the region service but this never works and the container just gets stuck in a restart loop and eventually just gives up.

root@nebra-72E75B:~# balena ps -a
CONTAINER ID   IMAGE                                                            COMMAND                  CREATED       STATUS                  PORTS                               NAMES
9cc17f8b3ded   86879d57ab37                                                     "./start_pktfwd.sh"      8 days ago    Up 7 days                                                   packet-forwarder_32632_5140_8b4f2188bcbf785f63850c5f7e8ba573
808be0a3778b   c0874c0bc901                                                     "/root/start_multipl…"   8 days ago    Up 7 days               1681/tcp                            multiplexer_32636_5140_8b4f2188bcbf785f63850c5f7e8ba573
bd35d7d5cb0b   fa01a3f2bfa3                                                     "/opt/start-gateway-…"   8 days ago    Up 7 days                                                   gateway-config_32635_5140_8b4f2188bcbf785f63850c5f7e8ba573
1ca0f44cd02e   73e114e4dabb                                                     "/opt/nebra-gatewayr…"   8 days ago    Exited (1) 6 days ago                                       helium-miner_32633_5140_8b4f2188bcbf785f63850c5f7e8ba573
fe1b1c395ddd   2c8ab0f089b6                                                     "/opt/start_diagnost…"   8 days ago    Up 7 days               0.0.0.0:80->80/tcp, :::80->80/tcp   diagnostics_32634_5140_8b4f2188bcbf785f63850c5f7e8ba573
236ed9ac3de1   5ce1dc1fad6f                                                     "sh ./entry.sh"          8 days ago    Up 7 days                                                   dbus-session_32637_5140_8b4f2188bcbf785f63850c5f7e8ba573
a2bc3756581a   registry2.balena-cloud.com/v2/6e1bcf249fcc2f8202341d4641c13acf   "/usr/src/app/entry.…"   2 years ago   Up 7 days (healthy)                                         balena_supervisor
root@nebra-72E75B:~# balena logs 1ca0f44cd02e
root@nebra-72E75B:~# balena restart 1ca0f44cd02e
1ca0f44cd02e
root@nebra-72E75B:~# balena logs 1ca0f44cd02e -f
Keypair has been found. (GW_KEYPAIR = ecc://i2c-7:96?slot=0)
Onboarding key has been found. (GW_ONBOARDING = ecc://i2c-7:96?slot=0)
Starting gateway-rs...
crond[14]: crond (busybox 1.35.0) started, log level 8
Error: Config(unsupported region: region_eu868)
Keypair has been found. (GW_KEYPAIR = ecc://i2c-7:96?slot=0)
Onboarding key has been found. (GW_ONBOARDING = ecc://i2c-7:96?slot=0)
crond[13]: crond (busybox 1.35.0) started, log level 8
Starting gateway-rs...
Error: Config(unsupported region: region_eu868)
Keypair has been found. (GW_KEYPAIR = ecc://i2c-7:96?slot=0)
Onboarding key has been found. (GW_ONBOARDING = ecc://i2c-7:96?slot=0)
Starting gateway-rs...
crond[14]: crond (busybox 1.35.0) started, log level 8
Error: Config(unsupported region: region_eu868)