Page 1 of 1

Failing to install

Posted: Tue Jun 15, 2021 3:05 am
by danniiffxi
Hi Guys,

I am trying to spin up a new Nagios Log Test Cluster but I am running into an issue when installing it, I believe it is something Python related.

OK so when I run the installer on our Test VM's everything appears to be fine until i get to the following point

Code: Select all

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cVAi3t/click/
You are using pip version 8.1.2, however version 21.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
So at this point I ran the following and upgraded pip 21.1.2, which was successful.

Code: Select all

pip install --upgrade pip
After which I ran the installer again, but this time I get a different error and I am not sure what to do next. I have attached the install.log..

As a side note, I built our new Production cluster on the same OS back in Feb/March and I never had any problems at all, so I am not sure why this is happening now.

Re: Failing to install

Posted: Tue Jun 15, 2021 12:53 pm
by dchurch
Please try patching the install script using the attached patch from upstream.

Apply the patch using the following command:

Code: Select all

patch -p1 < 0001-Fix-compatibility-with-CentOS-7-RHEL-7-with-Python-2.patch
Then try re-running the installer (do not un-tar again or it will clobber the patched file).

Re: Failing to install

Posted: Wed Jun 16, 2021 2:56 am
by danniiffxi
Hi Dan,

Thanks for getting back to me. I placed the patch file into /tmp/nagioslogserver, and ran the command as you can see below. But I am still getting the same error when trying to install unfortunately.

Code: Select all

[root@lnxnaglt01 tmp]# mv /tmp/0001-Fix-compatibility-with-CentOS-7-RHEL-7-with-Python-2.patch /tmp/nagioslogserver/0001-Fix-compatibility-with-CentOS-7-RHEL-7-with-Python-2.patch
[root@lnxnaglt01 tmp]# cd /tmp/nagioslogserver
[root@lnxnaglt01 nagioslogserver]# patch -p1 < 0001-Fix-compatibility-with-CentOS-7-RHEL-7-with-Python-2.patch
patching file fullinstall
[root@lnxnaglt01 nagioslogserver]#

Code: Select all

[root@lnxnaglt01 nagioslogserver]# ./fullinstall
Installing on CentOS 7.9.2009

Nagios Log Server Installation
==============================
DATE: Wed 16 Jun 08:51:27 BST 2021

DISTRO INFO:
CentOS
7.9.2009
x86_64

