Page 1 of 1
API page has HTTP ERROR 500
Posted: Fri Feb 07, 2020 9:36 am
by optionstechnology
You guys fixed this for me before but I cant find/remember the ticket
getting a HTTP ERROR 500 when trying to open the /objects/services API page
The others are fine
I think it was a timeout setting somewhere or something like that?
Re: API page has HTTP ERROR 500
Posted: Fri Feb 07, 2020 2:59 pm
by tgriep
I would guess that the setting was changed could of been a a PHP settings or an Apache settings
Lets see if you can capture any errors.
Run this in a root shell.
tail -f /var/log/httpd/*_log
Then run your API call and post all of the output from the tail command so we can check it for errors.
Re: API page has HTTP ERROR 500
Posted: Tue Feb 11, 2020 9:27 am
by optionstechnology
The logs are vast for this - I did a tail -n 10 instead if that helps?
PM ed the results to you
Re: API page has HTTP ERROR 500
Posted: Tue Feb 11, 2020 12:59 pm
by tgriep
Sorry, the data did not provide any information in the issue for the API.
I am going to have to see all of the data or you can search through the files for the 500 error and see if you can figure it out.
Zip it up if it is too big.
Re: API page has HTTP ERROR 500
Posted: Wed Feb 12, 2020 5:46 am
by optionstechnology
Sorry - I've sent the full ones gathered since yesterday - I clicked a URL a good few times so there should be something in there
Thanks
Re: API page has HTTP ERROR 500
Posted: Wed Feb 12, 2020 10:02 am
by tgriep
I see the 500 error on the log files now but they do not have any details on what is causing the error.
How many Hosts and Services is the server monitoring?
First, upgrade XI to the latest version.
Run the manual XI upgrade from the instructions in this document.
https://assets.nagios.com/downloads/nag ... ctions.pdf
Login to the XI interface and go to the Admin > System Settings menu and verify the Program URI is correct.
If the upgrade fails, get the following configuration files and post them.
Code: Select all
/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/nagiosxi.conf
/etc/httpd/conf.d/ssl.conf
/etc/php.ini
Thanks
Re: API page has HTTP ERROR 500
Posted: Wed Feb 12, 2020 6:41 pm
by Maxwellb99
Hi OP,
We hit up against the same issue. We had to increase the PHP memory_limit. Here's what they told me. Basically in /etc/php.ini find "memory_limit" increase it & restart httpd. Hope this helps.
"
There isn't a maximum, however you are likely hitting a php memory_limit
edit /etc/php.ini and increase the memory_limit
CODE: SELECT ALL
memory_limit = 256M
restart httpd
CODE: SELECT ALL
service httpd restart
"
Re: API page has HTTP ERROR 500
Posted: Thu Feb 13, 2020 9:58 am
by optionstechnology
Yes
@Maxwellb99, that's exactly it!
Thanks!
Re: API page has HTTP ERROR 500
Posted: Thu Feb 13, 2020 12:13 pm
by lmiltchev
Thanks @Maxwellb99!
@optionstechnology, is it safe to close this topic now, and mark it as resolved?
Re: API page has HTTP ERROR 500
Posted: Thu Feb 20, 2020 9:20 am
by optionstechnology
yup