elastic search not starting

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

elastic search not starting

Post by nagios-nube »

I did the install from source on CentOS. The web server component says it can't connect to elastic search.

Did "service elasticsearch start".That said ok.

But, its not running and the error in /var/log/elasticsearch log file is:
[ERROR][bootstrap ] {1.3.2}: Initialization Failed ... - NullPointerException[null]

I don't see any other errors. Any ideas?
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

Re: elastic search not starting

Post by nagios-nube »

Also, previously, it wouldn't start due to this error:

[WARN ][common.jna ] Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out. Increase RLIMIT_MEMLOCK (limit).

I set MAX_LOCKED_MEMORY to unlimited (saw that on this forum). I then had to set heap size. I set it to 2g - didn't find any docs yet on what that should be set to.
Thanks.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: elastic search not starting

Post by jdalrymple »

There is no doubt something went awry in your installation. Installing on CentOS is a simple process and under normal circumstances never fails.

Can you attach your install.log so we can take a look at it? If you prefer to pm it that's fine. If you have no other investment in this server it might be best to just rebuild and start from a clean slate. The amount of time you've spent troubleshooting your installation failure could have been spent spinning up 5 new servers with 5 working installs :D
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: elastic search not starting

Post by jolson »

You also want to be sure that SELinux isn't fiddling with things.

Code: Select all

sestatus
setenforce 0
Can you test the above and see if it resolves any of your problems? Since this is a new install I am with jdalrymple in that you should re-install if you can't get it working off the bat.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

Re: elastic search not starting

Post by nagios-nube »

I rebuilt my CentOS system from my team's ISO. I had ELK installed before, now nothing like that is installed.

I did the "build from source" method, which got the same "ntpdate' error. My date was already set correctly, so I commented that line out of full install, and re-ran. Again, full install completed successfully.

These are the issues:
1) I can't browse to /nagioslogserver - that gives a 403 error.
2) The files in /var/www/html have owner root:root. The web server runs as apache:apache, and does not have access. This probably explains why none of the nagioslogserver web site works.
3) Elasticsearch does not start and gives these messages:
[2015-03-06 16:17:23,784][WARN ][common.jna ] Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out. Increase RLIMIT_MEMLOCK (ulimit).
[2015-03-06 16:17:23,868][INFO ][node ] [ab354121-fb2a-4fea-a762-7c11fed1c1bb] version[1.3.2], pid[8607], build[dee175d/2014-08-13T14:29:30Z]
[2015-03-06 16:17:23,868][INFO ][node ] [ab354121-fb2a-4fea-a762-7c11fed1c1bb] initializing ...
[2015-03-06 16:17:23,872][ERROR][bootstrap ] {1.3.2}: Initialization Failed ...
- NullPointerException[null]

The bootstrap NullPointerException is the largest problem.

Interestingly, if I go to /usr/local/nagioslogserver/elasticsearch/bin and run "elastic search" from there, ES starts just fine. There seems to be a problem with the way the service starting script (/etc/init.d/elasticsearch) starts it.

Any ideas would be great.
Thanks.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: elastic search not starting

Post by jolson »

I performed a successful installation manually, please review the steps I took below and follow them for a successful install:

Code: Select all

cd /tmp
yum install wget -y
wget assets.nagios.com/downloads/nagios-log-server/nagioslogserver-latest.tar.gz
tar xzf nagioslogserver-latest.tar.gz
cd nagioslogserver
setenforce 0
./fullinstall
This is my CentOS information, are you on a different version by chance (say, 7?):

Code: Select all

uname -a
Linux testelk.jolson 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Please try turning SELinux off, I am sure this is what's messing with your system. To disable it permanently, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked