Seit ein paar Tagen hatte ich folgenden Fehler auf meinem LoRaWAN Gateway:
- ERROR: local_conf.json is not a valid JSON file
Den Fehler erhielt ich nach folgendem Statement: service ttn-gateway status
Mit folgender gesamten Fehlermeldung:
pi@IMAKEYOUINTELLIGENT-LORWAWAN1:~ $ service ttn-gateway status
● ttn-gateway.service – The Things Network Gateway
Loaded: loaded (/lib/systemd/system/ttn-gateway.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-03-16 17:11:52 CET; 4s ago
Process: 2459 ExecStart=/opt/ttn-gateway/bin/start.sh (code=exited, status=1/FAILURE)
Main PID: 2459 (code=exited, status=1/FAILURE)
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: INFO: Beacon is disabled
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: INFO: Monitor is disabled
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: INFO: Platform configured to „IMST + Rpi“
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: INFO: Contact email configured to „info@imakeyouintelligent.com“
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: INFO: Description configured to „IMAKEYOUINTELLIGENT-LORAWAN1“
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: INFO: found local configuration file local_conf.json, parsing it
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: INFO: redefined parameters will overwrite global parameters
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[2459]: ERROR: local_conf.json is not a valid JSON file
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE
Mär 16 17:11:52 IMAKEYOUINTELLIGENT-LORWAWAN1 systemd[1]: ttn-gateway.service: Failed with result ‚exit-code‘.
Basis der Grundinstallation war: https://wiki.opennet-initiative.de/wiki/LoRaWAN-GW-Schritt-für-Schritt
In der /opt/ttn-gateway/bin $ sudo nano local_conf.json musste die Latitude und Longitude mit einem Punkt (.) und nicht mit einem Komma (,) getrennt werden. Nach erfolgreichen Änderung war das Gateway wieder „up“.
pi@IMAKEYOUINTELLIGENT-LORWAWAN1:/opt/ttn-gateway/bin $ service ttn-gateway status
● ttn-gateway.service – The Things Network Gateway
Loaded: loaded (/lib/systemd/system/ttn-gateway.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-03-16 17:15:54 CET; 10s ago
Main PID: 3411 (start.sh)
Tasks: 4 (limit: 2059)
CGroup: /system.slice/ttn-gateway.service
├─3411 /bin/bash /opt/ttn-gateway/bin/start.sh
└─3426 ./poly_pkt_fwd
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: found local configuration file local_conf.json, parsing it
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: redefined parameters will overwrite global parameters
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: local_conf.json does not contain a JSON object named SX1301_conf
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: gateway MAC address is configured to B827EBFFFE914B27
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: Found 1 servers in array.
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: Server 0 configured to „eu1.cloud.thethings.network“, with port up „1700“ and port down „1700“
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: packets received with a valid CRC will be forwarded
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: packets received with a CRC error will NOT be forwarded
Mär 16 17:15:54 IMAKEYOUINTELLIGENT-LORWAWAN1 ttn-gateway[3411]: INFO: packets received with no CRC will NOT be forwarded