Page 1 of 1

1.4.4 fresh install - old commands not for RHEL7

Posted: Thu Feb 02, 2017 4:43 pm
by vAJ
Have a need to build out a new separate instance of NLS.

Grabbed the 1.4.4 package and proceeded to run fullinstall on a RHEL7.3 VM. Fails on 'backend'

Checking the steps there:

Code: Select all

# Setup the backend items
        add_user nagios
        add_group nagios
        add_to_groups nagios nagios "$apachegroup"
        add_to_groups "$apacheuser" nagios
those are deprecated commands from RHEL6, right? They fail on my distro. "useradd", "groupadd" are the correct ones for RHEL7.

I don't recall having this issue on my other RHEL7 installs when done with previous versions. Anyone else?

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Thu Feb 02, 2017 5:16 pm
by rkennedy
I believe these functions are defined in libinstall.sh still which is where they're referenced from -

Code: Select all

# Adds specified user if it doesn't exist already
add_user() {
        local user
        user="$1"

        if ! grep -q "^$user:" /etc/passwd; then
                case "$dist" in
                        el* )
                                useradd -n "$user"
                                ;;
                        * )
                                useradd "$user"
                esac
        fi
}

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Thu Feb 02, 2017 5:24 pm
by vAJ
Totally missed that you were calling libinstall.sh.

For whatever reason it kept failing until I commented out those and added manually. install.log gives no help as to which step exactly it had problems with.

Code: Select all

cd $(dirname $(readlink -e "$0"))
. ./libinstall.sh
is the line where libinstall.sh look correct to you?

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Thu Feb 02, 2017 5:50 pm
by rkennedy
Hmm, what is the cwd? Anything out of the ordinary? I can't think of a reason on why the dirname would alter.

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Thu Feb 02, 2017 5:59 pm
by vAJ
it had to be something to do with the add_group call. on the second node I built, I commented that line only and the install script worked like a charm.

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Thu Feb 02, 2017 6:34 pm
by vAJ
I thought I've run the command manually but when I try to add the second node to the cluster, I get:

Code: Select all

Could not generate node_uuid - check file permissions

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Fri Feb 03, 2017 10:04 am
by rkennedy
What are the permissions in this folder? ls -la /usr/local/nagioslogserver/var/ I believe that's where cluster_uuid / node_uuid are located.

Can you also show us the output for grep 'nag' /etc/group - just want to line up the permissions.

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Fri Feb 03, 2017 10:08 am
by vAJ

Code: Select all

[root@aunlsauditp2 ~]# ls -la /usr/local/nagioslogserver/var/
total 12
drwxrwxr-x.  2 nagios nagios  98 Feb  2 16:48 .
drwxrwxr-x  10 nagios nagios 120 Feb  2 16:47 ..
-rwxrwxr-x.  1 nagios nagios  10 Feb  2 16:47 cluster_hosts
-rwxrwxr-x.  1 nagios nagios  37 Feb  2 16:47 cluster_uuid
-rwxrwxr-x.  1 nagios nagios   0 Feb  3 09:07 jobs.log
-rwxrwxr-x.  1 nagios nagios  37 Feb  2 16:47 node_uuid
-rwxrwxr-x.  1 nagios nagios   0 Feb  3 09:07 poller.log

Code: Select all

[root@aunlsauditp2 ~]# grep 'nag' /etc/group
nagcmd:x:13803:nagios
apache:x:48:nagios

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Fri Feb 03, 2017 10:41 am
by vAJ
was missing

Code: Select all

nagios:x:13802:nagios,apache
restarted httpd and it required nothing else. Cluster was already green by the time I logged in.

So something in the usermod commands for the group membership wasn't happy on this system.

Let me know if you want to tshoot more to find root cause or we can just lock this up.

Re: 1.4.4 fresh install - old commands not for RHEL7

Posted: Fri Feb 03, 2017 1:47 pm
by mcapra
That's about all we'd need to attempt to reproduce. I'll give it a shot and let you know if I find anything. Other than that, feel free to post if you encounter any issues with your RHEL7 setup.