joonty / systemd_mon

Monitor for systemd to alert failed services
MIT License
106 stars 28 forks source link

Uncaught exception #11

Open breezzz opened 6 years ago

breezzz commented 6 years ago

At start systemd_mon i get this messages in log

systemd[1]: Starting SystemdMon...
systemd_mon[21178]: /usr/local/rvm/gems/ruby-2.4.1/gems/ruby-dbus-0.11.2/lib/dbus/marshall.rb:301: warning: constant ::Fixnum is deprecated
systemd_mon[21178]: /usr/local/rvm/gems/ruby-2.4.1/gems/ruby-dbus-0.11.2/lib/dbus/message.rb:129: warning: constant ::Fixnum is deprecated
systemd_mon[21178]: /usr/local/rvm/gems/ruby-2.4.1/gems/ruby-dbus-0.11.2/lib/dbus/message.rb:129: warning: constant ::Fixnum is deprecated
systemd_mon[21178]: /usr/local/rvm/gems/ruby-2.4.1/gems/ruby-dbus-0.11.2/lib/dbus/marshall.rb:301: warning: constant ::Fixnum is deprecated
systemd_mon[21178]: Uncaught exception (NoMethodError) in callback: undefined method `first' for #<SystemdMon::StateValue:0x000000027da8a0>
systemd_mon[21178]: Uncaught exception (NoMethodError) in callback: undefined method `first' for #<SystemdMon::StateValue:0x00000002d15590>

last two strings - i think for two monitored services

abgoldberg commented 6 years ago

I'm also seeing this. It seems to be due to the services already being up and running when systemd_mon is started, and it also only seems to happen the very first time systemd_mon is run.

It's probably a straightforward issue with just needing to initialize 'first' somewhere, but I'm not that familiar with ruby or I would take a stab at it.