Closed pauby closed 5 years ago
CentOS no longer having an update ruby vesion in the general repositories.
Not sure why you would need to update the Ruby version. The Vagrant boxes use CentOS 7 as base, and Dashing runs inside like a charm. Without any SCL packages.
scheduler caught exception: 401 Unauthorized
The error is that the provided API credentials are wrong, you can modify such in the configuration file for dashing-icinga2.
/usr/bin/env: ruby: No such file or directory
Maybe Systemd needs more specific environment variables being set, when you change from native ruby to SCL.
Not sure why you would need to update the Ruby version. The Vagrant boxes use CentOS 7 as base, and Dashing runs inside like a charm. Without any SCL packages.
The verion of Ruby that was installed out of the box is 2.0.0. When I went to run the bundle step:
cd /usr/share/dashing-icinga2
bundle
I got an error that bundle
required a minimum of Ruby 2.3.0. That's why I went to update, found out 2.0.0 was way out of date and searched for how to update it and came across SCL.
The error is that the provided API credentials are wrong, you can modify such in the configuration file for dashing-icinga2.
Hmmm. The credentials I made sure matched. I'll take a look.
Maybe Systemd needs more specific environment variables being set, when you change from native ruby to SCL.
That's where my knowledge will therefore stop, sadly 😢 SCL, from my limited understanding, is supposed to be a replacement for the native Ruby so all the environment variables and config should be updated by it.
The Vagrant boxes have EPEL enabled by default and then install bundler via packages. This is abstracted in this Puppet profile: https://github.com/Icinga/icinga-vagrant/blob/master/.puppet/modules/profiles/manifests/dashing/icinga2.pp
When you're going the gem install bundler
route, I could imagine that bundler doesn't like the old Ruby version. Still, with the packaged variant, without updating bundler when asking from its run, it should work. Otherwise the Vagrant runs would fail.
Installing Dashing on CentOS 7 (I'm using CentOS 7.6.1810) is a bit of a chore thanks to CentOS no longer having an update ruby vesion in the general repositories. So I had to install Ruby this way - I installed
rh-ruby25-ruby-devel
but the process is the same.I followed all of the instructions and made sure the
bundle
installed all of the gems. I amended the paths for thedashing-icinga2.service
from/usr/local/bin/dashing
to/opt/rh/rh-ruby25/root/usr/bin/dashing
. Running/opt/rh/rh-ruby25/root/usr/bin/dashing -p 8005
gives me an error every 5 seconds or so (but I think this may be a red herring as it appears to keep running):After copying the
dashing-icinga2.service
to the correct systemd folder and runningsudo systemctl start dashing-icinga2
it immediately returns an error message and if I look atjournalctl -xe
I see:If I run
/usr/bin/env ruby
it just sits there until I press Ctrl + C. If I runwhich ruby
I get/opt/rh/rh-ruby25/root/usr/bin/ruby
.Unfortunately the instructions don't take into account how things have changed with CentOS. Which is fine. If you're not using it you'll not know until somebody reports it. However I'm a bit lost now on where to do.
Any help appreciated.