standalone-lorawan-gateway-balena
standalone-lorawan-gateway-balena copied to clipboard
403 Error after logging in for the first time
After deploying to balena (with the basicstation
also deployed), logging in with default admin/changeme on the main page gives back a 403 Forbidden: Token exchange refused
, no option to do anything unless I blow away the cookies to get back to the login screen.
Also, trying to Create an account
is erroring on the url https://null/api/v3/auth_info
, but I'm pretty sure this is unrelated.
I resolved this by adding my devices IP address as the TS_DOMAIN
variable
Hi The code sets the default TS_DOMAIN to the first IP address in the LAN:
https://github.com/xoseperez/balena-tts-lns/blob/56e527cb27b5bc67e491dfe715c0e6910f493550/lorawan-stack/entrypoint.sh#L42
Maybe it got it wrong or you used a different IP (accessing via WiFi instead of ethernet, for instance)?
@xoseperez looks like TTS_DOMAIN
is null
instead of having the IP_LAN
value.
I have not been able to reproduce the issue consistently. Only once I've seen the same behaviour and it got solved after restarting the stack
service. Maybe a race condition on getting an IP?
This behaviour happens when you click Deploy with balena
as the TTS_DOMAIN
variable is only defined as null
at the balena.yml contract.