sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.
http://www.thruk.org
Other
408 stars 148 forks source link

Trends & Reporting: internal server error #713

Closed jsteel44 closed 7 years ago

jsteel44 commented 7 years ago

I created a new Arch Linux VM to run thruk 2.14 and naemon 1.0.6 and everything looks OK apart from Trends and Reporting which both give me "internal server error". I've noted the errors from thruk.log:

Trends:

[ERROR][Thruk] Error in: /thruk/cgi-bin/trends.cgi
[ERROR][Thruk] Attempt to reload Thruk/Utils/Trends.pm aborted.
Compilation failed in require at /usr/share/thruk/lib/Thruk/Controller/trends.pm line 33.
 at /usr/share/perl5/vendor_perl/Plack/Util.pm line 145.
    eval {...} called at /usr/share/perl5/vendor_perl/Plack/Util.pm line 145
    Plack::Util::run_app(CODE(0x15aa6d0), HASH(0x4c33b00)) called at /usr/share/perl5/vendor_perl/Plack/Handler/FCGI.pm line 143
    Plack::Handler::FCGI::run(Plack::Handler::FCGI=HASH(0x9590f8), CODE(0x15aa6d0)) called at /usr/share/thruk/script/thruk_fastcgi.pl line 24
[ERROR][Thruk] internal server error
[ERROR][Thruk] on page: https://naemon/thruk/cgi-bin/trends.cgi

Reporting:

[ERROR][Thruk] Error in: /thruk/cgi-bin/reports2.cgi
[ERROR][Thruk] Attempt to reload Thruk/Utils/Reports.pm aborted.
Compilation failed in require at /usr/share/perl5/core_perl/Module/Load.pm line 77.
Can't locate Thruk/Utils/Reports in @INC (@INC contains: /etc/thruk/plugins//plugins-enabled/statusmap/lib /etc/thruk/plugins//plugins-enabled/shinken_features/lib /etc/thruk/plugins//plugins-enabled/reports2/lib /etc/thruk/plugins//plugins-enabled/panorama/lib /etc/thruk/plugins//plugins-enabled/mobile/lib /etc/thruk/plugins//plugins-enabled/minemap/lib /etc/thruk/plugins//plugins-enabled/conf/lib /etc/thruk/plugins//plugins-enabled/business_process/lib /usr/share/thruk/lib /usr/lib/thruk/perl5 /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /usr/share/perl5/core_perl/Module/Load.pm line 77.
 at /usr/share/perl5/vendor_perl/Plack/Util.pm line 145.
    eval {...} called at /usr/share/perl5/vendor_perl/Plack/Util.pm line 145
    Plack::Util::run_app(CODE(0x15aa6d0), HASH(0x45f1310)) called at /usr/share/perl5/vendor_perl/Plack/Handler/FCGI.pm line 143
    Plack::Handler::FCGI::run(Plack::Handler::FCGI=HASH(0x9590f8), CODE(0x15aa6d0)) called at /usr/share/thruk/script/thruk_fastcgi.pl line 24
[ERROR][Thruk] internal server error
[ERROR][Thruk] on page: https://naemon/thruk/cgi-bin/reports2.cgi
jsteel44 commented 7 years ago

That's odd; Trends works today. I haven't changed anything. I'll keep an eye on it. But Reporting gives me the same error still. Not sure why it cannot find Thruk/Utils/Reports; it is in /etc/thruk/plugins/plugins-enabled/reports2/lib/

sni commented 7 years ago

Thats strange, can you run reports / trends manually from the command line. Maybe this adds some useful output: thruk -a 'report=1' --local -vv

jsteel44 commented 7 years ago

Looks like that doesn't work either: https://bpaste.net/raw/754d1ff33aa2 Does that shed any light on this issue? Thanks

sni commented 7 years ago

a little bit maybe... I assume the reporting plugin is enabled? If so, this could mean that the lazy module loading fails because of a missing dependency of the reporting plugin like ex. GD.

Does PERL5LIB=/usr/share/thruk/lib:/usr/lib64/thruk/perl5:/etc/thruk/plugins/plugins-enabled/reports2/lib perl -MThruk::Utils::Reports -eexit work? You also test: PERL5LIB=/usr/share/thruk/lib:/usr/lib64/thruk/perl5:/etc/thruk/plugins/plugins-enabled/reports2/lib perl -MThruk::Utils::Trends -eexit

jsteel44 commented 7 years ago

Thanks, that highlighted that I was missing MIME/Lite.pm. Installed perl-mime-lite and that fixed it, thanks!

sni commented 7 years ago

Great, i will try to make such errors more visible.