mocdaniel / dashing-icinga2

Dashing dashboard for Icinga 2 using the REST API
MIT License
204 stars 47 forks source link

Can't get dashing-icinga2 to work #130

Open maniackatzentier opened 1 year ago

maniackatzentier commented 1 year ago

I just cloned dashing icinga2 from your repo and followed the instruction process, but when I start the systemctl service dashing-icinga2, I get the following error messages:

start dashing-icinga2.service
Job for dashing-icinga2.service failed because the control process exited with error code.
See "systemctl status dashing-icinga2.service" and "journalctl -xe" for details.
#># temp1:/lib/systemd/system/
root# journalctl -xe
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/share/dashing-icinga2/jobs/icinga2.rb:23:in `<top (required)>'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/smashing-1.3.6/lib/dashing/app.rb:177:in `block in require_glob'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/smashing-1.3.6/lib/dashing/app.rb:176:in `each'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/smashing-1.3.6/lib/dashing/app.rb:176:in `require_glob'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/smashing-1.3.6/lib/dashing/app.rb:187:in `<top (required)>'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/smashing-1.3.6/lib/dashing.rb:3:in `<top (required)>'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in `require'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:149:in `require'
Jun 16 14:25:45 temp1 puma[3101]:         from config.ru:1:in `block in <main>'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `eval'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `new_from_string'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:105:in `load_file'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:66:in `parse_file'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/configuration.rb:366:in `load_rackup'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/configuration.rb:288:in `app'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/runner.rb:158:in `load_and_bind'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/single.rb:44:in `run'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/launcher.rb:194:in `run'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/cli.rb:75:in `run'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/bin/puma:10:in `<top (required)>'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/local/bin/puma:23:in `load'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/local/bin/puma:23:in `<main>'
Jun 16 14:25:45 temp1 puma[3101]: /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- dashing (LoadError)
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
Jun 16 14:25:45 temp1 puma[3101]:         from config.ru:1:in `block in <main>'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `eval'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `new_from_string'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:105:in `load_file'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:66:in `parse_file'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/configuration.rb:366:in `load_rackup'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/configuration.rb:288:in `app'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/runner.rb:158:in `load_and_bind'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/single.rb:44:in `run'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/launcher.rb:194:in `run'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/lib/puma/cli.rb:75:in `run'
Jun 16 14:25:45 temp1 puma[3101]:         from /var/lib/gems/2.7.0/gems/puma-6.3.0/bin/puma:10:in `<top (required)>'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/local/bin/puma:23:in `load'
Jun 16 14:25:45 temp1 puma[3101]:         from /usr/local/bin/puma:23:in `<main>'
Jun 16 14:25:45 temp1 systemd[1]: dashing-icinga2.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ An ExecStart= process belonging to unit dashing-icinga2.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Jun 16 14:25:45 temp1 systemd[1]: dashing-icinga2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit dashing-icinga2.service has entered the 'failed' state with result 'exit-code'.
Jun 16 14:25:45 temp1 systemd[1]: Failed to start Dashing-Icinga2 host/service/network monitoring system.
░░ Subject: A start job for unit dashing-icinga2.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit dashing-icinga2.service has finished with a failure.
░░ 
░░ The job identifier is 382 and the job result is failed.
lines 1886-1950/1950 (END)

Apparently there are still hints to a file called "dashing" which does not exist. I thought smashing is used now instead?

maniackatzentier commented 1 year ago

The config.ru refers to dashing instead of smashing. I changed that, but still get errors. And I wonder why still thin is refered, instead of puma.

Traceback (most recent call last):
    14: from /usr/local/bin/thin:23:in `<main>'
    13: from /usr/local/bin/thin:23:in `load'
    12: from /var/lib/gems/2.7.0/gems/thin-1.8.2/bin/thin:6:in `<top (required)>'
    11: from /var/lib/gems/2.7.0/gems/thin-1.8.2/lib/thin/runner.rb:159:in `run!'
    10: from /var/lib/gems/2.7.0/gems/thin-1.8.2/lib/thin/runner.rb:203:in `run_command'
     9: from /var/lib/gems/2.7.0/gems/thin-1.8.2/lib/thin/controllers/controller.rb:72:in `start'
     8: from /var/lib/gems/2.7.0/gems/thin-1.8.2/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
     7: from /var/lib/gems/2.7.0/gems/thin-1.8.2/lib/rack/adapter/loader.rb:33:in `load'
     6: from /var/lib/gems/2.7.0/gems/thin-1.8.2/lib/rack/adapter/loader.rb:33:in `eval'
     5: from config.ru:1:in `<main>'
     4: from config.ru:1:in `new'
     3: from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:125:in `initialize'
     2: from /var/lib/gems/2.7.0/gems/rack-2.2.7/lib/rack/builder.rb:125:in `instance_eval'
     1: from config.ru:1:in `block in <main>'
config.ru:1:in `require': cannot load such file -- smashing (LoadError)
mocdaniel commented 1 year ago

There's an issue template that gets created for you upon opening an issue, meaning that you deliberately deleted all of it without giving any additional information that would help me reproduce your problem.

Furthermore, the installation setup worked out of the box on a reasonably recent Debian11 with v3.3.0 checked out instead of master. I can only guess whether this matches your setup or not, so feel free to provide additional information for me to recreate this properly.

maniackatzentier commented 1 year ago

Sorry for that. Did not happen on purpose. It worked now with v.3.3.0. Thank you!

mocdaniel commented 1 year ago

That's good to hear, thanks for your feedback. I will update the README.md to emphasise that you actually need to use a release, not master.

github6043 commented 8 months ago

Hi, I have the same issue with a new Icinga2 installation on Ubuntu 22. The old dashing-icinga2 on Ubuntu 18 was working fine.

./restart-dashing: line 90: dashing: command not found Restart failed. Bailing out.

Installation is done as documented

Any Help is appreciated