Page 3 of 4

Re: Error during XI install on RHEL 6.4

Posted: Tue Jan 20, 2015 4:54 pm
by lmiltchev
This is a redhat system though, should it be even installing this component???
Don't worry about this - it will work fine on RHEL... if we could install it. :)

Let's try installing this manually - run the following command and show us the output:

Code: Select all

cd /tmp/nagiosxi/subcomponents/wkhtmlx
rm -rf wkhtmlto*
wget http://assets.nagios.com/downloads/nagiosxi/components/wkhtmltox-0.12.1-centos5-amd64.tar.gz
tar -xf wkhtmltox-0.12.1-centos5-amd64.tar.gz
cd wkhtmlto*
mv -f bin/wkhtmltopdf /usr/bin/wkhtmltopdf
mv -f bin/wkhtmltoimage /usr/bin/wkhtmltoimage
which wkhtmltopdf
which wkhtmltoimage

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 7:55 am
by JakeHatMacys
[root@esu2v238 tmp]# mv /tmp/wkhtmltox-0.12.1-centos5-amd64.tar.gz /tmp/nagiosxi/subcomponents/wkhtmlx
mv: overwrite `/tmp/nagiosxi/subcomponents/wkhtmlx/wkhtmltox-0.12.1-centos5-amd64.tar.gz'? y
[root@esu2v238 tmp]# cd /tmp/nagiosxi/subcomponents/wkhtmlx
[root@esu2v238 wkhtmlx]# ls
install wkhtmltox-0.12.1-centos5-amd64.tar.gz
[root@esu2v238 wkhtmlx]# tar -xf wkhtmltox-0.12.1-centos5-amd64.tar.gz
[root@esu2v238 wkhtmlx]# cd wkhtmlto*
[root@esu2v238 wkhtmltox-0.12.1-c22928d]# mv -f bin/wkhtmltopdf /usr/bin/wkhtmltopdf
[root@esu2v238 wkhtmltox-0.12.1-c22928d]# mv -f bin/wkhtmltoimage /usr/bin/wkhtmltoimage
[root@esu2v238 wkhtmltox-0.12.1-c22928d]# which wkhtmltopdf
/usr/bin/wkhtmltopdf
[root@esu2v238 wkhtmltox-0.12.1-c22928d]# which wkhtmltoimage
/usr/bin/wkhtmltoimage
[root@esu2v238 wkhtmltox-0.12.1-c22928d]#


Done... Trying the full install now... Failed on the same step. I think there's a problem with the wget on the server for this step... I had to manually DL it and move it to the box, otherwise the tar fails when I was doing it manually with wget.

The manual procedure you had me do seem to go without any errors after the manual download, should we comment this out from the main install after doing it manually? (if so could you show me how haha).

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 11:34 am
by lmiltchev
Since wkhtmlx installed fine, you can try skipping this step. Open the install script in a text editor:

Code: Select all

vi /tmp/nagiosxi/subcomponents/install
and remove the "wkhtmlx" from line 9, changing it from this:

Code: Select all

for pkg in nagioscore nagiosplugins ndoutils pnp nrpe nsca nrdp nagiosql extraplugins nagiosmobile webinject ajaxterm wkhtmlx mrtg; do
to this:

Code: Select all

for pkg in nagioscore nagiosplugins ndoutils pnp nrpe nsca nrdp nagiosql extraplugins nagiosmobile webinject ajaxterm mrtg; do
Save and exit. Try installing XI again.

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 1:08 pm
by JakeHatMacys
Hmm... this is weird, it ran for a minute or so then ended up crashing on this:

(cd .; for x in COPYING COPYRIGHT README CHANGES THANKS doc/*.pod doc/*.txt doc/*.png; do \
/usr/bin/install -c -m 644 $x /usr/share/doc/mrtg2; done)
/bin/sh ./mkinstalldirs /usr/share/man/man1
for x in ./doc/*.1; do \
/usr/bin/install -c -m 644 $x /usr/share/man/man1; done
MRTG-POST
MRTG installed OK
Subcomponent 'mrtg' installed OK
Subcomponents installed OK
RESULT=0
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1

===================
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 XI technical support.

The script that failed was: './B-installxi'
[root@esu2v238 nagiosxi]#


Last bit of the install.log:

Code: Select all

SELinux already configured - skipping.
Database backups already configured - skipping.
PHP limits already configured - skipping.
Sourceguardian already configured - skipping.
MRTG already configured - skipping.
Step completed OK
PHP timezone already configured - skipping.
Subcomponents already configured - skipping.
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Reloading httpd: 
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR:  role "nagiosxi" already exists
ERROR:  database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
Nagios XI Installation Log
==========================
DATE: Tue Jan 20 15:37:21 EST 2015

DISTRO INFO:
RedHatEnterpriseServer
6.4
x86_64

THIS IS AN UPGRADE!

OLD VERSION:
full=2014R2.0
major=2014
minor=R2.0
releasedate=2014-11-11
release=409

INSTALLING:
full=2014R2.0
major=2014
minor=R2.0
releasedate=2014-11-11
release=409

Repos already configured - exiting.
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run your package manager's update command
Users/groups already configured - skipping.
Database servers already initialized - skipping.
/etc/services already updated - skipping.
sudoers already configured - skipping.
Firewall rules already configured - skipping.
Step completed OK
SELinux already configured - skipping.
Database backups already configured - skipping.
PHP limits already configured - skipping.
Sourceguardian already configured - skipping.
MRTG already configured - skipping.
Step completed OK
PHP timezone already configured - skipping.
Subcomponents already configured - skipping.
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Reloading httpd: 
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR:  role "nagiosxi" already exists
ERROR:  database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
Thoughts?

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 1:44 pm
by tgriep
Run this and do the install again.

Code: Select all

cd /tmp/nagiosxi
touch init-xidb

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 1:51 pm
by JakeHatMacys
tgriep wrote:Run this and do the install again.

Code: Select all

cd /tmp/nagiosxi
touch init-xidb
Failed right away now :/

Code: Select all

[root@esu2v238 nagiosxi]# ./fullinstall
========================
Nagios XI Full Installer
========================

This script will do a complete install of Nagios XI by executing all necessary sub-scripts.

IMPORTANT: This script should only be used on a 'clean' install of CentOS or RedHat. Do NOT use this on a system that
has been tasked with other purposes or has an existing install of Nagios Core. To create such a clean install you
should have selected ONLY the 'Base' package in the OS installer.
Do you want to continue? [Y/n] y
Proceeding with installation...
Checking MySQL credentials...
Stored MySQL password validated.
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run your package manager's update command
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-dbservers'...
Database servers already initialized - skipping.
RESULT=0
Running './4-services'...
/etc/services already updated - skipping.
RESULT=0
Running './5-sudoers'...
sudoers already configured - skipping.
RESULT=0
Running './6-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './7-sendmail'...
Step completed OK
RESULT=0
Running './8-selinux'...
SELinux already configured - skipping.
RESULT=0
Running './9-dbbackups'...
Database backups already configured - skipping.
RESULT=0
Running './10-phplimits'...
PHP limits already configured - skipping.
RESULT=0
Running './11-sourceguardian'...
Sourceguardian already configured - skipping.
RESULT=0
Running './12-mrtg'...
MRTG already configured - skipping.
RESULT=0
Running './13-cacti'...
Step completed OK
RESULT=0
Running './14-timezone'...
PHP timezone already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR:  role "nagiosxi" already exists
ERROR:  database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1

===================
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 XI technical support.

The script that failed was: './B-installxi'
[root@esu2v238 nagiosxi]#

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 2:29 pm
by tgriep
Edit the file called "B-installxi" in the /tmp/nagiosxi folder and remove the following section starting at line 91 and run the install.

# Initialize database
if ! ./init-xidb; then
echo "ERROR: Nagios XI database was not setup properly - exiting." >&2
exit 1
fi

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 3:23 pm
by JakeHatMacys
More from the B install:

Code: Select all

Installing PhantomJS...
--2015-01-21 15:15:55--  http://assets.nagios.com/downloads/nagiosxi/packages/phantomjs-1.9.8-linux-x86_64.tar
Resolving assets.nagios.com... 72.14.181.71
Connecting to assets.nagios.com|72.14.181.71|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3694 (3.6K) [text/html]
Saving to: âphantomjs-1.9.8-linux-x86_64.tarâ



2015-01-21 15:15:55 (336 MB/s) - âphantomjs-1.9.8-linux-x86_64.tarâ

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
RESULT=1

===================
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 XI technical support.

The script that failed was: './B-installxi'
[root@esu2v238 nagiosxi]#
I think I'm gonna have to do that manually, I think the files getting cut off on the wget and failing on the tar... Could you provide manual steps for that so I don't mess it up? Then the spot where I can delete it from the script once it's manually installed?

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 3:58 pm
by tgriep
Are you behind a proxy server?

When I run the wget command to download the phantomjs file like below

wget http://assets.nagios.com/downloads/nagi ... x86_64.tar

I get this output.

--2015-01-21 14:50:59-- http://assets.nagios.com/downloads/nagi ... x86_64.tar
Resolving assets.nagios.com... 72.14.181.71
Connecting to assets.nagios.com|72.14.181.71|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13163325 (13M) [application/x-tar]
Saving to: âphantomjs-1.9.8-linux-x86_64.tar.1â

100%[====================================================================================================================================>] 13,163,325 1.47M/s in 8.5s

2015-01-21 14:51:08 (1.48 MB/s) - âphantomjs-1.9.8-linux-x86_64.tar.1âsaved [13163325/13163325]

The file size is 13 megs but it looks like yours didn't finish the download.
Also, the download file type is [application/x-tar] and yours says [text/html] which leads us to believe you are behind a proxy.

Re: Error during XI install on RHEL 6.4

Posted: Wed Jan 21, 2015 4:05 pm
by JakeHatMacys
I believe the server is yeah... not sure why it's connecting fine and then not getting the whole download though... Problem seems to be sporadic with certain connections.

I manually DL'd it fine and threw it in my /tmp directory, thinking can I comment out the wget in the script and place the file where it needs to be instead?

(If so could you show me where to do this?)