An error occurred processig your request

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

An error occurred processig your request

Post by ksafa »

Just installed 5.2.9 on cleann RHEL6 system. When attempting to restart Monitoring Engine with Action button I get "An error occurred processing your request". I am able to stop/start from command line. Sounds like probably some permissions issue but not sure what.

Thanks
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: An error occurred processig your request

Post by dwhitfield »

Please compare your output of ls -l /usr/local/nagios/etc/ to mine.

Code: Select all

ls -l /usr/local/nagios/etc/
total 188
-rwxrwxr-x  1 apache nagios   744 Sep 21 13:43 cgi.cfg
-rw-rw-r--  1 apache nagios 25770 Dec 21 10:12 commands.cfg
-rw-rw-r--  1 apache nagios  1106 Dec 21 10:12 contactgroups.cfg
-rw-rw-r--  1 apache nagios  1367 Dec 21 10:12 contacts.cfg
-rw-rw-r--  1 apache nagios  1675 Dec 21 10:12 contacttemplates.cfg
-rw-rw-r--  1 apache nagios   817 Dec 21 10:12 hostdependencies.cfg
-rw-rw-r--  1 apache nagios   819 Dec 21 10:12 hostescalations.cfg
-rw-rw-r--  1 apache nagios   837 Dec 21 10:12 hostextinfo.cfg
-rw-rw-r--  1 apache nagios   967 Dec 21 10:12 hostgroups.cfg
drwsrwsr-x. 2 apache nagios  4096 Oct 17 13:35 hosts
-rw-rw-r--  1 apache nagios 16082 Dec 21 10:12 hosttemplates.cfg
drwsrwsr-x. 2 apache nagios  4096 Dec 21 10:12 import
-rwxrwxr-x  1 apache nagios  5670 Dec 21 10:12 nagios.cfg
-rw-rw-r--  1 apache nagios  2229 Sep 21 13:43 ndo2db.cfg
-rw-rw-r--  1 apache nagios  4827 Sep 21 13:43 ndomod.cfg
-rw-rw-r--  1 apache nagios  7988 Sep 21 13:43 nrpe.cfg
-rw-rw-r--  1 apache nagios  5345 Sep 21 13:43 nsca.cfg
drwxrwsr-x. 4 apache nagios  4096 Sep 21 13:43 pnp
-rw-rw-r--  1 apache nagios     0 Sep 27 15:50 recurringdowntime.cfg
-rwxrwxr-x  1 apache nagios   210 Sep 21 13:43 resource.cfg
-rw-rw-r--  1 apache nagios  1627 Sep 21 13:43 send_nsca.cfg
-rw-rw-r--  1 apache nagios   823 Dec 21 10:12 servicedependencies.cfg
-rw-rw-r--  1 apache nagios   825 Dec 21 10:12 serviceescalations.cfg
-rw-rw-r--  1 apache nagios   843 Dec 21 10:12 serviceextinfo.cfg
-rw-rw-r--  1 apache nagios   813 Dec 21 10:12 servicegroups.cfg
drwsrwsr-x. 2 apache nagios  4096 Sep 21 13:46 services
-rw-rw-r--  1 apache nagios 24858 Dec 21 10:12 servicetemplates.cfg
drwsrwsr-x. 2 apache nagios  4096 Sep 21 13:43 static
-rw-rw-r--  1 apache nagios  3541 Dec 21 10:12 timeperiods.cfg
Can I also ask why you are installing 5.2.9 instead of 5.3.3 (if online) or 5.4.0 (if not online). I understand you might have reasons, but especially if you are not running offline, I highly advise install 5.4.0. The offline for 5.4.0 should be out within the next couple of weeks.
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: An error occurred processig your request

Post by ksafa »

At the time of our initial decision to upgrade, 5.4.0 was not out yet and there were issues with 5.3.0 so it was recommended to us to install 5.2.9 offline install. We will upgrade to 5.4.0 as soon as we can get up and running on 5.2.9. Below is output of ls -l /usr/local/nagios/etc/:

-rw-r--r-- 1 apache nagios 2225 Jan 10 16:00 cgi.cfg
-rw-rw-r-- 1 apache nagios 28360 Jan 10 18:41 commands.cfg
-rw-rw-r-- 1 apache nagios 1106 Jan 10 15:51 contactgroups.cfg
-rw-rw-r-- 1 apache nagios 12904 Jan 10 15:51 contacts.cfg
-rw-rw-r-- 1 apache nagios 1675 Jan 10 15:51 contacttemplates.cfg
-rw-rw-r-- 1 apache nagios 817 Jan 10 15:51 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios 819 Jan 10 15:51 hostescalations.cfg
-rw-rw-r-- 1 apache nagios 837 Jan 10 15:51 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios 967 Jan 10 15:51 hostgroups.cfg
drwxrwxr-x 2 apache nagios 4096 Dec 12 18:19 hosts
-rw-rw-r-- 1 apache nagios 16082 Jan 10 15:51 hosttemplates.cfg
drwxrwxr-x 2 apache nagios 4096 Jan 10 15:51 import
-rw-rw-r-- 1 apache nagios 5670 Jun 22 2016 nagios.cfg
-rw-rw-r-- 1 apache nagios 2229 Dec 12 18:17 ndo2db.cfg
-rw-rw-r-- 1 apache nagios 4827 Dec 12 18:17 ndomod.cfg
-rw-rw-r-- 1 apache nagios 7988 Jun 22 2016 nrpe.cfg
-rw-rw-r-- 1 apache nagios 5345 Jun 22 2016 nsca.cfg
drwxrwxr-x 4 apache nagios 4096 Dec 12 18:17 pnp
-rw-rw-r-- 1 apache nagios 210 Jun 22 2016 resource.cfg
-rw-rw-r-- 1 apache nagios 1627 Jun 22 2016 send_nsca.cfg
-rw-rw-r-- 1 apache nagios 823 Jan 10 15:51 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios 825 Jan 10 15:51 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios 843 Jan 10 15:51 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios 813 Jan 10 15:51 servicegroups.cfg
drwxrwxr-x 2 apache nagios 4096 Dec 12 18:19 services
-rw-rw-r-- 1 apache nagios 24858 Jan 10 15:51 servicetemplates.cfg
drwxrwxr-x 2 apache nagios 4096 Dec 12 18:18 static
-rw-rw-r-- 1 apache nagios 16107 Jan 10 15:51 timeperiods.cfg
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: An error occurred processig your request

Post by mcapra »

Attempt to submit another restart of the Monitoring Engine from the GUI. Afterwards, can you share the output of the following commands executed from the CLI of your Nagios XI machine:

Code: Select all

cat /usr/local/nagiosxi/html/config.inc.php | grep db
ps aux | grep php
echo "INSERT INTO xi_commands (submitter_id, command, command_data, result) VALUES (1, 13, 'a:1:{i:0;s:0:\"\";}', 'testing 411815');" | mysql -uroot -pnagiosxi nagiosxi
# wait around 30 seconds
echo "SELECT * FROM xi_commands ORDER BY submission_time DESC LIMIT 10;" | mysql -uroot -pnagiosxi nagiosxi
Be sure to sanitize your outputs for any sensitive information.
Former Nagios employee
https://www.mcapra.com/
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: An error occurred processig your request

Post by bwallace »

In addition to mcapra's suggestions, I notice that your cgi.cfg does not write permission for group:

Yours: -rw-r--r-- 1 apache nagios 2225 Jan 10 16:00 cgi.cfg

Mine: -rw-rw-r-- 1 apache nagios 866 Nov 17 14:03 cgi.cfg

dwhitfield: rwxrwxr-x 1 apache nagios 744 Sep 21 13:43 cgi.cfg
Be sure to check out the Knowledgebase for helpful articles and solutions!
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: An error occurred processig your request

Post by ksafa »

Results below. I also updated permissions on cgi.cfg but still ran into error.

Code: Select all

