Non Administrative user SQL Errors

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pbarnett865
Posts: 10
Joined: Tue Aug 30, 2016 8:46 am

Non Administrative user SQL Errors

Post by pbarnett865 »

CentOS
7.7.1908
64 bit
VMWare Image install
Nagios XI 5.6.8


New users created via the web interface and seeing the following error message rather than the appropriate service information.
"SQL Error [ndoutils] : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ORDER BY obj1.name1 DESC LIMIT 100000' at line 9


Sorry for the duplicate submission, I left the system info off the original post and was unable to edit it.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Non Administrative user SQL Errors

Post by benjaminsmith »

Hello @pbarnett865,

Looks like you are new to the support forum, so I would just like to say thanks for joining!

I just want to confirm that you did install from our VMware image as it should have installed the correct version of MariaDB. A few more questions:

1. Did you import these users from Active Directory?

2. Are there any other packages installed on the server that may be causing conflicts?

3. Can you PM your system profile?

To send us your system profile.
Login to the Nagios XI GUI using a web browser
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
pbarnett865
Posts: 10
Joined: Tue Aug 30, 2016 8:46 am

Re: Non Administrative user SQL Errors

Post by pbarnett865 »

Long time lurker so to say.

Yes, I installed NagiosXI via the image provided.
VM Tools would be the only thing I can think of that may have been installed.
The users were imported via LDAP query to our AD domain.
I sent the system profile via pm.

Thanks for your help.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Non Administrative user SQL Errors

Post by benjaminsmith »

Hello @pbarnett865,

Thanks for answering those questions. I just sent you a PM regarding the system profile.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
pbarnett865
Posts: 10
Joined: Tue Aug 30, 2016 8:46 am

Re: Non Administrative user SQL Errors

Post by pbarnett865 »

I resubmitted the profile.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Non Administrative user SQL Errors

Post by benjaminsmith »

Hello,

Thank you for sending over the System Profile. I'm seeing authentication errors in the Apache log like this:
ser glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
Please run through the following steps:

1. Go to Admin > Administrative Task ( on the main page) > Reset Security Credentials

2. Next, go to Users > Manage Users and from the Actions menu Masquerade as one of the Non-Administrative users. Does the error message still persists?

If so, run, the following tail command and then load the services page (producing the error) and post the full output to the thread.

Code: Select all

tail -f /var/log/httpd/*error_log
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
pbarnett865
Posts: 10
Joined: Tue Aug 30, 2016 8:46 am

Re: Non Administrative user SQL Errors

Post by pbarnett865 »

I'm no longer seeing that specific error, but it takes forever for the page to load, and I'm seeing these errors in the log you requested.
The services assigned to this user randomly appear and disappear. The user name is ptest1.




==> /var/log/httpd/error_log <==
[Wed Dec 11 14:10:20.289068 2019] [cgi:error] [pid 2872] [client 168.85.235.181:64801] End of script output before headers: status.cgi
[Wed Dec 11 14:12:22.612189 2019] [cgi:error] [pid 95494] [client 168.85.235.181:64814] End of script output before headers: status.cgi
[Wed Dec 11 14:33:20.376564 2019] [cgi:error] [pid 65383] [client 168.85.224.89:62573] End of script output before headers: status.cgi
[Wed Dec 11 14:42:21.079801 2019] [cgi:error] [pid 113927] [client 168.85.224.89:62760] End of script output before headers: cmd.cgi
[Wed Dec 11 14:45:20.447507 2019] [cgi:error] [pid 27020] [client 168.85.224.89:62830] End of script output before headers: status.cgi
[Wed Dec 11 14:46:21.171904 2019] [cgi:error] [pid 95494] [client 168.85.224.89:62877] End of script output before headers: status.cgi
[Wed Dec 11 14:48:57.198136 2019] [:error] [pid 113927] [client 168.85.224.89:62948] PHP Notice: Undefined variable: home_id in /usr/local/nagiosxi/html/includes/utils-dashboards.inc.php on line 0, referer: http://cov-nagios01/nagiosxi/admin/users.php
[Wed Dec 11 14:48:57.198224 2019] [:error] [pid 113927] [client 168.85.224.89:62948] PHP Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /usr/local/nagiosxi/html/includes/utils-dashboards.inc.php on line 0, referer: http://cov-nagios01/nagiosxi/admin/users.php
[Wed Dec 11 14:48:57.198256 2019] [:error] [pid 113927] [client 168.85.224.89:62948] PHP Notice: Undefined variable: home in /usr/local/nagiosxi/html/includes/utils-dashboards.inc.php on line 0, referer: http://cov-nagios01/nagiosxi/admin/users.php
[Wed Dec 11 14:58:18.988585 2019] [cgi:error] [pid 99230] [client 168.85.235.181:64515] End of script output before headers: status.cgi

==> /var/log/httpd/ssl_error_log <==
[Wed Dec 11 15:04:30.488116 2019] [auth_basic:error] [pid 45144] [client 172.16.33.163:54316] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:04:30.519832 2019] [auth_basic:error] [pid 45104] [client 172.16.33.163:54317] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:05:30.607998 2019] [auth_basic:error] [pid 67923] [client 172.16.33.163:54336] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:05:30.639214 2019] [auth_basic:error] [pid 36928] [client 172.16.33.163:54337] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:06:30.728252 2019] [auth_basic:error] [pid 65383] [client 172.16.33.163:54350] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:06:30.759513 2019] [auth_basic:error] [pid 62616] [client 172.16.33.163:54351] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:07:30.833565 2019] [auth_basic:error] [pid 67923] [client 172.16.33.163:54363] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:07:30.864489 2019] [auth_basic:error] [pid 36179] [client 172.16.33.163:54364] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:08:31.603567 2019] [auth_basic:error] [pid 65383] [client 172.16.33.163:54382] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
[Wed Dec 11 15:08:31.633520 2019] [auth_basic:error] [pid 62616] [client 172.16.33.163:54383] AH01617: user glouvier: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Non Administrative user SQL Errors

Post by benjaminsmith »

Hello,

Thanks for your patience, I'm not sure why it would randomly appear and disappear as it looks to be a permissions issue based on the log output.

A couple more items to verify, post the output to the following.

1. Do you have SELinux enabled on this server?

Code: Select all

getenforce
2. Let's verify the correct permissions on the cgi scripts.

Code: Select all

ls -lh /usr/local/nagios/sbin
3. Make sure the Nagios user account is not expired.

Code: Select all

chage -l nagios
4. Check the /etc/group file.

Code: Select all

cat /etc/group|grep nagios
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
pbarnett865
Posts: 10
Joined: Tue Aug 30, 2016 8:46 am

Re: Non Administrative user SQL Errors

Post by pbarnett865 »

Thank you for the help.
I've also noticed the monitoring engine process doesn't seem to run according to the web interface.


[root@cov-nagios01 ~]# getenforce
Disabled
[root@cov-nagios01 ~]# ls -lh /usr/local/nagios/sbin
total 5.8M
-rwxrwxr-x 1 nagios nagios 314K Jan 28 2019 archivejson.cgi
-rwxrwxr-x 1 nagios nagios 303K Jan 28 2019 avail.cgi
-rwxrwxr-x 1 nagios nagios 295K Jan 28 2019 cmd.cgi
-rwxrwxr-x 1 nagios nagios 267K Jan 28 2019 config.cgi
-rwxrwxr-x 1 nagios nagios 307K Jan 28 2019 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 263K Jan 28 2019 histogram.cgi
-rwxrwxr-x 1 nagios nagios 243K Jan 28 2019 history.cgi
-rwxrwxr-x 1 nagios nagios 239K Jan 28 2019 notifications.cgi
-rwxrwxr-x 1 nagios nagios 315K Jan 28 2019 objectjson.cgi
-rwxrwxr-x 1 nagios nagios 235K Jan 28 2019 outages.cgi
-rwxrwxr-x 1 nagios nagios 231K Jan 28 2019 outages-xml.cgi
-rwxrwxr-x 1 nagios nagios 235K Jan 28 2019 showlog.cgi
-rwxrwxr-x 1 nagios nagios 307K Jan 28 2019 status.cgi
-rwxrwxr-x 1 nagios nagios 235K Jan 28 2019 status-json.cgi
-rwxrwxr-x 1 nagios nagios 314K Jan 28 2019 statusjson.cgi
-rwxrwxr-x 1 nagios nagios 260K Jan 28 2019 statusmap.cgi
-rwxrwxr-x 1 nagios nagios 251K Jan 28 2019 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 239K Jan 28 2019 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 259K Jan 28 2019 summary.cgi
-rwxrwxr-x 1 nagios nagios 251K Jan 28 2019 tac.cgi
-rwxrwxr-x 1 nagios nagios 235K Jan 28 2019 tac-xml.cgi
-rwxrwxr-x 1 nagios nagios 267K Jan 28 2019 trends.cgi
[root@cov-nagios01 ~]# chage -l nagios
Last password change : Oct 06, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
[root@cov-nagios01 ~]# cat /etc/group|grep nagios
nagios:x:1000:nagios,apache,snmptt
nagcmd:x:1001:nagios,apache,snmptt
[root@cov-nagios01 ~]#
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Non Administrative user SQL Errors

Post by benjaminsmith »

Hello,

Thanks for posting the permissions settings, that looks normal. My understanding is that the server is working better but now you're noticing a lag in processing? Is this correct? If so, let's up the message queue and PHP settings on this system.

1. Perform a full restart, clear the messages queues and repair the databases.

Code: Select all

systemctl stop crond
systemctl stop npcd
systemctl stop nagios
systemctl stop ndo2db
pkill -9 -u nagios
for i in $(ipcs -q | grep nagios |awk '{print $2}'); do ipcrm -q $i; done
rm -rf /usr/local/nagiosxi/var/dbmaint.lock
rm -rf /usr/local/nagiosxi/var/event_handler.lock
rm -rf /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
systemctl restart mysqld || systemctl restart mariadb
cd /usr/local/nagiosxi/scripts
./repair_databases.sh
systemctl start npcd
systemctl start crond
systemctl start nagios
systemctl start ndo2db
2. Next, follow the article below to Increase the settings.
NDOUtils - Message Queue Exceeded

3. Increase the default resources available for PHP
Nagios XI - Optimizing The PHP Settings File

Let it run for a while and let me know if the issue persists or not.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked