Page 1 of 4

Auto-discovery error: "XML was not valid"

Posted: Wed Nov 16, 2016 6:26 am
by mvndnburg
Hi,

Running Nagios XI 5.2.9 on RHEL 6.
Auto-discovery wizard 1.4.0.

After running a (new or existing) auto-discovery job, Nagios returns an error XML was not valid and no scan results.

Upon investigation I find that of the three files generated during the auto-discovery job, the XML file is owned by root:
-rw-r----- 1 apache apache 207941 Nov 16 12:10 b2a27b.out
-rw-r----- 1 apache apache 0 Nov 16 12:09 b2a27b.watch
-rw-r----- 1 root root 71721 Nov 16 12:10 b2a27b.xml
Changing the ownership of the XML file to apache.apache and refreshing the auto-discovery job list makes that the scan results show up fine.
Rerunning the job after that returns the ownership to root.root and gives the error again.

The umask in the jobs directory is 0077 and the ownership of the jobs directory is 776.

Why is only one file of the three owned by root? What do I need to do to make it owned by apache, without resorting to ACLs?

Re: Auto-discovery error: "XML was not valid"

Posted: Wed Nov 16, 2016 3:44 pm
by dwhitfield
I've been looking into this for a bit today to see if I can dig up any related issue anyone has had. I haven't found anything.

Thus, I'll need to dig a little deeper into your system. Can you PM me your profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button in the top right corner.

Please update this thread after you've PMed the profile so that it pops back up on our dashboard.

UPDATE: profile received and shared with techs.

Re: Auto-discovery error: "XML was not valid"

Posted: Thu Nov 17, 2016 2:12 am
by mvndnburg
Profile sent by PM.

Re: Auto-discovery error: "XML was not valid"

Posted: Thu Nov 17, 2016 11:08 am
by dwhitfield
Some people have had problems with the combination of Auto-Discovery Component version 2.2.3, wizard version 1.40, and Nagios 5.2.9. As of the moment, I am not sure which component is the problem.

The quickest thing to do will likely be to upgrade to 5.3.2. Plus, you will get the latest features and security fixes. You can see details at https://assets.nagios.com/downloads/nag ... NGES-5.TXT. Instructions for upgrade be found at https://assets.nagios.com/downloads/nag ... nstall.pdf. This point is in the document, but please make sure you make a backup first.

A couple of caveats:
1. 5.3.3 should be coming out soon. Considering US Thanksgiving next week, I don't want to put an exact date on it, but I do mean soon.
2. I am by no means saying this is the only path we can take. I just know a subset saw similar issues when upgrading to 5.2.9. We can do more digging. That's what we're here for.

Re: Auto-discovery error: "XML was not valid"

Posted: Fri Nov 18, 2016 2:15 am
by mvndnburg
We have only recently installed 5.2.9 and are still in the process of getting everything up and running (first-time Nagios install, looking at monitoring ca. 1000 hosts eventually).

It was an offline install (which is already more complex than an online install) and I am not sure how much rework we will have to do if we upgrade in-place to 5.3.2 (or .3) - we do not have many resources available at the moment.

The bottom line is that at the moment we do not have the resources to do an upgarde just for this issue. If you have the opportunity to dig deeper that would be greatly appreciated.

Re: Auto-discovery error: "XML was not valid"

Posted: Fri Nov 18, 2016 10:42 am
by dwhitfield
What's the output of getfacl configure?

I'm checking with the devs about an ETA on the 5.3 offline. I'll update this post if I get any sort of ETA. If I don't update it, assume there's no ETA, unfortunately.

Re: Auto-discovery error: "XML was not valid"

Posted: Mon Nov 21, 2016 7:37 am
by mvndnburg
dwhitfield wrote:What's the output of getfacl configure?
Which configure file/directory should that be? There is no configure file/directory in the Nagios installation tree.

Re: Auto-discovery error: "XML was not valid"

Posted: Mon Nov 21, 2016 8:45 am
by mvndnburg
The ACLs on the autodiscovery directory are:
$ cd /usr/local/nagiosxi/html/includes/components/autodiscovery/
$ getfacl jobs
# file: jobs
# owner: nagios
# group: nagios
user::rwx
group::rwx
other::rw-

Re: Auto-discovery error: "XML was not valid"

Posted: Mon Nov 21, 2016 8:47 am
by mvndnburg
The files in the jobs directory are owned by apache.apache (manually having changed the XML file):
$ cd jobs/
$ getfacl *
# file: b2a27b.out
# owner: apache
# group: apache
user::rw-
group::r--
other::---

# file: b2a27b.watch
# owner: apache
# group: apache
user::rw-
group::r--
other::---

# file: b2a27b.xml
# owner: apache
# group: apache
user::rw-
group::r--
other::---

Re: Auto-discovery error: "XML was not valid"

Posted: Mon Nov 21, 2016 12:58 pm
by dwhitfield
My apologies. The configure portion was for another thread, but I did want to figure out the acl situation.

Unfortunately, the devs do not currently have an ETA on the 5.3 offline. It's certainly on their radar.

Could you post or PM your /etc/fstab? If you choose to PM, please update the thread after PMing so that the thread pops back up on our dashboard. Thanks!