Page 1 of 1

Manually Installing Log Server elasticsearch issue

Posted: Thu Jul 07, 2016 6:58 am
by mrmarco88
Hi

i'm trying to install Log Server on CentOS Linux release 7.0.1406 (Core). By following the procedure the link shows me:
"Waiting for database startup"

My server has very restricted internet access so i had to install manually all the packages required from fullinstall script.
I had to disable the ntpdate because the NTP server is not reachable.
I've followed the similar topic https://support.nagios.com/forum/viewto ... se#p146127 but my elasticsearch doesn't log anithing!

if i restart the servervice as root with:
[root@localhost var]# service elasticsearch start
Starting elasticsearch (via systemctl): [ OK ]

If i check the status:

Code: Select all

[root@localhost var]# service elasticsearch status
● elasticsearch.service - LSB: This service manages the elasticsearch daemon
   Loaded: loaded (/etc/rc.d/init.d/elasticsearch)
   Active: active (exited) since Thu 2016-07-07 13:50:09 CEST; 18s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3846 ExecStop=/etc/rc.d/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)
  Process: 3866 ExecStart=/etc/rc.d/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.security.AccessController.doPrivileged(Native Method)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Jul 07 13:50:10 localhost.localdomain elasticsearch[3866]: Could not find the main class: org.elasticsearch.bootstrap.Elasticsearch.  Program will exit.
the poller.log file:

Code: Select all

[root@localhost var]# cat /usr/local/nagioslogserver/var/poller.log
Updating Cluster Hosts File
ERROR: Connection to elasticsearch cannot be made
Updating Elasticsearch with instance...
cat: /var/run/elasticsearch/elasticsearch.pid: No such file or directory
ERROR: Connection to elasticsearch cannot be made
Updating Cluster Hosts File
ERROR: Connection to elasticsearch cannot be made
Updating Elasticsearch with instance...
cat: /var/run/elasticsearch/elasticsearch.pid: No such file or directory
ERROR: Connection to elasticsearch cannot be made
Updating Cluster Hosts File
ERROR: Connection to elasticsearch cannot be made
Updating Elasticsearch with instance...
cat: /var/run/elasticsearch/elasticsearch.pid: No such file or directory
ERROR: Connection to elasticsearch cannot be made
Finished Polling.
the curl command on localhost:9200 return :
curl: (7) Failed connect to localhost:9200; Connection refused

the netsat shows that anything is running on 9200 port.

Can you help me?

Re: Manually Installing Log Server elasticsearch issue

Posted: Thu Jul 07, 2016 11:53 am
by hsmith
What version of Elasticsearch did you install?

Re: Manually Installing Log Server elasticsearch issue

Posted: Fri Jul 08, 2016 3:01 am
by mrmarco88
Hi hsmith,
thank you for your answer,

however i've started by install the 2.0.0 version, than i've installed the 2.3.0 version by using the command:
python setup.py install

I din't delete anything when i installed the 2.3.0 version...i simply ran that command...is correct? there is a way to clean up all system from Elasticsearch installation?

Re: Manually Installing Log Server elasticsearch issue

Posted: Fri Jul 08, 2016 9:54 am
by rkennedy
You cannot just install elasticsearch 2.3 on your own as NLS does not support going up to 2.3. NLS does not expect this, and I'm guessing there is a configuration error somewhere.

I recommend starting with a clean minimal machine, and then running through the fullinstall once again. It will work without issues as we will install elasticsearch in conjunction with kibana / logstash.

Re: Manually Installing Log Server elasticsearch issue

Posted: Tue Jul 26, 2016 8:44 am
by mrmarco88
Hi rkennedy,

thank you for your answer.
My server is behind very restricted security policy and i cannot reach the repository for download all the needed packages. So i'm still trying to use NLS because i think is very useful.
You are really not able to help me?

i've tried to uninstall elasticsearch by using pip uninstall elasticsearch and it worked.
than i installed Elasticsearch 2.0 version. But i got the same problem.

If i try to restart Elasticsearch....

Code: Select all

[root@localhost knapsack]# service elasticsearch status
● elasticsearch.service - LSB: This service manages the elasticsearch daemon
   Loaded: loaded (/etc/rc.d/init.d/elasticsearch)
   Active: active (exited) since Tue 2016-07-26 15:37:53 CEST; 4s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 26349 ExecStop=/etc/rc.d/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)
  Process: 26356 ExecStart=/etc/rc.d/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.security.AccessController.doPrivileged(Native Method)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: Could not find the main class: org.elasticsearch.bootstrap.Elasticsearch.  Program will exit.

I really don't want to give up to use this tool...

Re: Manually Installing Log Server elasticsearch issue

Posted: Tue Jul 26, 2016 10:06 am
by rkennedy
mrmarco88 wrote:Hi rkennedy,

thank you for your answer.
My server is behind very restricted security policy and i cannot reach the repository for download all the needed packages. So i'm still trying to use NLS because i think is very useful.
You are really not able to help me?

i've tried to uninstall elasticsearch by using pip uninstall elasticsearch and it worked.
than i installed Elasticsearch 2.0 version. But i got the same problem.

If i try to restart Elasticsearch....

Code: Select all

[root@localhost knapsack]# service elasticsearch status
● elasticsearch.service - LSB: This service manages the elasticsearch daemon
   Loaded: loaded (/etc/rc.d/init.d/elasticsearch)
   Active: active (exited) since Tue 2016-07-26 15:37:53 CEST; 4s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 26349 ExecStop=/etc/rc.d/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)
  Process: 26356 ExecStart=/etc/rc.d/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.security.AccessController.doPrivileged(Native Method)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Jul 26 15:37:53 localhost.localdomain elasticsearch[26356]: Could not find the main class: org.elasticsearch.bootstrap.Elasticsearch.  Program will exit.

I really don't want to give up to use this tool...
I am willing to help you, but you aren't listening.
You cannot just install elasticsearch 2.3 on your own as NLS does not support going up to 2.3. NLS does not expect this, and I'm guessing there is a configuration error somewhere.
Currently, NLS 1.4.2 is on Elasticsearch 1.6.0 -- it isn't going to support a higher version. Because of how NLS is packaged, it needs to be installed on a clean machine, with no pre-requisities already existing.

Re: Manually Installing Log Server elasticsearch issue

Posted: Tue Jul 26, 2016 10:27 am
by mrmarco88
Thank you for your help,

but maybe you dind't understand that from my CENTOS 7 server these commands (extracted from fullinstall script):

python get-pip.py

pip install argparse jsonselect elasticsearch-curator==3.4.0

won't work. A timeout will occur because of unreachable servers.
Even if i'm gonna clean all my system by deleting all the installed files manually or with the pip uninstall, the NLS installation by using script won't work.

So, maybe i didn't understand your
it needs to be installed on a clean machine, with no pre-requisities already existing
Is there any way to install NLS (on a clean machine) by using the proper package version (ex, 1.6 for elasticsearch) ? Or the way it is packaged can't allow this?

Re: Manually Installing Log Server elasticsearch issue

Posted: Wed Jul 27, 2016 1:38 am
by Box293
Nagios Log Server uses specific versions of all the products that make "Nagios Log Server" work. While there are newer versions of some of these products they are not supported.

You can't choose which versions of these products you want to run.