#cat /usr/local/nagiosxi/html/config.inc.php | grep db
// default server, db, connection settings
$cfg['dbtype'] = ''; // this setting is no longer used - use settings below
$cfg['dbserver'] = 'XXXXXX'; // this setting is no longer used - use settings below
// db-specific connection information
$cfg['db_info'] = array(
        "dbtype" => 'mysql',
        "dbserver" => '',
        "db" => 'nagiosxi',
        "dbmaint" => array( // variables affecting maintenance of db
            "optimize_interval" => 60, // time (in minutes) between db optimization runs
            "repair_interval" => 0, // time (in minutes) between db repair runs
        "dbtype" => 'mysql',
        "dbserver" => 'XXXXXX',
        "db" => 'nagios',
        "dbmaint" => array( // variables affecting maintenance of ndoutils db
            "optimize_interval" => 60, // time (in minutes) between db optimization runs
            "repair_interval" => 0, // time (in minutes) between db repair runs
        "dbtype" => 'mysql',
        "dbserver" => 'XXXXXX',
        "db" => 'nagiosql',
        "dbmaint" => array( // variables affecting maintenance of db
            "optimize_interval" => 60, // time (in minutes) between db optimization runs
            "repair_interval" => 0, // time (in minutes) between db repair runs
// db-specific table prefixes
$cfg['db_prefix'] = array(
$cfg['feedback_url'] = "https://api.nagios.com/feedback/";
//$cfg['db_version']=101;
$cfg['db_version'] = 113;
// include generic db defs
require_once(dirname(__FILE__) . '/includes/db.inc.php');
require_once(dirname(__FILE__) . '/db/common.inc.php');

#ps aux | grep php

nagios   30877  0.0  0.0 106072  1280 ?        Ss   23:06   0:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   30879  0.0  0.0 106072  1280 ?        Ss   23:06   0:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   30881  0.0  0.0 106072  1276 ?        Ss   23:06   0:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   30883  1.0  0.1 319648 22656 ?        S    23:06   0:00 /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php
nagios   30884  0.0  0.0 106072  1280 ?        Ss   23:06   0:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   30885  1.0  0.1 319824 22740 ?        S    23:06   0:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php
nagios   30886  0.0  0.0 106072  1276 ?        Ss   23:06   0:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
nagios   30889  1.4  0.1 328880 31648 ?        S    23:06   0:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
nagios   30890  1.0  0.1 319884 23284 ?        S    23:06   0:00 /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
nagios   30891  0.9  0.1 319772 22664 ?        S    23:06   0:00 /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php

#echo "INSERT INTO xi_commands (submitter_id, command, command_data, result) VALUES (1, 13, 'a:1:{i:0;s:0:\"\";}', 'testing 411815');" | mysql -uroot -pnagiosxi nagiosxi
# wait around 30 seconds
#echo "SELECT * FROM xi_commands ORDER BY submission_time DESC LIMIT 10;" | mysql -uroot -pnagiosxi nagiosxi

command_id      group_id        submitter_id    beneficiary_id  command submission_time event_time      frequency_type  frequency_units frequency_interval      processing_time status_code   result_code     command_data    result
55      0       1       0       13      2017-01-10 23:06:58     0000-00-00 00:00:00     0       0       0       2017-01-10 23:06:58     2       1       a:1:{i:0;s:0:"";}
54      0       1       0       13      2017-01-10 23:04:51     2017-01-10 23:04:50     0       0       0       2017-01-10 23:04:51     2       1       a:1:{i:0;s:0:"";}
53      0       1       0       13      2017-01-10 23:00:45     2017-01-10 23:00:45     0       0       0       2017-01-10 23:00:45     2       1       a:1:{i:0;s:0:"";}
52      0       1       0       13      2017-01-10 20:54:11     2017-01-10 20:54:10     0       0       0       2017-01-10 20:54:11     2       1       a:1:{i:0;s:0:"";}
51      0       1       0       13      2017-01-10 20:45:14     2017-01-10 20:45:13     0       0       0       2017-01-10 20:45:14     2       1       a:1:{i:0;s:0:"";}
50      0       1       0       13      2017-01-10 20:41:51     2017-01-10 20:41:50     0       0       0       2017-01-10 20:41:51     2       1       a:1:{i:0;s:0:"";}
49      0       1       0       13      2017-01-10 20:33:15     2017-01-10 20:33:14     0       0       0       2017-01-10 20:33:15     2       1       a:1:{i:0;s:0:"";}
48      0       1       0       13      2017-01-10 20:01:49     2017-01-10 20:01:49     0       0       0       2017-01-10 20:01:49     2       1       a:1:{i:0;s:0:"";}
47      0       1       0       12      2017-01-10 19:07:28     2017-01-10 19:07:27     0       0       0       2017-01-10 19:07:28     2       1       a:1:{i:0;s:0:"";}
46      0       1       0       12      2017-01-10 18:58:44     2017-01-10 18:58:43     0       0       0       2017-01-10 18:58:44     2       1       a:1:{i:0;s:0:"";}



dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: An error occurred processig your request

Post by dwhitfield »

5.4.0 offline is out: http://repo.nagios.com/

If you want to move forward with 5.2.9...

What's the output of sestatus?

Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info).

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: An error occurred processig your request

Post by ksafa »

Output below:

SELinux status: disabled

I also pm'd you the system profile.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: An error occurred processig your request

Post by dwhitfield »

I see the following from your PM
Gnome Installed
.

It might be easier to start from scratch with that being the case, as we might have to undo several things. However, you can try export PATH=/sbin:$PATH and then try the install again.

Also, you sent me the output of Show Profile rather than Download Profile. If you want to move forward with this, we will likely need the full profile. Again, feel free to PM me the profile.
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: An error occurred processig your request

Post by ksafa »

I get the following error when i try to download profile:

PROFILE BUILD FAILED
Array
(
)

CODE: 1

So going forward only option is to reinstall?
Locked