Waziup / WaziGate

Waziup LoRa Edge gateway
21 stars 20 forks source link

V2.0: incorrect logs on single_chan_pkt_fwd #80

Closed cdupont closed 3 years ago

cdupont commented 4 years ago

The logs of single_chan_pkt_fwd seems incomplete: image

It seems to log only ERR. The complete log is:

$ docker logs -f d509e03115d9
[ERR  ] Can not set output power: expected 0xe, got 0xfc
[     ] waiting for packets ...
[     ] (<- 172.18.0.3:1700) PullAck: Token: 3D8E
[     ] listening on [::]:58990
[     ] (-> 172.18.0.6:1700) PullData: Token: BD8, Gateway ID: AA555A0000000000
[     ] radio SX1276 activated.
[ERR  ] Can not set output power: expected 0xe, got 0xfc
[     ] waiting for packets ...
[     ] (<- 172.18.0.6:1700) PullAck: Token: BD8

Also FATAL doesn't seems to be logged.

mojtaba-esk commented 3 years ago

The exact same command is used to generate logs, you do not see it because it shows only the latest 50 lines of logs in the log window

cdupont commented 3 years ago

Today I reopenned, but the logs window is empty:

image

The request seems correct, but the "response" is empty. image

The ID of the container is correct in the request.

mojtaba-esk commented 3 years ago

Maybe nothing is going on there or the container has not started

cdupont commented 3 years ago

Does it display only new logs? From command line I can can some logs:

$ docker logs waziup.wazigate-lora -f
GET device/id: 200 OK
Gateway ID: 0242ac120003ccde
Proxy listening on 'proxy.sock'.
--- Init ChirpStack
Organization "wazigate_1237770961" OK.
Network-server "Local Chirpstack Network Server" OK.
Service-profile "Wazigate Service Profile" OK.
Gateway "LocalWazigate_0242ac120003ccde" OK.
Application "Wazigate" OK.
Device-profile "Wazidev" OK.
The ChirpStack data has not changed.
--- Init Device
GET devices?meta=lorawan: 200 OK
DevEUI AA555A002601143F -> Waziup ID 5fafd2b526840c0006a68bd0
Reactivating Chirpstack device ... OK
There are 1 LoRaWAN devices.
[@] 200, GET /dist/hook.js s:9670
[@] 404, GET /undefined s:19
[@] 200, GET /dist/hook.js s:9670

However, things are different on the UI: image

mojtaba-esk commented 3 years ago

It uses something like this: docker logs --tail=50 waziup.wazigate-lora

cdupont commented 3 years ago

@mojtaba-esk your command works... However the result on the UI is the same...

cdupont commented 3 years ago

Any update?

cdupont commented 3 years ago

I saw the new UI, great! However, this specific bug is still there.

image

Only the line "The ChirpStack data has not changed." makes it through the WaziGate logs. Very strange.

cdupont commented 3 years ago

I think I understood, it seems that you display only "stdout". However most of the traces are made on stderr:

$ docker logs --tail=20 waziup.wazigate-lora -t   2> /dev/null
2020-11-30T17:31:52.968149322Z The ChirpStack data has not changed.

You could do something like this to get stderr as well:

docker logs --tail=20 waziup.wazigate-lora -t 2>&1
mojtaba-esk commented 3 years ago

Good point, let me try it

cdupont commented 3 years ago

Fixed in ISO 2.1.3, closing