BUG with Bulk Modifications Tool remains in XI 5.4.2
BUG with Bulk Modifications Tool remains in XI 5.4.2
As my colleague reported [1] in XI 5.3.3, the Bulk Modifications Tool still produces an SQL error. This issue was identified as a legitimate BUG [2] and then reported as fixed in XI 5.4.2 [3] release.
1. https://support.nagios.com/forum/viewto ... 16&t=42269
2. NEW TASK ID 10936 created - Nagios XI Bug Report: Bulk Mod Tool uses hardcoded nagiosql and not config.inc.php
3. Fixed issue with Bulk Mod Tool that used a hardcoded table name instead of one in config.inc.php [TPS#10936]
Please advise,
1. https://support.nagios.com/forum/viewto ... 16&t=42269
2. NEW TASK ID 10936 created - Nagios XI Bug Report: Bulk Mod Tool uses hardcoded nagiosql and not config.inc.php
3. Fixed issue with Bulk Mod Tool that used a hardcoded table name instead of one in config.inc.php [TPS#10936]
Please advise,
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
I think I know what happened. The change was made in /usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php
but not in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php
Can you run the following three commands and give me the output:
Those should give 10 lines of output. I doubt I'll need that much, but just so you don't think it'll run forever.
but not in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php
Can you run the following three commands and give me the output:
Code: Select all
php /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php
php /usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php
php /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
Code: Select all
php /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php
php /usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php
php /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
Well, that was unexpected.
Just so I understand the scope of the issue: are you able to get this working using the same work-around as before?
Please create an error and then tail the following logs and provide output:
/usr/local/nagiosxi/var/load_url.log
/var/log/mysqld.log
/var/log/httpd/error_log
/var/log/httpd/access_log
Just so I understand the scope of the issue: are you able to get this working using the same work-around as before?
Please create an error and then tail the following logs and provide output:
/usr/local/nagiosxi/var/load_url.log
/var/log/mysqld.log
/var/log/httpd/error_log
/var/log/httpd/access_log
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
We have not tested our work around as the issue still exists. Have you tested and verified?dwhitfield wrote:Well, that was unexpected.
Just so I understand the scope of the issue: are you able to get this working using the same work-around as before?
Please create an error and then tail the following logs and provide output:
/usr/local/nagiosxi/var/load_url.log
/var/log/mysqld.log
/var/log/httpd/error_log
/var/log/httpd/access_log
Code: Select all
/usr/local/nagiosxi/var/load_url.log
OPTIONS:
Array
(
[return_info] => 1
[method] => post
[timeout] => 15
)
END LOGENTRY
Code: Select all
/var/log/mysqld.log
170202 10:52:02 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170202 10:52:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170202 10:52:03 InnoDB: Initializing buffer pool, size = 8.0M
170202 10:52:03 InnoDB: Completed initialization of buffer pool
170202 10:52:03 InnoDB: Started; log sequence number 0 44253
/usr/libexec/mysqld: File '/var/log/mysql.log' not found (Errcode: 13)
170202 10:52:03 [ERROR] Could not use /var/log/mysql.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
170202 10:52:03 [Note] Event Scheduler: Loaded 0 events
170202 10:52:03 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
Code: Select all
/var/log/httpd/error_log
[Thu Feb 16 11:54:02 2017] [error] [client 10.2.26.251] PHP Notice: Undefined index: background in /usr/local/nagiosxi/html/includes/page-home-main.php on line 56, referer: https://monitor-dev.domain.com/nagiosxi/index.php
[Thu Feb 16 11:54:12 2017] [error] [client 10.2.26.251] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 692, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
[Thu Feb 16 11:54:12 2017] [error] [client 10.2.26.251] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 697, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
[Thu Feb 16 11:54:42 2017] [error] [client 10.2.26.252] 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 301, referer: https://monitor-dev.domain.com/nagiosxi/
[Thu Feb 16 11:54:48 2017] [error] [client 10.2.26.252] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 692, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
[Thu Feb 16 11:54:48 2017] [error] [client 10.2.26.252] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 697, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
[Thu Feb 16 14:26:20 2017] [error] [client 10.2.26.252] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 692, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
[Thu Feb 16 14:26:20 2017] [error] [client 10.2.26.252] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 697, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
[Thu Feb 16 14:27:53 2017] [error] [client 10.2.26.252] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 692, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
[Thu Feb 16 14:27:53 2017] [error] [client 10.2.26.252] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php on line 697, referer: https://monitor-dev.domain.com/nagiosxi/includes/components/bulkmodifications/index.php
Code: Select all
/var/log/httpd/access_log
10.2.26.252 - - [16/Feb/2017:14:32:12 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=914855042743e219f2b023b3d59cdfd3e0a56c15d837f6409c0a1b05f87ef0f9 HTTP/1.1" 200 303 "https://monitor-dev.domain.com/nagiosxi/includes/components/ccm/xi-index.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
127.0.0.1 - - [16/Feb/2017:14:32:13 -0500] "POST /nagiosxi/backend/ HTTP/1.1" 200 1593 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.2.26.250 - - [16/Feb/2017:14:32:13 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=623b1629399d6b88c1303915c81bb0c236d85082aecbfce272caccb4c49bb26b HTTP/1.1" 200 303 "https://monitor-dev.domain.com/nagiosxi/dashboards/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
127.0.0.1 - - [16/Feb/2017:14:32:13 -0500] "POST /nagiosxi/backend/ HTTP/1.1" 200 1593 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.2.26.250 - - [16/Feb/2017:14:32:13 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=623b1629399d6b88c1303915c81bb0c236d85082aecbfce272caccb4c49bb26b HTTP/1.1" 200 1480 "https://monitor-dev.domain.com/nagiosxi/dashboards/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
127.0.0.1 - - [16/Feb/2017:14:32:13 -0500] "POST /nagiosxi/backend/ HTTP/1.1" 200 1593 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.2.26.251 - - [16/Feb/2017:14:32:13 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=33c3279da1c7cf156349aa784440600bb7e0ec7c4be819433e69832bc829fb54 HTTP/1.1" 200 1480 "https://monitor-dev.domain.com/nagiosxi/includes/components/ccm/xi-index.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
127.0.0.1 - - [16/Feb/2017:14:32:13 -0500] "POST /nagiosxi/backend/ HTTP/1.1" 200 1593 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.2.26.251 - - [16/Feb/2017:14:32:13 -0500] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=33c3279da1c7cf156349aa784440600bb7e0ec7c4be819433e69832bc829fb54 HTTP/1.1" 200 303 "https://monitor-dev.domain.com/nagiosxi/includes/components/ccm/xi-index.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
127.0.0.1 - - [16/Feb/2017:14:32:22 -0500] "POST /nagiosxi/backend/ HTTP/1.1" 200 810 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
Yes, when I change config.inc.php those php files I had you run pick up the change. We are missing something in replicating your setup. Perhaps your db users also have different names or something.TBT wrote: Have you tested and verified?
If you could confirm we did not break your workaround, that would really help us get a permanent fix for you.
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
FYI. As stated in our original bug report, the issue was with the database name, the change log indicates hard-coded table name fix.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
Hello TBT,
The changelog says table name but that's because it's specifying the database name on the table (but I updated the changelog to make more sense in 5.4.3) and originally I had thought it was just for the templates. Apparently there were others so this time there should be no more db names specified in the SQL queries and it should use the default db name for the open connection.
Fix is in 5.4.3 - and removing the "nagiosql." from the table names in line 691 and 696 of bulkmodifications.inc.php should fix the issue for you.
The changelog says table name but that's because it's specifying the database name on the table (but I updated the changelog to make more sense in 5.4.3) and originally I had thought it was just for the templates. Apparently there were others so this time there should be no more db names specified in the SQL queries and it should use the default db name for the open connection.
Fix is in 5.4.3 - and removing the "nagiosql." from the table names in line 691 and 696 of bulkmodifications.inc.php should fix the issue for you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
We have confirmed that our proposed workaround applies and resolves the issue in XI 5.4.2. That being said, if the bug has been addressed in the current stable release (5.4.2), why are we experiencing this issue and see lines 691 and 696 referencing the database names in bulkmodifications.inc.php?jomann wrote:Hello TBT,
The changelog says table name but that's because it's specifying the database name on the table (but I updated the changelog to make more sense in 5.4.3) and originally I had thought it was just for the templates. Apparently there were others so this time there should be no more db names specified in the SQL queries and it should use the default db name for the open connection.
Fix is in 5.4.3 - and removing the "nagiosql." from the table names in line 691 and 696 of bulkmodifications.inc.php should fix the issue for you.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: BUG with Bulk Modifications Tool remains in XI 5.4.2
Either the bug reporter (on our end), the developer and/or the tester failed to understand the scope of the bug.
Usually the bug reporter and the tester are the same (although that fails to solve the issue if they don't understand the initial problem). In this case, the reporter was unable to be the tester, so I took over testing. I certainly learned a lesson about testing based solely upon the bug report. I apologize for the inconvenience this has caused you.
Usually the bug reporter and the tester are the same (although that fails to solve the issue if they don't understand the initial problem). In this case, the reporter was unable to be the tester, so I took over testing. I certainly learned a lesson about testing based solely upon the bug report. I apologize for the inconvenience this has caused you.