Installation messed up

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Installation messed up

Post by nathanplatt »

Hi Guys,

I've been trying to get logserver installed on my Centos 7 system and due to a bit of HTTP issues I've messed up the original install. Can someone help me uninstall it so I can reinstall it correctly?

Nathan
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Installation messed up

Post by mcapra »

I would strongly recommend starting with a new clean minimal VM. It will save you an awful lot of time. If you need help migrating data, let us know and we can do a write-up.
Former Nagios employee
https://www.mcapra.com/
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Installation messed up

Post by nathanplatt »

I'll love too, but this is a physical server and i can't just wipe it :(
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Installation messed up

Post by nathanplatt »

This is what i've tried so far

All i get is this when accessing the site;

http://192.168.1.200/nagioslogserver/#/dashboard

Error Could not contact Elasticsearch at http://192.168.1.200/nagioslogserver/api/backend. Please ensure that Elasticsearch is reachable from your system.

Code: Select all

[root@support www]# nano config.js
[root@support www]# service httpd restart
Redirecting to /bin/systemctl restart  httpd.service
[root@support www]# cd /tmp/
[root@support tmp]# ls
6MMMmAyvVD         hsperfdata_root  nagiosgraph-1.5.2         nagioslogserver-1.4.2.tar.gz   systemd-private-23ff6cf437814afe91929d61bd8c7a7b-httpd.service-G1U5Sm
9sBnCyADjq         huxzjANS6s       nagiosgraph-1.5.2.tar.gz  nagioslogserver-latest.tar.gz  systemd-private-23ff6cf437814afe91929d61bd8c7a7b-ntpd.service-1rnMb9
hsperfdata_nagios  jna--1053006215  nagioslogserver           perfata.log
[root@support tmp]# cd nagioslogserver/
[root@support nagioslogserver]# ls
addnode               CHANGELOG.txt  get-pip.py     install.log    licenses  nagioslogserver  subcomponents
build_dev_tarball.py  fullinstall    installed.all  libinstall.sh  mibs      sourceguardian   upgrade
[root@support nagioslogserver]# rm installed.all
rm: remove regular empty file ‘installed.all’? y
[root@support nagioslogserver]# ./fullinstall

Nagios Log Server Installation
==============================
DATE: Fri 28 Oct 15:24:23 BST 2016

DISTRO INFO:
CentOS
7.2.1511
x86_64

Running 'setup_local_syslog'...
Redirecting to /bin/systemctl restart  rsyslog.service
setup_local_syslog step completed OK
Running 'prereqs'...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.cov.ukservers.com
 * epel: fr.mirror.babylon.network
 * extras: mirror.cov.ukservers.com
 * updates: mirror.sov.uk.goscomb.net
Package byacc-1.9.20130304-3.el7.x86_64 already installed and latest version
Package cairo-devel-1.14.2-1.el7.x86_64 already installed and latest version
Package gcc-4.8.5-4.el7.x86_64 already installed and latest version
Package glib2-devel-2.42.2-5.el7.x86_64 already installed and latest version
Package glibc-2.17-106.el7_2.8.x86_64 already installed and latest version
Package 1:java-1.7.0-openjdk-1.7.0.111-2.6.7.2.el7_2.x86_64 already installed and latest version
Package libxml2-devel-2.9.1-6.el7_2.3.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package 1:net-snmp-5.7.2-24.el7_2.1.x86_64 already installed and latest version
Package 1:net-snmp-utils-5.7.2-24.el7_2.1.x86_64 already installed and latest version
Package ntp-4.2.6p5-22.el7.centos.2.x86_64 already installed and latest version
Package 1:openssl-1.0.1e-51.el7_2.7.x86_64 already installed and latest version
Package patch-2.7.1-8.el7.x86_64 already installed and latest version
Package pango-devel-1.36.8-2.el7.x86_64 already installed and latest version
Package perl-ExtUtils-MakeMaker-6.68-3.el7.noarch already installed and latest version
Package php-5.4.16-36.3.el7_2.x86_64 already installed and latest version
Package php-cli-5.4.16-36.3.el7_2.x86_64 already installed and latest version
Package pyOpenSSL-0.13.1-3.el7.x86_64 already installed and latest version
Package sendmail-8.14.7-4.el7.x86_64 already installed and latest version
Package sudo-1.8.6p7-17.el7_2.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Package unzip-6.0-15.el7.x86_64 already installed and latest version
Package zip-3.0-10.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
Package php-ldap-5.4.16-36.3.el7_2.x86_64 already installed and latest version
Nothing to do
28 Oct 15:24:37 ntpdate[19199]: adjust time server 158.43.128.33 offset 0.005723 sec
Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages
Cleaning up...
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): jsonselect in /usr/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): elasticsearch-curator==3.4.0 in /usr/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): elasticsearch<2.1.0,>=1.8.0 in /usr/lib/python2.7/site-packages (from elasticsearch-curator==3.4.0)
Requirement already satisfied (use --upgrade to upgrade): click>=3.3 in /usr/lib/python2.7/site-packages (from elasticsearch-curator==3.4.0)
Requirement already satisfied (use --upgrade to upgrade): urllib3<2.0,>=1.8 in /usr/lib/python2.7/site-packages (from elasticsearch<2.1.0,>=1.8.0->elasticsearch-curator==3.4.0)
prereqs step completed OK
Running 'sourceguardian'...
Installing sourceguardian...
Archive:  sourceguardian/ixed4.lin.x86-64.zip
  inflating: /usr/lib64/php/modules/ixed.5.4.lin
Sourceguardian extension found for PHP version 5.4
Sourceguardian extension already in php.ini
sourceguardian step completed OK
Running 'timezone'...
sed: -e expression #1, char 57: unknown option to `s'
timezone step completed OK
Running 'nagioslogserver'...
chgrp: cannot access ‘/var/www/html/nagioslogserver/www/media’: No such file or directory

===================
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: 'nagioslogserver'
[root@support nagioslogserver]# cd /var/www/html/nagioslogserver/
[root@support nagioslogserver]# ls
application  html  lsversion  system
[root@support nagioslogserver]# rm -rf /var/www/html/nagioslogserver/*
[root@support nagioslogserver]# ls /var/www/html/
index.php  nagioslogserver
[root@support nagioslogserver]# cd /var/www/html/
[root@support html]# rm -rf nagioslogserver/
[root@support html]# ls
index.php
[root@support html]# cd /tmp
[root@support tmp]# ls
6MMMmAyvVD         hsperfdata_root  nagiosgraph-1.5.2         nagioslogserver-1.4.2.tar.gz   systemd-private-23ff6cf437814afe91929d61bd8c7a7b-httpd.service-G1U5Sm
9sBnCyADjq         huxzjANS6s       nagiosgraph-1.5.2.tar.gz  nagioslogserver-latest.tar.gz  systemd-private-23ff6cf437814afe91929d61bd8c7a7b-ntpd.service-1rnMb9
hsperfdata_nagios  jna--1053006215  nagioslogserver           perfata.log
[root@support tmp]# cd nagioslogserver/
[root@support nagioslogserver]# ls
addnode               CHANGELOG.txt  get-pip.py         installed.setup_local_syslog  installed.timezone  libinstall.sh  mibs             sourceguardian  upgrade
build_dev_tarball.py  fullinstall    installed.prereqs  installed.sourceguardian      install.log         licenses       nagioslogserver  subcomponents
[root@support nagioslogserver]# ./fullinstall

Nagios Log Server Installation
==============================
DATE: Fri 28 Oct 15:39:01 BST 2016

DISTRO INFO:
CentOS
7.2.1511
x86_64

Running 'setup_local_syslog'...
setup_local_syslog step already completed - skipping
Running 'prereqs'...
prereqs step already completed - skipping
Running 'sourceguardian'...
sourceguardian step already completed - skipping
Running 'timezone'...
timezone step already completed - skipping
Running 'nagioslogserver'...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.cov.ukservers.com
 * epel: fr.mirror.babylon.network
 * extras: mirror.cov.ukservers.com
 * updates: mirror.sov.uk.goscomb.net
Package php-common-5.4.16-36.3.el7_2.x86_64 already installed and latest version
Nothing to do
nagioslogserver step completed OK
Running 'backend'...
Installing Elasticsearch...
Elasticsearch installed OK
Installing Logstash...
Applying Nagios patches to Logstash...
Logstash installed OK
Installing Kibana...
Kibana installed OK
UUID file already exists
backend step completed OK
Running 'install_mibs'...
install_mibs step completed OK
Running 'sudoers'...
sudoers step completed OK
Running 'firewall'...
success
success
success
success
success
success
success
success
success
success
firewall step completed OK
Running 'selinux'...
selinux step completed OK
Running 'test_cluster_connection'...
test_cluster_connection step completed OK
Running 'daemons'...
Note: Forwarding request to 'systemctl enable ntpd.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.
Note: Forwarding request to 'systemctl disable ntpd.service'.
Removed symlink /etc/systemd/system/multi-user.target.wants/ntpd.service.
Note: Forwarding request to 'systemctl enable httpd.service'.
Note: Forwarding request to 'systemctl disable httpd.service'.
Removed symlink /etc/systemd/system/multi-user.target.wants/httpd.service.
daemons step completed OK
Running 'webroot'...
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
webroot step completed OK

Nagios Log Server Installation Success!

You can finish the final setup steps for Nagios Log Server by visiting:
    http:///nagioslogserver/


[root@support nagioslogserver]#
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Installation messed up

Post by hsmith »

Try this to uninstall:

Code: Select all

service logstash stop
service elasticsearch stop
yum erase httpd
rm -rf /usr/local/nagioslogserver
rm -rf /var/www/html/nagioslogserver
rm /etc/rc.d/init.d/elasticsearch
rm /etc/rc.d/init.d/logstash
rm /etc/rsyslog.d/nagioslogserver.conf
rm /etc/cron.d/nagioslogserver
pip uninstall elasticsearch-curator==3.4.0
service crond restart
Last edited by hsmith on Fri Oct 28, 2016 10:13 am, edited 1 time in total.
Former Nagios Employee.
me.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Installation messed up

Post by mcapra »

Thanks Smith!

I would make one alteration:

Code: Select all

pip uninstall elasticsearch-curator==3.4.0
Former Nagios employee
https://www.mcapra.com/
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Installation messed up

Post by nathanplatt »

Thanks guys, go ahead a and close the case.
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Installation messed up

Post by nathanplatt »

FYI, I really did mess-up centos! Ended up rebuilding the server from statch! :D
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Installation messed up

Post by dwhitfield »

Thanks Smith!

I'm going to go ahead and lock this up.
Last edited by dwhitfield on Mon Oct 31, 2016 11:24 am, edited 1 time in total.
Reason: corrected Smith's name
Locked