[atlas] Result streams not working
- Previous message (by thread): [atlas] Result streams not working
- Next message (by thread): [atlas] Probe down
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Florencia Alvarez Etcheverry
florencia.alvarezetcheverry at telecom-bretagne.eu
Wed Jul 13 16:51:22 CEST 2016
Hello, I'm using Python3.4 and Cousteau v1.2 I've tried to subscribe to the error channel but I don't know if I'm doing it well since I couldn't find documentation or examples of it. I added the lines: channel = "error" atlas_stream.bind_channel(channel, on_error_response) Yesterday I tried executing my program without timeout, I got the results within 20 seconds and I had to interrupt it since it was blocked in the wait(). Then I tried putting again 240 seconds of timeout and I also got the results. One strange thing I saw was that when I got the results, printed them and then I printed the state of the measurement, there are times that the state is 1 (Scheduled) and I think most of the time the state is 2 (Ongoing), and I don't understand why is this. Today I run it again several times, but I only got the results 5 of 12 times I executed it. (The results are always available on the web page, but I don't receive them by the stream.) I also tried to add a Semaphore that is released when the callback is called (and waits/is acquired with a timeout before disconnecting), but since it wasn't working I deleted it. Thank you, Florencia. > On 2016-07-12 19:21:29 CET, Massimo Candela wrote: > > On 12 Jul 2016, at 17:17, Massimo Candela <mcandela _at_ ripe _dot_ net> wrote: > > > > Some correction on fly, you should remove: start_time and interval since you are trying to do a one_off as soon as possible. > > I would suggest you to understand better the concepts here: https://atlas.ripe.net/docs/api/v2/manual/ or on the REST API manual. > > > > Remove also seconds=240 a and let me know if you see something. Its way way too small the timeout for a probe to get the schedule and send you some results. > > > > Sorry, for some reason I read 240ms. 5 minutes are instead enough for a one-off. > > > > >> On 12 Jul 2016, at 16:58, Florencia Alvarez Etcheverry <florencia.alvarezetcheverry _at_ telecom-bretagne _dot_ eu> wrote: > >> > >> Thank you for your answer. > >> I create a one-off measurement and then I want its results (as soon as they're available). > >> Here is my test code: http://pastebin.com/7p4zy388 > >> > >> On 2016-07-12 16:18:29 CET, Massimo Candela wrote: > >>> Hello Florencia, > >>> > >>> Thanks for using RIPE Atlas. > >>> > >>>> On 12 Jul 2016, at 15:47, Florencia Alvarez Etcheverry wrote: > >>>> > >>>> Hello, I started working with RIPE Atlas last week, when I made a script to create a one-off ping measurement between two specific probes (which I ping to check if they were working). I used Cousteau API, by default I sent 3 packets and I had 5 seconds of timeout. I got the results one time and then it stopped working. I changed the timeout to 3 or 4 minutes and while waiting for the callback function to execute I checked on the webpage and I can see the results for every measure I launched. > >>> > >>> The one-off measurement executes the measurement only once and gets stopped immediately. > >>> > >> But how immediately is that?, because I saw the results of the measurement but it was still running and I don't understand why. > >> How long should I wait since I launch the measurement (1 ping packet) to get the result? Is this time shorter than if I wait for the measurement to stop? (But is it possible to know that time?) > >> > >>>> > >>>> So I see the results on the page but they don't get to the stream and the callback function is never called. I also saw the status changed from "ongoing" to "stopped" several minutes after I've seen the results; which leads me to another question, when a measurement stops?, why if I already have the results of a ping (that is the only thing I've launched) it's still running? > >>>> > >>>> I tried with Cousteau and also directly with socketIO but it has the same behavior. > >>> > >>> > >>>> When I took off the parameters "packets=1,interval=60" of the request (leaving default values), > >>> > >>> What does it mean? These look like parameters for creating a (periodic) measurement, not for listening it. > >>> Can I see your code or at least the subscription parameters? > >>> > >>> Ciao, > >>> Massimo > >>> > >>>> I got the result with Cousteau API, but not with the socket directly. When I run it again it didn't work, so it looks like it works one of 20 times. Is there something I could do or am I doing something wrong? > >>>> > >>>> Thank you, > >>>> Florencia. > >>>> > >> > >> > >> > >> > > Sent via RIPE Forum -- https://www.ripe.net/participate/mail/forum
- Previous message (by thread): [atlas] Result streams not working
- Next message (by thread): [atlas] Probe down
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]