# Logstash 5 not running

**URL:** https://discuss.elastic.co/t/logstash-5-not-running/64449
**Category:** Logstash
**Created:** [October 31, 2016, 1:20pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449 "2016-10-31T13:20:40Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![Mahdy\_S](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Mahdy\_S](https://discuss.elastic.co/u/Mahdy_S)
#### Post date: [November 7, 2016, 3:24pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/41 "2016-11-07T15:24:40Z")

</div>

Thanks! So I used upstart (`sudo initctl start logstash`) since I have ubuntu 14.04. The `ps aux | grep logstash` command gave the following output: `logstash 26825 121 9.2 3441576 375020 ? SNsl 14:54 0:16 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Xms256m -Xss2048k -Djffi.boot.library.path=/usr/share/logstash/vendor/jruby/lib/jni -Xbootclasspath/a:/usr/share/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/usr/share/logstash/vendor/jruby -Djruby.lib=/usr/share/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main --1.9 /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash`.  
It doesn't seem like a performance problem for me since CPU usage is close to 0% and memory usage is comparable to other machines (most of the memory is used by elasticsearch and logstash). The strange thing is that once logstash starts parsing goes quickly but it takes too long to start (around one hour from entering the start command).

---

<div class="post-metadata">

### Author: ![w0lverine](https://avatars.discourse-cdn.com/v4/letter/w/90db22/32.png) [@w0lverine](https://discuss.elastic.co/u/w0lverine)
#### Post date: [November 7, 2016, 3:36pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/42 "2016-11-07T15:36:00Z")

</div>

It seems like it is up and running... And I had the same problem the other day once I started logstash, it took around 5-10 minutes to get logstash to run and was using 48% of my cpu and I had only 8 Gigs of memory left. Switched to 12 GRAM and 100 GB of disk space with 2 CPUs and it went down to 20 seconds to initializing my config file. What is the CPU usage during your initialization of your config file?

---

<div class="post-metadata">

### Author: ![Mahdy\_S](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Mahdy\_S](https://discuss.elastic.co/u/Mahdy_S)
#### Post date: [November 7, 2016, 3:43pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/43 "2016-11-07T15:43:56Z")

</div>

Actually when it's running then CPU usage is more than 100% (which means I assume both processors are running).

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [November 7, 2016, 3:55pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/44 "2016-11-07T15:55:57Z")

</div>

> [@w0lverine](#):
>
> the other day once I started logstash, it took around 5-10 minutes to get logstash to run

While this can be from insufficient memory, you may actually be suffering from a lack of entropy. We're improving the documentation about this, in [this ticket](https://github.com/elastic/logstash/issues/6117). See the [JRuby Wiki entry](https://github.com/jruby/jruby/wiki/Improving-startup-time#ensure-your-system-has-adequate-entropy) about the same issue. People who have followed [these instructions](https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged) have cut 10 minute start times to less than 20 seconds.

---

<div class="post-metadata">

### Author: ![Generalibm\_Jang](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@Generalibm\_Jang](https://discuss.elastic.co/u/Generalibm_Jang)
#### Post date: [November 9, 2016, 8:02am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/45 "2016-11-09T08:02:08Z")

</div>

Not `startup` but `systemd` in Centos 7, you should type the command  
`sudo systemctl enable logstash.service`  
if you want Logstash to be started when your computer startup.

---

<div class="post-metadata">

### Author: ![Mahdy\_S](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Mahdy\_S](https://discuss.elastic.co/u/Mahdy_S)
#### Post date: [November 9, 2016, 10:12am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/46 "2016-11-09T10:12:05Z")

</div>

Thanks for the valuable info! This looks to have solved my problem as well.

---

<div class="post-metadata">

### Author: ![Vishal\_Sharma1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_sharma1/32/20207_2.png) [@Vishal\_Sharma1](https://discuss.elastic.co/u/Vishal_Sharma1)
#### Post date: [November 12, 2016, 7:39am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/47 "2016-11-12T07:39:59Z")

</div>

ok so my original question is still unanswered. What is the method to run logstash from command line as mentioned in the official document at [https://www.elastic.co/guide/en/logstash/current/first-event.html](https://www.elastic.co/guide/en/logstash/current/first-event.html),  
if i have installed it from repo?. Also there are no changes in the official document about the issue. People keep talking about breaking change, but think about someone who just landed to the official document and trying to run logstash for the first time.

---

<div class="post-metadata">

### Author: ![Hans](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@Hans](https://discuss.elastic.co/u/Hans)
#### Post date: [November 12, 2016, 2:01pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/48 "2016-11-12T14:01:23Z")

</div>

HI, I also use Centos 7 for all my installations and follow the following procedure for installing logstash and running logstash:

Install  
[https://www.elastic.co/guide/en/logstash/current/installing-logstash.html#package-repositories](https://www.elastic.co/guide/en/logstash/current/installing-logstash.html#package-repositories)  
run the following commands:  
rpm --import [https://artifacts.elastic.co/GPG-KEY-elasticsearch](https://artifacts.elastic.co/GPG-KEY-elasticsearch)  
vi /etc/yum.repos.d/logstash.repo  
paste the Repo information  
sudo yum install logstash -y

After I add the configuration file to the following directory:  
/etc/logstash/conf.d/file.conf

Now it is just to run the configuration file under test with the following command:  
sudo -u logstash /usr/share/logstash/bin/logstash --path.settings /etc/logstash -f /etc/logstash/conf.d/file.conf --config.test\_and\_exit

Usually I also have a second window open and follow the logs to see if there are any errors:  
tail -f /var/log/logstash/logstash-plain.log

After this you just remove the last part "--config.test\_and\_exit" and add "&" to continue running this. The process will not start automatically when stopped or restarted, if this is required you can look at some sort of crontab config.

Hope this helps

---

<div class="post-metadata">

### Author: ![Vishal\_Sharma1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_sharma1/32/20207_2.png) [@Vishal\_Sharma1](https://discuss.elastic.co/u/Vishal_Sharma1)
#### Post date: [November 12, 2016, 2:22pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/49 "2016-11-12T14:22:04Z")

</div>

well my exact question was in official documents just after the installation from the repo it says run below  
bin/logstash -e 'input { stdin { } } output { stdout {} }' and this is not working. Did you get what i mean?

---

<div class="post-metadata">

### Author: ![drestuart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drestuart/32/13180_2.png) [@drestuart](https://discuss.elastic.co/u/drestuart)
#### Post date: [November 15, 2016, 4:49pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/50 "2016-11-15T16:49:17Z")

</div>

Hi theuntergeek, I understand that it's not simple to fix this issue quickly, but have you considered updating the documentation? I ran into this issue while following the instructions at [Stashing Your First Event](https://www.elastic.co/guide/en/logstash/current/first-event.html) after installing from a package manager, and I've spent way too long trying to get this working.

I don't want to come off as a jerk here, but honestly, if I weren't doing this for work, I'd have already given up on logstash and started looking for another system.

---

<div class="post-metadata">

### Author: ![Rinat](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Rinat](https://discuss.elastic.co/u/Rinat)
#### Post date: [January 6, 2017, 8:30am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/51 "2017-01-06T08:30:38Z")

</div>

I had the same exact issue except that it would just hang and would not produce any output. I spent enormous amount of time going through the documentation trying to figure out what the problem was. In the logs it was saying that it can't find the conf file in /etc/logstash/conf.d even though there was one. It ended up being the path permissions problem. As soon as I changed it it worked.

---

<div class="post-metadata">

### Author: ![Vishal\_Sharma1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_sharma1/32/20207_2.png) [@Vishal\_Sharma1](https://discuss.elastic.co/u/Vishal_Sharma1)
#### Post date: [January 6, 2017, 11:24am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/52 "2017-01-06T11:24:15Z")

</div>

path permission issue? like what explain more

---

<div class="post-metadata">

### Author: ![Rinat](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Rinat](https://discuss.elastic.co/u/Rinat)
#### Post date: [January 6, 2017, 11:50am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/53 "2017-01-06T11:50:28Z")

</div>

Well, it was simple. Logstash couldn't read the config file in /etc/logstash/conf.d because file itself was locked down. So, once I granted the file right permissions with chmod I was able to get the pipeline working etc.

Hope this helps

---

<div class="post-metadata">

### Author: ![Vishal\_Sharma1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_sharma1/32/20207_2.png) [@Vishal\_Sharma1](https://discuss.elastic.co/u/Vishal_Sharma1)
#### Post date: [January 6, 2017, 11:51am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/54 "2017-01-06T11:51:35Z")

</div>

thats strange let me check.

---

<div class="post-metadata">

### Author: ![Rinat](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Rinat](https://discuss.elastic.co/u/Rinat)
#### Post date: [January 7, 2017, 6:16pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/55 "2017-01-07T18:16:24Z")

</div>

It appears that my logstash is working when I use path.settings command but this is the error I get.

-bash-4.1$ sudo /usr/share/logstash/bin/logstash -e 'input { stdin { } } output { stdout {} }'  
WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults  
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs to console  
The stdin plugin is now waiting for input:

---

<div class="post-metadata">

### Author: ![jjstephe](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jjstephe](https://discuss.elastic.co/u/jjstephe)
#### Post date: [January 14, 2017, 4:39pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/56 "2017-01-14T16:39:36Z")

</div>

What ended up working for you? I am having the same frustrations and I even get different errors in the log in successive attempts without even changing the command. Sometimes just randomly stopping "pipeline:id=\>main" and other times with the no config conf.d error.

I did a 3Gig import last night and even using the same command today - without rebooting or changing anything, trying to do a different file, it won't work. And this file, rather than 3Gig is just about 200K. I have tried 'ln -s' and creating a file in conf.d, I've even 'ln -s' conf.d to /etc/logstash...

Can anyone shed some light on any updates? I am using the: " bin/logstash --path.settings=/etc/logstash -f [path/file] " command.

---

<div class="post-metadata">

### Author: ![drestuart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drestuart/32/13180_2.png) [@drestuart](https://discuss.elastic.co/u/drestuart)
#### Post date: [January 14, 2017, 11:34pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/57 "2017-01-14T23:34:52Z")

</div>

Hi Jon,

I think I ended up creating an empty config file as described [here](https://discuss.elastic.co/t/logstash-5-not-running/64449/16). I don't remember exactly because this setup was just for practice.

For the real implementation, we used Logstash and Elasticsearch via docker containers, [here](https://hub.docker.com/_/logstash/) and [here](https://hub.docker.com/_/elasticsearch/). Docker ended up being a very painless way to do this, and those containers are officially maintained by Elastic.

HTH!

---

<div class="post-metadata">

### Author: ![jjstephe](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jjstephe](https://discuss.elastic.co/u/jjstephe)
#### Post date: [January 15, 2017, 3:04pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/58 "2017-01-15T15:04:08Z")

</div>

Thanks for the reply and the Docker info!

---

<div class="post-metadata">

### Author: ![Manny\_Huerta](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Manny\_Huerta](https://discuss.elastic.co/u/Manny_Huerta)
#### Post date: [February 28, 2017, 2:00am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/59 "2017-02-28T02:00:07Z")

</div>

you da man, Hans!

---

<div class="post-metadata">

### Author: ![Oves](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@Oves](https://discuss.elastic.co/u/Oves)
#### Post date: [March 17, 2017, 6:28pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/60 "2017-03-17T18:28:10Z")

</div>

I got the same problem:confused:

[Previous page](https://discuss.elastic.co/t/logstash-5-not-running/64449.md?page=2)

[Next page](https://discuss.elastic.co/t/logstash-5-not-running/64449.md?page=4)