Running 'setup_local_syslog'...
setup_local_syslog step already completed - skipping
Running 'prereqs'...
epel-release RPM installed OK
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirror.nl.leaseweb.net
Package python2-pip-8.1.2-14.el7.noarch already installed and latest version
Package ipa-gothic-fonts-003.03-5.el7.noarch already installed and latest version
Package ipa-mincho-fonts-003.03-5.el7.noarch already installed and latest version
Package ipa-pgothic-fonts-003.03-5.el7.noarch already installed and latest version
Package ipa-pmincho-fonts-003.03-5.el7.noarch already installed and latest version
Package pyOpenSSL-0.13.1-4.el7.x86_64 already installed and latest version
Package python-2.7.5-90.el7.x86_64 already installed and latest version
Package ntp-4.2.6p5-29.el7.centos.2.x86_64 already installed and latest version
Package byacc-1.9.20130304-3.el7.x86_64 already installed and latest version
Package cairo-devel-1.15.12-4.el7.x86_64 already installed and latest version
Package gcc-4.8.5-44.el7.x86_64 already installed and latest version
Package glib2-devel-2.56.1-9.el7_9.x86_64 already installed and latest version
Package glibc-2.17-324.el7_9.x86_64 already installed and latest version
Package 1:java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64 already installed and latest version
Package libxml2-devel-2.9.1-6.el7.5.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Package 1:net-snmp-5.7.2-49.el7_9.1.x86_64 already installed and latest version
Package 1:net-snmp-utils-5.7.2-49.el7_9.1.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-21.el7_9.x86_64 already installed and latest version
Package patch-2.7.1-12.el7_7.x86_64 already installed and latest version
Package pango-devel-1.42.4-4.el7_7.x86_64 already installed and latest version
Package perl-ExtUtils-MakeMaker-6.68-3.el7.noarch already installed and latest version
Package sendmail-8.14.7-6.el7.x86_64 already installed and latest version
Package httpd-2.4.6-97.el7.centos.x86_64 already installed and latest version
Package php-5.4.16-48.el7.x86_64 already installed and latest version
Package php-cli-5.4.16-48.el7.x86_64 already installed and latest version
Package rc-1.7.4-1.el7.x86_64 already installed and latest version
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
Package sudo-1.8.23-10.el7_9.1.x86_64 already installed and latest version
Package sysstat-10.1.5-19.el7.x86_64 already installed and latest version
Package unzip-6.0-22.el7_9.x86_64 already installed and latest version
Package zip-3.0-11.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.25.20131004git.el7.x86_64 already installed and latest version
Package php-ldap-5.4.16-48.el7.x86_64 already installed and latest version
Package php-devel-5.4.16-48.el7.x86_64 already installed and latest version
Nothing to do
16 Jun 08:51:40 ntpdate[11771]: adjust time server 85.199.214.99 offset 0.000086 sec
Traceback (most recent call last):
  File "/bin/pip", line 9, in <module>
    load_entry_point('pip==21.1.2', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 1, in <module>
    from typing import List, Optional
ImportError: No module named typing

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.

The step that failed was: 'prereqs'
[root@wxlnxnaglt01 nagioslogserver]#

Re: Failing to install

Posted: Wed Jun 16, 2021 11:00 am
by dchurch
pip is broken on your system. It broke itself.

To un-break pip, please run the following command:

Code: Select all

yum reinstall python2-pip

Re: Failing to install

Posted: Mon Jun 21, 2021 2:59 am
by danniiffxi
Hi Dan,

Sorry for the delay, I have reinstalled pip, but unfortunately I am still getting a failed install, although the error is slightly different now!

Code: Select all

[root@lnxnaglt02 ~]# yum reinstall python2-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirrors.coreix.net
Resolving Dependencies
--> Running transaction check
---> Package python2-pip.noarch 0:8.1.2-14.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================
 Package                 Arch               Version                   Repository        Size
=============================================================================================
Reinstalling:
 python2-pip             noarch             8.1.2-14.el7              epel             1.7 M

Transaction Summary
=============================================================================================
Reinstall  1 Package

Total download size: 1.7 M
Installed size: 7.2 M
Is this ok [y/d/N]: y
Downloading packages:
python2-pip-8.1.2-14.el7.noarch.rpm                                   | 1.7 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python2-pip-8.1.2-14.el7.noarch                                           1/1
  Verifying  : python2-pip-8.1.2-14.el7.noarch                                           1/1

Installed:
  python2-pip.noarch 0:8.1.2-14.el7

Complete!

Code: Select all

[root@lnxnaglt02 ~]# curl https://assets.nagios.com/downloads/nagios-log-server/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   558  100   558    0     0    972      0 --:--:-- --:--:-- --:--:--   973
check if /tmp/nagioslogserver exists
Installing on CentOS 7.9.2009

Nagios Log Server Installation
==============================
DATE: Mon 21 Jun 08:52:02 BST 2021

DISTRO INFO:
CentOS
7.9.2009
x86_64

Running 'setup_local_syslog'...
setup_local_syslog step already completed - skipping
Running 'prereqs'...
epel-release RPM installed OK
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirrors.coreix.net
Package python2-pip-8.1.2-14.el7.noarch already installed and latest version
Package ipa-gothic-fonts-003.03-5.el7.noarch already installed and latest version
Package ipa-mincho-fonts-003.03-5.el7.noarch already installed and latest version
Package ipa-pgothic-fonts-003.03-5.el7.noarch already installed and latest version
Package ipa-pmincho-fonts-003.03-5.el7.noarch already installed and latest version
Package pyOpenSSL-0.13.1-4.el7.x86_64 already installed and latest version
Package python-2.7.5-90.el7.x86_64 already installed and latest version
Package ntp-4.2.6p5-29.el7.centos.2.x86_64 already installed and latest version
Package byacc-1.9.20130304-3.el7.x86_64 already installed and latest version
Package cairo-devel-1.15.12-4.el7.x86_64 already installed and latest version
Package gcc-4.8.5-44.el7.x86_64 already installed and latest version
Package glib2-devel-2.56.1-9.el7_9.x86_64 already installed and latest version
Package glibc-2.17-324.el7_9.x86_64 already installed and latest version
Package 1:java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64 already installed and latest version
Package libxml2-devel-2.9.1-6.el7.5.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Package 1:net-snmp-5.7.2-49.el7_9.1.x86_64 already installed and latest version
Package 1:net-snmp-utils-5.7.2-49.el7_9.1.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-21.el7_9.x86_64 already installed and latest version
Package patch-2.7.1-12.el7_7.x86_64 already installed and latest version
Package pango-devel-1.42.4-4.el7_7.x86_64 already installed and latest version
Package perl-ExtUtils-MakeMaker-6.68-3.el7.noarch already installed and latest version
Package sendmail-8.14.7-6.el7.x86_64 already installed and latest version
Package httpd-2.4.6-97.el7.centos.x86_64 already installed and latest version
Package php-5.4.16-48.el7.x86_64 already installed and latest version
Package php-cli-5.4.16-48.el7.x86_64 already installed and latest version
Package rc-1.7.4-1.el7.x86_64 already installed and latest version
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
Package sudo-1.8.23-10.el7_9.1.x86_64 already installed and latest version
Package sysstat-10.1.5-19.el7.x86_64 already installed and latest version
Package unzip-6.0-22.el7_9.x86_64 already installed and latest version
Package zip-3.0-11.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.25.20131004git.el7.x86_64 already installed and latest version
Package php-ldap-5.4.16-48.el7.x86_64 already installed and latest version
Package php-devel-5.4.16-48.el7.x86_64 already installed and latest version
Nothing to do
21 Jun 08:52:12 ntpdate[22324]: adjust time server 185.53.93.157 offset -0.000013 sec
Collecting argparse
  Using cached https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting elasticsearch-curator==3.4.0
  Using cached https://files.pythonhosted.org/packages/fc/a7/29d0bda164b6dc6ac730b3e8ce9b27e9aec6106f2589af83b5e5bedaf134/elasticsearch_curator-3.4.0-py2.py3-none-any.whl
Collecting elasticsearch<2.1.0,>=1.8.0 (from elasticsearch-curator==3.4.0)
  Using cached https://files.pythonhosted.org/packages/cf/18/1b7a51cbc1caf2b99a913449f354dba8179b0fe6dfddd08ab160ebe54e1f/elasticsearch-2.0.0-py2.py3-none-any.whl
Collecting click>=3.3 (from elasticsearch-curator==3.4.0)
  Using cached https://files.pythonhosted.org/packages/21/83/308a74ca1104fe1e3197d31693a7a2db67c2d4e668f20f43a2fca491f9f7/click-8.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    error in click setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-eOWsX1/click/

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.

The step that failed was: 'prereqs'
[root@lnxnaglt02 ~]#

Re: Failing to install

Posted: Mon Jun 21, 2021 11:28 am
by dchurch
You appear have started over from scratch and haven't applied the patch necessary to get the installer working.

Please run these commands (as root) to install:

Code: Select all

(
set -e
cd /tmp
rm -rf nagioslogserver
wget --continue https://assets.nagios.com/downloads/nagios-log-server/nagioslogserver-latest.tar.gz
tar xf nagioslogserver-latest.tar.gz
cd nagioslogserver
if ! hash patch &>/dev/null; then
	yum install -y patch
fi
patch -l -p1 <<'EOF'
From 7705285510d2b79b38acb73ee095cdc9fc0e4fea Mon Sep 17 00:00:00 2001
From: Dan Church <[email protected]>
Date: Thu, 13 May 2021 14:31:07 -0500
Subject: [PATCH] Fix compatibility with CentOS 7, RHEL 7 with Python 2

---
 fullinstall | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fullinstall b/fullinstall
index fd91b74..a05fd37 100755
--- a/fullinstall
+++ b/fullinstall
@@ -105,6 +105,8 @@ prereqs() {
 		pip="python-pip"
 		if [ "$dist" == "el7" ]; then
 			pip="python2-pip"
+            # click 8.0.0 is incompatible with Python 2.x
+            pipextra='click<8.0.0'
 		elif [ "$dist" == "el8" ]; then
 			pip="python3-pip"
 		else
-- 
2.25.1
EOF
)
chmod +x ./fullinstall
./fullinstall

Re: Failing to install

Posted: Thu Jul 08, 2021 7:36 am
by danniiffxi
Hi @dchurch,

sorry for the delay, I had a few weeks off, I have now completed the Nagios Log install, all working good with the fix you supplied.

Many thanks, you can lock this one now.