Error: Could not parse XML from https://serve_name/nagiosxi/

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Error: Could not parse XML from https://serve_name/nagio

Post by taandrews »

When running your suggested command
/usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=xxx.xxx.xxx.xxx --url=http://xxx.xxx.xxx.xxx/nagiosxi/ --username=nagiosadmin --ticket="password" --mode=daemons --debug=1

Part of the OUTPUT states "Accessing URL https://server_name/nagiosxi//backend/?username=nagiosadmin&ticket=ticket_value&cmd=getsysstat "

Nagios fails to access this URL via the command but it does pull the data in the browser. Not sure if this info is of any help to you.

Thanks
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error: Could not parse XML from https://serve_name/nagio

Post by tgriep »

It could be an SSL setting for the server that is failing causing the issue. Take a look at the document below and check all of the settings and see if they are correct.
https://assets.nagios.com/downloads/nag ... s%20XI.pdf
Also, use https:// in the --url option and see if that helps.

Code: Select all

/usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=xxx.xxx.xxx.xxx --url=https://xxx.xxx.xxx.xxx/nagiosxi/ --username=nagiosadmin --ticket="password" --mode=daemons --debug=1
Be sure to check out our Knowledgebase for helpful articles and solutions!
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Error: Could not parse XML from https://serve_name/nagio

Post by taandrews »

All of this checks out. This is actually a server that has been running perfectly for about 6 months. This just happened mysteriously about 2 weeks ago. Also I had already run the command with https://
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Error: Could not parse XML from https://serve_name/nagio

Post by rkennedy »

Please show us the output from what @tgriep mentioned, as this should help identify what's going on with the debug turned on.
Former Nagios Employee
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Error: Could not parse XML from https://serve_name/nagio

Post by taandrews »

This is the output:

i got the command to execute. Unfortunately I would have to hand type the output as there is no way to paste it here. I ran this on a working server and I see there is alot of output.

For the server that is NOT working I have:

Array
(
[hearders] => Array
(
)

[body] =>

EVERYTHING ABOVE IS EMPTY
EVERYTHING BELOW IN THE [INFO] BLOCK HAS 0 FOR THE VALUE EXCEPT [namelookup_time] => 0.0000128, [connect_time] => 0.000 555[download_content_legnth] => -1, [upload_content_legnth] => -1


[info] => Array
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error: Could not parse XML from https://serve_name/nagio

Post by dwhitfield »

Are you having issues with any other websites? I assume you aren't going to a lot of other websites, but I figured we should check.

Have you tried a different browser?

Does the output of rpm -qa *ssl* look like one of the following?

Code: Select all

python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch
openssl-1.0.1e-60.el7.x86_64
openssl-devel-1.0.1e-60.el7.x86_64
mod_ssl-2.4.6-45.el7.centos.x86_64
openssl-libs-1.0.1e-60.el7.x86_64

Code: Select all

mod_ssl-2.2.15-54.el6.centos.x86_64
openssl-devel-1.0.1e-48.el6_8.3.x86_64
openssl-1.0.1e-48.el6_8.3.x86_64
python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch

Code: Select all

mod_ssl-2.2.3-92.el5.centos
openssl-0.9.8e-40.el5_11
openssl-devel-0.9.8e-40.el5_11
I suppose more importantly, does the output of rpm -qa *ssl* on the two servers look the same?

Any information you could give us about differences in the two servers might help us pinpoint the issue.
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Error: Could not parse XML from https://serve_name/nagio

Post by taandrews »

Originally I mentioned XI servers A and B. We can omit server B. I am getting this error when server A monitors itself using the XI server wizard. I still see the same error on Server B for Server A but since Server is throwing this error for itself... I am not concerned with B for now.

As far as the output for rpm -qa *ssl* I have
openssl-1.0.1e-60.el7.x86_64
openssl-devel-1.0.1e-60.el7.x86_64
mod_ssl-2.2.15-54.el7.centos.x86_64

openssl-libs-1.0.1e-60.el7.x86_64 - IS NOT INSTALLED
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error: Could not parse XML from https://serve_name/nagio

Post by dwhitfield »

taandrews wrote: I still see the same error on Server B for Server A but since Server is throwing this error for itself... I am not concerned with B for now.
I'm not sure I follow the logic here. You have (at least) two servers in your environment. One works, the other doesn't. It seems to me you should make the non-working one as much as like the working one as possible (to the extent possible for the different workloads of the server).

If I try to uninstall either openssl-libs-1.0.1e-60.el7.x86_64 or python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch I get some pretty gnarly dependencies. Trying to uninstall openssl-libs tries to remove so many things I don't think the output is even useful.

Perhaps more interesting is

Code: Select all

Removing:
 python-backports-ssl_match_hostname  noarch  3.4.0.2-4.el7    @base       14 k
Removing for dependencies:
 nagiosxi-deps-el7                    noarch  5.4.0-1          installed  0.0
As you can see, I am running an internal build of 5.4. Also of potential interest is that I am running CentOS 7.3.1611. The dependencies might be different on different versions.

Is it possible to install the two missing rpms? If not, I can do some more specific version testing.

Early on in the thread you said
On the Admin tab XI System Component Status, all service are running green.
Did you mean literally all the services, or just these four? Are these the only four? If those are not the only four, do the other pages have no XML errors?
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Error: Could not parse XML from https://serve_name/nagio

Post by taandrews »

Pardon me there was a typo in my previous statement. "I still see the same error on Server B for Server A, but since Server A is throwing this error for itself... I am not concerned with B for now." I have 4 Xi servers total. They are all monitoring each other. My example shows that B is monitoring A, A is also monitoring itself. A is generating this error for itself. I am not concerned about why B is receiving the error from A because A is generating the error while monitoring itself.

I dont have openssl-libs in any of the repos that I have access to but I installed python-backports with no success. Also all nagios services are running perfectly.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Error: Could not parse XML from https://serve_name/nagio

Post by rkennedy »

Let's take a look at just the A machine, without the plugin. Please run the following and post the output for us to review -

Code: Select all

curl -v "https://192.168.47.9/nagiosxi//backend/?username=nagiosadmin&ticket=mnis6mbn&cmd=getsysstat" --insecure
(replace the username / ticket accordingly)

If this errors out, then take a look at a tail of your /var/log/httpd/*_log which should have an indication as to what's going on.
[/code]
Former Nagios Employee
Locked