Page 1 of 1

Nagios Log server upgrade fails

Posted: Wed Jan 31, 2018 10:40 am
by thanigaivel.a
Hi team,

currently, Nagios log server runs with 1.4.4, so I'm trying to upgrade to the latest version 2.0, however getting the below error. also attached the system profile.

[root@usa0300lv6332 tmp]# curl https://assets.nagios.com/downloads/nag ... upgrade.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 586 100 586 0 0 1024 0 --:--:-- --:--:-- --:--:-- 1024
sh: line 1: #!/bin/sh: No such file or directory
check if /tmp/nagioslogserver exists
--2018-01-31 10:35:31-- https://assets.nagios.com/downloads/nag ... est.tar.gz
Resolving www2.mc.xerox.com (www2.mc.xerox.com)... 13.131.1.242
Connecting to www2.mc.xerox.com (www2.mc.xerox.com)|13.131.1.242|:8000... connected.
Proxy request sent, awaiting response... 200 OK
Length: 193392591 (184M) [application/x-gzip]
Saving to: ‘/tmp/nagioslogserver-latest.tar.gz’

100%[===================================================================================================================================================================================================>] 193,392,591 1.69MB/s in 1m 49s

2018-01-31 10:37:20 (1.69 MB/s) - ‘/tmp/nagioslogserver-latest.tar.gz’ saved [193392591/193392591]

Running upgrade
sh: line 28: ./upgrade: Permission denied
[root@usa0300lv6332 tmp]#

regards,
A.Thanigaivel

Re: Nagios Log server upgrade fails

Posted: Wed Jan 31, 2018 12:42 pm
by thanigaivel.a
Also tried to download the upgrade package, but fails with the below permission denied error.

[root@usa0300lv6332 nagioslogserver]# pwd
/tmp/nagioslogserver
[root@usa0300lv6332 nagioslogserver]# ls -rlth
total 1.4M
drwxr-xr-x 3 root root 4.0K Dec 19 15:45 nagioslogserver
drwxr-xr-x 2 root root 60 Dec 19 15:45 mibs
drwxr-xr-x 2 root root 64 Dec 19 15:45 licenses
-rwxr-xr-x 1 root root 20K Dec 19 15:45 libinstall.sh
-rwxr-xr-x 1 root root 1.3M Dec 19 15:45 get-pip.py
-rwxr-xr-x 1 root root 8.0K Dec 19 15:45 fullinstall
-rw-r--r-- 1 root root 18K Dec 19 15:45 CHANGELOG.txt
-rwxr-xr-x 1 root root 33 Dec 19 15:45 addnode
-rwxr-xr-x 1 root root 7.5K Dec 19 15:46 upgrade
drwxr-xr-x 5 root root 54 Dec 19 15:46 subcomponents
drwxr-xr-x 2 root root 60 Dec 19 15:49 sourceguardian
[root@usa0300lv6332 nagioslogserver]# ./upgrade
-bash: ./upgrade: Permission denied
[root@usa0300lv6332 nagioslogserver]#

Re: Nagios Log server upgrade fails

Posted: Wed Jan 31, 2018 1:24 pm
by npolovenko
Hello, @thanigaivel.a. Can you try this running the command with sudo:

Code: Select all

sudo curl https://assets.nagios.com/downloads/nag ... upgrade.sh | sh
Otherwise, the key is to give permissions to the upgrade.sh script:

Code: Select all

chmod +x /tmp/nagioslogserver-latest/upgrade.sh
Not sure why you ran into this issue when you were already signed in as a root user. But giving the permissions with chmod +x should fix that.

Re: Nagios Log server upgrade fails

Posted: Thu Feb 01, 2018 1:41 pm
by thanigaivel.a
I download manually and tried to change permission and install, but no luck.

It looks to be no permission issue, Is it a shell issue. however, I tried with "sh upgrade", it works with error.

[root@usa0300lv6332 nagioslogserver]# sh upgrade
ERROR: unable to read system id.
PHP Warning: Module 'SourceGuardian' already loaded in Unknown on line 0
Loaded plugins: product-id, search-disabled-repos
No package php-devel available.
Error: Nothing to do
[root@usa0300lv6332 nagioslogserver]#

Re: Nagios Log server upgrade fails

Posted: Thu Feb 01, 2018 2:20 pm
by dwhitfield
thanigaivel.a wrote: No package php-devel available.
You don't have access to the proper repos.

What's the output of yum repolist all? Please put the output in a code block. The "Code" button is the fifth from the left on the post input screen (between Quote and List).

Re: Nagios Log server upgrade fails

Posted: Thu Feb 01, 2018 2:29 pm
by npolovenko
In addition to what @dwhitfield said the following error often indicates some kind of problems with RedHat subscription. I'd also look into that.

Code: Select all

ERROR: unable to read system id.

Re: Nagios Log server upgrade fails

Posted: Fri Feb 02, 2018 7:30 am
by thanigaivel.a

Code: Select all

[root@usa0300lv6332 nagioslogserver]# yum repolist all
Loaded plugins: product-id, search-disabled-repos
repo id                                                                                 repo name                                                                                                                             status
HotFix                                                                                  Emergency HotFix                                                                                                                      enabled:     13
base/x86_64                                                                             Base Packages \7Server - \$basearchr                                                                                                  enabled: 17,474
epel/x86_64                                                                             Extra Packages for Enterprise Linux \7Server - \$basearchr                                                                            enabled: 12,265
imit-packages                                                                           Xerox Internal Packages 7Server - x86_64                                                                                              enabled:      8
pc_repo                                                                                 Puppet Labs PC1 Repository                                                                                                            enabled:      1
repolist: 29,761
[root@usa0300lv6332 nagioslogserver]#

Re: Nagios Log server upgrade fails

Posted: Fri Feb 02, 2018 11:15 am
by cdienger
I beleive you need the optional rhel-7-server-optional-rpms repo for this package. See https://access.redhat.com/documentation ... tary-repos