Hi Chris,
Thanks, we still see issues receiving measurements. I attached a
stripped down version of the script we’ve been using for a number of
years. The code basically sets up a stream and starts listening,
printing all measurements it recieves. It has some threading left (we
usually run this for a number of measurements). When starting this
script and doing a tcpdump, I see nearly no data at all being received
from the Atlas servers.
I hope this helps, let me know if you need any additional info.
Thanks!
--
Teun Vink
BIT | t...@bit.nl | +31 318 648 688
KvK: 09090351 | GPG: 0xFC8B25D6 | RIPE: TEUN-RIPE
On 1 Mar 2022, at 13:03, Chris Amin wrote:
Hi Teun,
I know that my colleagues have been in contact with you but I'm
writing here in case others are having the same issue.
There were issues with the service when you sent this original mail,
but I can no longer detect them and I understand you are still having
the issue. If that's the case could you please send me the cousteau
code you are using?
Thanks,
Chris
On 23/02/2022 08:34, Teun Vink via ripe-atlas wrote:
Hi,
We’re seeing some issues with RIPE Atlas streams using the
ripe.atlas.cousteau websocket library. Sockets seem to connect
properly, but no data is received. tcpdumps show very little traffic.
One of the already running receiver application (monitoring the exact
same set of measurements) is receiving data, but any newly started
daemon fails to receive data.
Is there an issue on the RIPE Atlas infrastructure?
Thanks,
--
ripe-atlas mailing list
ripe-atlas@ripe.net
https://lists.ripe.net/mailman/listinfo/ripe-atlas
#!/usr/bin/env python3
import sys
from threading import Thread
from ripe.atlas.cousteau import AtlasStream
class Stream(Thread):
def __init__(self, channel, stream_type, parameters):
Thread.__init__(self)
self.channel = channel
self.stream_type = stream_type
self.parameters = parameters
def on_result_ping(self, ping):
print(f"received: probe #{ping['prb_id']}, src: {ping['src_addr']}")
def on_result_response(self, *args):
"""
Function that will be called every time we receive a new result.
Args is a tuple, so you should use args[0] to access the real message.
"""
if args[0]['type'] == 'ping':
self.on_result_ping(args[0])
else:
try:
sys.stderr.write(
'Measurement type {} not supported.\n'.format(
args[0]['type']
)
)
sys.stderr.write('{}\n'.format(args[0]))
except KeyError as err:
sys.stderr.write(
str('Unexpected key {} in result.\n'.format(err))
)
def run(self):
"""
Function which adds a new stream.
"""
sys.stdout.write("* connecting to Atlas... ")
atlas_stream = AtlasStream()
atlas_stream.connect()
print("connected.")
sys.stdout.write("binding channel... ")
atlas_stream.bind_channel(
self.channel,
self.on_result_response,
)
print("done.")
sys.stdout.write("starting stream... ")
atlas_stream.start_stream(
stream_type=self.stream_type,
**self.parameters
)
print("done.")
atlas_stream.timeout()
atlas_stream.disconnect()
def main():
thread = Stream(
'atlas_result',
'result',
{'msm': 6943119},
)
thread.daemon = True
thread.start()
thread.join()
sys.exit(0)
if __name__ == '__main__':
main()
--
ripe-atlas mailing list
ripe-atlas@ripe.net
https://lists.ripe.net/mailman/listinfo/ripe-atlas