FreifunkBremen / yanic

Yet another node info collector - for respondd to be used with meshviewer to Grafana (with influxdb or graphite)
https://freifunkbremen.github.io/yanic/
GNU Affero General Public License v3.0
20 stars 40 forks source link

BUG: meshviewer.json sometimes empty #236

Closed T0biii closed 1 month ago

T0biii commented 4 months ago

We(Freifunk MUC) got a couple of meshviewer.json files: https://github.com/freifunkMUC/ffmuc-salt-public/blob/main/yanic/yanic.conf.tmpl#L45-L89 Sometimes some of them are empty the only way to get content back is to restart yanic (sometimes several times). In the Logs there is no hint why the output is empty

maurerle commented 4 months ago

I never experienced such a behavior in FFAC. We are directly serving the meshviewer.json from the yanic running on the map server, and it never has been empty..?

T0biii commented 4 months ago

we think it might be a problem with more than one meshviewer output But atm we have no idea why this is happening sometimes

genofire commented 3 months ago

without any setup / code / logs which make it reproducible we also have no idea how to solve this issue.

The code is designed, that we normaly write everything in a .tmp file and the move that to the correct place. On this way, the should to no time be a empty file. See here for the code: https://github.com/FreifunkBremen/yanic/blob/ef3ee358d108dff6f74fc505021d618a2ba5555f/runtime/nodes.go#L272-L289

T0biii commented 3 months ago

in the logs there seems no reasone why this is happening. After an restart it is fixed. Can we add somewhere some more logging?

T0biii commented 1 month ago

currently it is running for some time without empty file, if i remember correctly the timestamp was in the file but no node infos

if we experience this again I will add more information to the issue