Logstash hangs every time


(Daniel Lohin) #1

I have Centos 7 and installed from the repositories. I am using openjdk 1.8. I have been messing with getting logstash open for a while, and I can't even make it work from the command line.. When I launch it from the command line it just indefinately hangs every time.

The command that just takes input and outputs the data never finishes (need to ctrl-c it):
[root@thor logstash]# bin/logstash -e 'input { stdin { } } output { stdout {} }'
adsf
asdf
^C[root@thor logstash]#

Config test hangs...

[root@thor logstash]# bin/logstash -configtest

I can even add jibberish..
[root@thor logstash]# bin/logstash -whatever

^C[root@thor logstash]#

If I try and start the service

[root@thor logstash]# systemctl start logstash

/var/log/messages shows:
Dec 5 21:30:08 thor systemd: Started logstash.
Dec 5 21:30:08 thor systemd: Starting logstash...

Nothing gets created in /var/log/logstash
[root@thor logstash]# ls -la /var/log/logstash/
total 4
drwxrwxr-x. 2 logstash root 6 Dec 5 21:31 .
drwxr-xr-x. 12 root root 4096 Dec 4 20:51 ..

It is like it is getting hung somewhere and I have no idea what to do.....


(Mark Walkom) #2

Take a look at https://github.com/jruby/jruby/wiki/Improving-startup-time, specifically adding more entropy.


(Daniel Lohin) #3

Thanks, i will look into that. It is running on kvm so it could make sense running out of entropy. I believe there is a way to get entropy from the host using intels prng as well.


(Daniel Lohin) #4

My plan is to use virtio-rng and Intel's DRNG. Intel's DRNG gets more entropy from the CPU and then virtio-rng passes this entropy to the VMs. I will keep this post updated if this works. I found the guide here:


(Daniel Lohin) #5

Thanks! The RDRAND and VIRTIO-RNG worked in KVM. I would have never have figured this out without you! For anyone interested. Virtio-rng allows the vms to steal entropy from the host. To generate random numbers faster on the host, you can use an Intel technology called RDRAND available in newish CPUs. This generates entropy really fast. Logstash now starts really fast.

https://www.certdepot.net/rhel7-get-started-random-number-generator/+&cd=1&hl=en&ct=clnk&gl=us


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.