1
0
-1

Hello!

 

I just performed an install with your script on a fresh Debian Etch install on bare metal.

 

The script (nmis8.6.1G.run) didn't seem to have any errors at all (a few perl modules downloaded)

 

But upon launching nmis from the browser I get "500 Internal Server Error".

 

In the following log I can see the same error repeat on every refresh of the page:

 

/var/log/apache2/error.log
Can't locate Statistics/Lite.pm in @INC (you may need to install the Statistics::Lite module) (@INC contains: /usr/local/nmis8/cgi-bin/../lib ../../lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/nmis8/cgi-bin/../lib/rrdfunc.pm line 42.
BEGIN failed--compilation aborted at /usr/local/nmis8/cgi-bin/../lib/rrdfunc.pm line 42.
Compilation failed in require at /usr/local/nmis8/cgi-bin/../lib/Sys.pm line 36.
BEGIN failed--compilation aborted at /usr/local/nmis8/cgi-bin/../lib/Sys.pm line 36.
Compilation failed in require at /usr/local/nmis8/cgi-bin/../lib/NMIS.pm line 45.
BEGIN failed--compilation aborted at /usr/local/nmis8/cgi-bin/../lib/NMIS.pm line 45.
Compilation failed in require at /usr/local/nmis8/cgi-bin/nmiscgi.pl line 39.
BEGIN failed--compilation aborted at /usr/local/nmis8/cgi-bin/nmiscgi.pl line 39.
[Thu Jun 22 09:04:01.351030 2017] [cgid:error] [pid 727:tid 140214282471168] [client 172.16.1.250:42130] End of script output before headers: nmiscgi.pl, referer: http://172.16.0.58/nmis8/

 

So I tried:

 

 # cpan install Statistics::Lite
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/root/.cpan/Metadata'
  Database was generated on Wed, 21 Jun 2017 22:17:02 GMT
Statistics::Lite is up to date (3.62).

 

Any suggestions welcome please!

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      I found the problem!

       

      It's my fault (sad)

       

      I use a lot of aliases and I also use a script to SSH to various machines that sends a copy of my .bashrc file to the host machine for easy access to the same functions and aliases while "away from home".

       

      This .bashrc had the perl ENV install location set for another machine (mine) and caused the modules to be downloaded to the wrong place.

       

      Using the OS' intended bashrc and reinstalling meant the modules were sent to the right place and I no longer have the 500 error.

       

      I doubt this will be helpful for anyone since my case is a little unique but in case it is, here you go.

       

      Thanks again Keith, sorry for the mixup.

      1. Keith Sinclair

        Harry, No problem, you found the issue and solved it. A great result. Keith

      CommentAdd your comment...
    2.  
      2
      1
      0

      Hi Harry,

      There are a couple of things this could be.  Do you run two installations of Perl?  You need to make sure the one you are using from the command line is the same as the one the CGI-BIN scripts are using.  

      If things are running from the command line well, but the GUI is not loading, check the permissions on the Perl libraries.  You can run this command to see where it is installed and it will show the permissions.

      [keiths@ran ~]$ find /usr -name Lite.pm -exec ls -l {} \; | grep Statistics
      -r-xr-xr-x. 1 root root 6039 Jun 25  2007 /usr/local/share/perl5/Statistics/Lite.pm
      -r-xr-xr-x 1 keiths nmis 6039 May 19  2014 /usr/local/activeperl/site/lib/Statistics/Lite.pm
      -r-xr-xr-x 1 root root 6039 Jun 25  2007 /usr/local/perl-5.12/site/lib/Statistics/Lite.pm

      You can see I have three Perl instances running on my machine.

      See how you go and let me know.

       

      Regards

       

      Keith

      1. Harry Milanes

        Thanks Keith, They aren't in the location you mentioned: root@NMIS:~# find /usr -name Lite.pm -exec ls -l {} \; | grep Statistics root@NMIS:~# find /usr -name Lite.pm -exec ls -l {} \; -rw-r--r-x 1 root root 3859 May 17 2013 /usr/share/perl5/Apache/XMLRPC/Lite.pm -rw-r--r-x 1 root root 186671 Jul 10 2016 /usr/share/perl5/SOAP/Lite.pm -rw-r--r-x 1 root root 11937 May 17 2013 /usr/share/perl5/XMLRPC/Lite.pm -rw-r--r-x 1 root root 7718 Jan 10 03:47 /usr/share/perl5/Mojolicious/Lite.pm Perhaps nmis doesn't know where to look for it? I also did this just in case: find /usr/share/perl5 -type f -exec chmod o=rx {} \; But I don't really know why it still doesn't work.

      2. Harry Milanes

        Perhaps I should?: find /usr/share/perl5 -type f -exec chmod ugo=+rx {} \;

      CommentAdd your comment...