localhost:12345 does not show the correct status of the ubic service

60 views
Skip to first unread message

Иван Бессарабов

unread,
May 24, 2014, 1:44:20 PM5/24/14
to ubic...@googlegroups.com
Here is my problem:

$ curl http://localhost:12345/status/service/my.service
ok
$ sudo ubic status my.service
my.service not running

I'm expecting localhost:12345 output to be the same with the console output.

I can reproduce it.

Here is my ubic config: https://gist.github.com/bessarabov/1a36f4308524e666302a

And here is the service.pl:
https://gist.github.com/bessarabov/8d6becadadc7025d4988

I'm using ubic 1.52-2 on ubuntu precise, installed from ubic's ppa.

Vyacheslav Matyukhin

unread,
May 24, 2014, 3:42:50 PM5/24/14
to ubic...@googlegroups.com
Yes, ubic.ping reports cached status, the one you can obtain by running 'ubic cached-status my.service'.
This status is updated every minute by ubic.watchdog.
 
I don't think we can change that without risking breaking something. Some monitoring services, for example in Yandex, depend on /status/... urls being fast, and for the broken service, real status check can take a long time.
Also, ubic.ping implementation is currently single-threaded.
 
I'd accept the patch for ubic.ping which would add /real-status/service/... handle, if it'd include the solution for single-thread problem. But I'd also like to avoid extra dependencies (on AnyEvent, Dancer, or any other large library or framework), so it's not easy.
 
Alternatively, you could abandon ubic.ping entirely and write your own status-reporting http service, or become the maintainer for unfinished https://github.com/berekuk/ubic-web. I'd like to remove ubic.ping from the core Ubic distribution eventually, anyway.
 
24.05.2014, 21:44, "Иван Бессарабов" <iv...@bessarabov.ru>:

--
You received this message because you are subscribed to the Google Groups "Ubic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ubic-perl+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages