# Logstash hangs every time

**URL:** <https://discuss.elastic.co/t/logstash-hangs-every-time/68121>\
**Category:** Logstash\
**Created:** [December 6, 2016, 2:33am UTC](https://discuss.elastic.co/t/logstash-hangs-every-time/68121 "2016-12-06T02:33:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dremspider](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dremspider/32/13629_2.png) [@dremspider](https://discuss.elastic.co/u/dremspider)\
**Post date:** [December 6, 2016, 2:33am UTC](https://discuss.elastic.co/t/logstash-hangs-every-time/68121/1 "2016-12-06T02:33:00Z")

</div>

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.....

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 6, 2016, 2:55am UTC](https://discuss.elastic.co/t/logstash-hangs-every-time/68121/2 "2016-12-06T02:55:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dremspider](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dremspider/32/13629_2.png) [@dremspider](https://discuss.elastic.co/u/dremspider)\
**Post date:** [December 6, 2016, 12:10pm UTC](https://discuss.elastic.co/t/logstash-hangs-every-time/68121/3 "2016-12-06T12:10:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dremspider](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dremspider/32/13629_2.png) [@dremspider](https://discuss.elastic.co/u/dremspider)\
**Post date:** [December 6, 2016, 4:02pm UTC](https://discuss.elastic.co/t/logstash-hangs-every-time/68121/4 "2016-12-06T16:02:11Z")

</div>

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:

> **[RHEL7: How to get started with random number generator. - CertDepot](https://www.certdepot.net/rhel7-get-started-random-number-generator/)**
>
> Here you will find RHEL 7 instructions to deal with the random number generator.

---

<div class="post-metadata">

**Author:** ![dremspider](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dremspider/32/13629_2.png) [@dremspider](https://discuss.elastic.co/u/dremspider)\
**Post date:** [December 6, 2016, 10:11pm UTC](https://discuss.elastic.co/t/logstash-hangs-every-time/68121/5 "2016-12-06T22:11:00Z")

</div>

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](https://www.certdepot.net/rhel7-get-started-random-number-generator/+&cd=1&hl=en&ct=clnk&gl=us)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 3, 2017, 10:11pm UTC](https://discuss.elastic.co/t/logstash-hangs-every-time/68121/6 "2017-01-03T22:11:27Z")

</div>

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