RIPE-NCC / ripe-atlas-probe-measurements

RIPE Atlas probe measurement source code
Other
41 stars 18 forks source link

if_inet6 not enabled causes errors #5

Closed alexdelprete closed 1 year ago

alexdelprete commented 2 years ago

Hi,

I was having an issue with my probe on a Raspberry Pi 4B: no traffic data was sent.

I checked syslog and found out that when capturing traffica data from local interfaces, it was ok for LAN interface but then it queried interface if_inet6 that didn't exist because ipv6 was disabled, so the script threw an error and no data was sent.

This error should be prevented by checking which interfaces are available and which one is used to connect.

Thanks,

Alessandro

PhilipHomburg commented 2 years ago

Hi, I pushed a fix to the rxtxrpt-fix branch, both here and in the ripe-atlas-software-probe repo. Can you give it a try?

alexdelprete commented 2 years ago

I disabled ipv6 again and recompiled your new version, unfortunately problem is still there: in syslog I can see the same rptaddrs: unable to open '/proc/net/if_inet6': No such file or directory error. And traffic is not being reported.

Here's the detailed log highlighting the issue, the error is at EOL.

Nov 23 00:22:27 rpi4time ATLAS[1375]:  { "name": "lo", "bytes_recv": 108463, "pkt_recv": 146, "errors_recv": 0, "dropped_recv": 0, "fifo_recv": 0, "framing_recv": 0, "compressed_recv": 0, "multicast_recv": 0, "bytes_sent": 108463, "pkt_sent": 146, "errors_sent": 0, "dropped_sent": 0, "fifo_sent": 0, "collisions_sent": 0, "carr_lost_sent": 0, "compressed_sent": 0 }, { "name": "eth0", "bytes_recv": 821955, "pkt_recv": 6263, "errors_recv": 0, "dropped_recv": 2, "fifo_recv": 0, "framing_recv": 0, "compressed_recv": 0, "multicast_recv": 1570, "bytes_sent": 844599, "pkt_sent": 2948, "errors_sent": 0, "dropped_sent": 0, "fifo_sent": 0, "collisions_sent": 0, "carr_lost_sent": 0, "compressed_sent": 0 }rptaddrs: unable to open '/proc/net/if_inet6': No such file or directory

So I re-enabled ipv6 and rebooted, and here's the same report, showing it's working:

Nov 23 00:31:48 rpi4time ATLAS[587]:  { "name": "lo", "bytes_recv": 0, "pkt_recv": 0, "errors_recv": 0, "dropped_recv": 0, "fifo_recv": 0, "framing_recv": 0, "compressed_recv": 0, "multicast_recv": 0, "bytes_sent": 0, "pkt_sent": 0, "errors_sent": 0, "dropped_sent": 0, "fifo_sent": 0, "collisions_sent": 0, "carr_lost_sent": 0, "compressed_sent": 0 }, { "name": "eth0", "bytes_recv": 12539, "pkt_recv": 82, "errors_recv": 0, "dropped_recv": 0, "fifo_recv": 0, "framing_recv": 0, "compressed_recv": 0, "multicast_recv": 3, "bytes_sent": 11536, "pkt_sent": 89, "errors_sent": 0, "dropped_sent": 0, "fifo_sent": 0, "collisions_sent": 0, "carr_lost_sent": 0, "compressed_sent": 0 }eooqd: atlas_run: looking for 'evping -4 -c 3 -s 48 -i 1000 -A "33593157" 109.73.82.190'
PhilipHomburg commented 2 years ago

Ah, I'll take a look at rptaddrs as well.

alexdelprete commented 2 years ago

Ah, I'll take a look at rptaddrs as well.

that was the original issue, the only thing that has to be implemented is checking if if_inet6 exists, in rptaddrs.

Sorry if I didn't mention rptaddrs in the first post. :(

PhilipHomburg commented 2 years ago

You have an issue with traffic statistics, which is rxtxrpt, which had some weird leftover code. But I guess that was harmless and the real issue is rptaddrs. I thought rxtxrpt failed, when in fact it works fine but the failure of rptaddrs results in the backend dropping the traffic statistics.

alexdelprete commented 2 years ago

Yes, and if I would've mentioned rptaddrs as the source of the error, probably you wouldn't have lost time with rxtxrpt. That's why I said I'm sorry. Should have posted the log.

PhilipHomburg commented 2 years ago

I fixed rptaddrs as well. Please give it a try.

alexdelprete commented 2 years ago

Another problem: condmv: not moving, destination '/var/atlas-probe/data/out/simpleping' exists

Log:

Nov 24 17:05:14 rpi4time ATLAS[1335]:  { "name": "lo", "bytes_recv": 34101, "pkt_recv": 23, "errors_recv": 0, "dropped_recv": 0, "fifo_recv": 0, "framing_recv": 0, "compressed_recv": 0, "multicast_recv": 0, "bytes_sent": 34101, "pkt_sent": 23, "errors_sent": 0, "dropped_
sent": 0, "fifo_sent": 0, "collisions_sent": 0, "carr_lost_sent": 0, "compressed_sent": 0 }, { "name": "eth0", "bytes_recv": 265093, "pkt_recv": 2320, "errors_recv": 0, "dropped_recv": 2, "fifo_recv": 0, "framing_recv": 0, "compressed_recv": 0, "multicast_recv": 252, "by
tes_sent": 100365, "pkt_sent": 586, "errors_sent": 0, "dropped_sent": 0, "fifo_sent": 0, "collisions_sent": 0, "carr_lost_sent": 0, "compressed_sent": 0 }condmv: not moving, destination '/var/atlas-probe/data/out/simpleping' exists
PhilipHomburg commented 2 years ago

The message from condmv is perfectly normal. Maybe it should be suppressed.

alexdelprete commented 2 years ago

Sorry, since I saw no updates regarding traffic, I interpreted that as an error. It is working actually, I just had to wait some time...so I can confirm it's working now with your fixes. Thanks. :)