Connecting BalenaFin gateway to local TTSv3

Hello,
i’ve configured The Thing Stack v3 on my network (with IP static 192.168.43.199).
I’ve created a Gateway on my TTS console but the balenafin does not connect to the locally installed TTSv3.
In the dashboard of the balenafin i have entered the variable
TC_KEY: NNSXS.ZD3UBTMSXAEGUK3UVXZODT…
TC_URI: wss://192.168.43.199:8887
TC_TRUST: -----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwI … Y4fXtHE= -----END CERTIFICATE-----

but I get this error:
23.11.21 09:13:32 (+0100) main Gateway EUI: b827ebfffe09fa6e
23.11.21 09:13:33 (+0100) main Using MODEL: SX1302
23.11.21 09:13:33 (+0100) main Server: wss://192.168.43.199:8887
23.11.21 09:13:33 (+0100) main Using variant=std, lns_config=’./lns-ttn’
23.11.21 09:13:33 (+0100) main Starting Station …
23.11.21 09:13:33 (+0100) main Killing process 37
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.659 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3)
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.659 [SYS:INFO] Station Ver : 2.0.5(corecell/std) 2021-10-21 09:39:15
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.660 [SYS:INFO] Package Ver : 2.0.4
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.660 [SYS:INFO] proto EUI : 0:b827:eb09:fa6e (/sys/class/net/eth0/address)
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.660 [SYS:INFO] prefix EUI : ::1 (builtin)
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.660 [SYS:INFO] Station EUI : b827:ebff:fe09:fa6e
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.660 [SYS:INFO] Station home: ./lns-ttn/ (–home)
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.660 [SYS:INFO] Station temp: /var/tmp/ (builtin)
23.11.21 09:13:33 (+0100) main 2021-11-23 08:13:33.660 [SYS:WARN] Station in NO-CUPS mode
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:33.862 [TCE:INFO] Starting TC engine
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:33.872 [any:INFO] ./lns-ttn/tc.trust:
23.11.21 09:13:34 (+0100) main cert. version : 3
23.11.21 09:13:34 (+0100) main serial number : 1D:C4:B0:25:FB:D5:82:2B:93:65:EA:D1:84:05:20:C2:AB:21:55:5F
23.11.21 09:13:34 (+0100) main issuer name : C=IT, ST=Some-State, L=Bologna, O=CAi4s.example.com, CN=192.168.43.199
23.11.21 09:13:34 (+0100) main subject name : C=IT, ST=Some-State, L=Bologna, O=CAi4s.example.com, CN=192.168.43.199
23.11.21 09:13:34 (+0100) main issued on : 2021-11-16 15:03:06
23.11.21 09:13:34 (+0100) main expires on : 3021-03-19 15:03:06
23.11.21 09:13:34 (+0100) main signed using : RSA with SHA-256
23.11.21 09:13:34 (+0100) main RSA key size : 2048 bits
23.11.21 09:13:34 (+0100) main basic constraints : CA=t2021-11-23 08:13:33.873 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:33.893 [TCE:INFO] Connecting to INFOS: wss://192.168.43.199:8887
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.106 [TCE:INFO] Infos: b827:ebff:fe09:fa6e muxs-::0 wss://192.168.43.199:8887/traffic/eui-B827EBFFFE09FA6E
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.106 [AIO:DEBU] [3] ws_close reason=1000
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.106 [AIO:DEBU] Echoing close - reason=1000
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.107 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.107 [AIO:DEBU] [3] WS connection shutdown…
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.107 [any:INFO] ./lns-ttn/tc.trust:
23.11.21 09:13:34 (+0100) main cert. version : 3
23.11.21 09:13:34 (+0100) main serial number : 1D:C4:B0:25:FB:D5:82:2B:93:65:EA:D1:84:05:20:C2:AB:21:55:5F
23.11.21 09:13:34 (+0100) main issuer name : C=IT, ST=Some-State, L=Bologna, O=CAi4s.example.com, CN=192.168.43.199
23.11.21 09:13:34 (+0100) main subject name : C=IT, ST=Some-State, L=Bologna, O=CAi4s.example.com, CN=192.168.43.199
23.11.21 09:13:34 (+0100) main issued on : 2021-11-16 15:03:06
23.11.21 09:13:34 (+0100) main expires on : 3021-03-19 15:03:06
23.11.21 09:13:34 (+0100) main signed using : RSA with SHA-256
23.11.21 09:13:34 (+0100) main RSA key size : 2048 bits
23.11.21 09:13:34 (+0100) main basic constraints : CA=t2021-11-23 08:13:34.108 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.116 [TCE:VERB] Connecting to MUXS…
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.352 [AIO:ERRO] [3] WS upgrade failed with HTTP status code: 403
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.352 [AIO:DEBU] [3] WS connection shutdown…
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.352 [TCE:VERB] Connection to MUXS closed in state 3
23.11.21 09:13:34 (+0100) main 2021-11-23 08:13:34.352 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)

What am I doing wrong?
Thanks

Hello @mzamagni welcome to the balena community.

Could you please confirm that wss://192.168.43.199:8887 is working properly? And did you get the TC_KEY on your local server?

There was an error on EUI of gateway. An old value was inserted during the registration of the gateway in the TTS, Now it’s working.
Thank you

1 Like