Auto-discovery error: "XML was not valid"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mvndnburg
Posts: 64
Joined: Wed Sep 21, 2016 2:53 am

Auto-discovery error: "XML was not valid"

Post 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?
--
Martijn
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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.
mvndnburg
Posts: 64
Joined: Wed Sep 21, 2016 2:53 am

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

Post by mvndnburg »

Profile sent by PM.
--
Martijn
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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.
mvndnburg
Posts: 64
Joined: Wed Sep 21, 2016 2:53 am

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

Post 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.
--
Martijn
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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.
mvndnburg
Posts: 64
Joined: Wed Sep 21, 2016 2:53 am

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

Post 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.
--
Martijn
mvndnburg
Posts: 64
Joined: Wed Sep 21, 2016 2:53 am

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

Post 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-
--
Martijn
mvndnburg
Posts: 64
Joined: Wed Sep 21, 2016 2:53 am

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

Post 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::---
--
Martijn
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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!
Locked