# 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:** 13
**Page:** 4

<div class="post-metadata">

### Author: ![saikrishnagaddipati](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@saikrishnagaddipati](https://discuss.elastic.co/u/saikrishnagaddipati)
#### Post date: [June 20, 2017, 7:27pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/61 "2017-06-20T19:27:12Z")

</div>

Same problem. Did anyone find any workaround or solution?

---

<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: [June 21, 2017, 5:27am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/62 "2017-06-21T05:27:47Z")

</div>

Hi,  
The issue is no more there with latest release. What version you are using?  
Also make sure you run using it something like sudo bin/logstash -e  
Regards  
Vishal

---

<div class="post-metadata">

### Author: ![sehen1900](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@sehen1900](https://discuss.elastic.co/u/sehen1900)
#### Post date: [July 12, 2017, 6:19am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/63 "2017-07-12T06:19:00Z")

</div>

Same trouble. Any benefit response? [😭](https://clipartpig.com/cute-heart-clipart-blue-100955)

---

<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: [July 12, 2017, 9:43am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/64 "2017-07-12T09:43:37Z")

</div>

The issue is due to few things

1. Not enough permission to logstash user
2. Problem with the grok of you conf file in /etc/logstash/conf.d
3. Not enough data is being generated in the log file

---

<div class="post-metadata">

### Author: ![pingwin](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@pingwin](https://discuss.elastic.co/u/pingwin)
#### Post date: [July 19, 2017, 8:23am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/65 "2017-07-19T08:23:32Z")

</div>

Had problem with systemd running logstash. Manualy was ok (with sudo -u logstash /usr/share/logstash/bin/logstash --path.settings=/etc/logstash -f /etc/logstash/conf.d/ &), with startup script not. Tried different things on yum repository install on centos 7. So the only nice configuration for me was:

-clean install  
-i put all my inputs to /etc/logstash/conf.d folder

- i corrected logstash.service to ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash" "--path.config" "/etc/logstash/conf.d"
- systemctl daemon-reload
- systemctl start logstash

All other experiments with symbolic links and so on, were non working.

Hope this helps someone.

---

<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: [July 19, 2017, 8:50am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/66 "2017-07-19T08:50:39Z")

</div>

cool

---

<div class="post-metadata">

### Author: ![softenter](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@softenter](https://discuss.elastic.co/u/softenter)
#### Post date: [August 4, 2017, 3:44pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/67 "2017-08-04T15:44:55Z")

</div>

This worked.  
Location for logstash.service file on ubuntu 16.4 : /etc/systemd/system/logstash.service

---

<div class="post-metadata">

### Author: ![ffernandez](https://avatars.discourse-cdn.com/v4/letter/f/94ad74/32.png) [@ffernandez](https://discuss.elastic.co/u/ffernandez)
#### Post date: [October 14, 2017, 12:54am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/68 "2017-10-14T00:54:07Z")

</div>

I had the same issue. It was a permission problem when using custom grok patterns. Whichever user is running logstash needs read and execute permissions on the folder and files being used for this.

---

<div class="post-metadata">

### Author: ![georgezoto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/georgezoto/32/18855_2.png) [@georgezoto](https://discuss.elastic.co/u/georgezoto)
#### Post date: [January 9, 2018, 10:54pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/69 "2018-01-09T22:54:02Z")

</div>

Hi everyone,

I really admire all the effort put here and I really hope the documentation was corrected, in my honest opinion it is wrong. I never got the -e '...' option to work with or without a /etc/logstash/conf.d/test.conf file.

Just to give other people an idea though what my workaround was, here are the commands that did not work and the one that finally worked for me (on Ubuntu LTS 16.04):

1. Download Debian version of Logstash from here: [https://www.elastic.co/downloads/logstash](https://www.elastic.co/downloads/logstash)

2. Install it: sudo dpkg -i logstash-6.1.1.deb

3. No default permissions changed, I only have one sudo user in this machine (in my previous experience I remember Logstash required to be run as root or sudo user)

sudo ls -ltr /etc/logstash  
total 24  
-rw-r--r-- 1 root root 1659 Dec 17 16:48 startup.options  
-rw-r--r-- 1 root root 1334 Dec 17 16:48 log4j2.properties  
-rw-r--r-- 1 root root 1738 Dec 17 16:48 jvm.options  
-rw-r--r-- 1 root root 6425 Jan 9 16:24 logstash.yml  
drwxrwxr-x 2 root root 4096 Jan 9 17:02 conf.d

1. Default contents of logstash.yml  
sudo grep -v ^# /etc/logstash/logstash.yml  
path.data: /var/lib/logstash  
path.config: /etc/logstash/conf.d/\*.conf  
path.logs: /var/log/logstash

2. Default permissions for /usr/share/logstash  
rwxrwxr-x 10 logstash logstash 4096 Jan 9 16:12 logstash  
sudo ls -ltr /usr/share/logstash/  
total 96  
-rw-r--r-- 1 logstash logstash 589 Dec 17 16:48 LICENSE  
-rw-r--r-- 1 logstash logstash 2276 Dec 17 16:48 CONTRIBUTORS  
-rw-r--r-- 1 logstash logstash 20956 Dec 17 16:50 Gemfile.lock  
-rw-r--r-- 1 logstash logstash 3809 Dec 17 16:51 Gemfile  
-rw-rw-r-- 1 logstash logstash 26953 Dec 17 16:51 NOTICE.TXT  
drwxrwxr-x 2 logstash logstash 4096 Dec 17 16:51 data  
drwxrwxr-x 3 logstash logstash 4096 Jan 9 16:12 tools  
drwxrwxr-x 4 logstash logstash 4096 Jan 9 16:12 vendor  
drwxrwxr-x 5 logstash logstash 4096 Jan 9 16:12 lib  
drwxrwxr-x 2 logstash logstash 4096 Jan 9 16:12 bin  
drwxrwxr-x 4 logstash logstash 4096 Jan 9 16:12 modules  
drwxrwxr-x 4 logstash logstash 4096 Jan 9 16:12 logstash-core  
drwxrwxr-x 3 logstash logstash 4096 Jan 9 16:12 logstash-core-plugin-api

3. I only created the following file:  
cat /etc/logstash/conf.d/stdin-stdout.conf  
input {  
stdin { }  
}

output {  
stdout {}  
}

1. I also manually created and set the permissions for this log file:  
ls -ltr /var/log  
drwxrwxr-x 2 logstash logstash 4096 Jan 9 16:45 logstash

ls -ltr /var/log/logstash/logstash-plain.log  
-rw-rw-r-- 1 logstash logstash 14348 Jan 9 17:43 /var/log/logstash/logstash-plain.log

1. Failed command:  
sudo -u logstash /usr/share/logstash/bin/logstash --path.settings /etc/logstash -e 'input { stdin { } } output { stdout {} }'

Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties  
ERROR: Settings 'path.config' (-f) and 'config.string' (-e) can't be used simultaneously.

1. Failed command:  
sudo -u logstash /usr/share/logstash/bin/logstash --path.settings /etc/logstash

Sending Logstash's logs to ...  
Exit with no output

1. Failed command:  
cd /usr/share/logstash  
sudo -u logstash bin/logstash --path.settings /etc/logstash  
[sudo] password for ...:  
Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties  
Exit with no output

2. Failed command:  
cd /usr/share/logstash  
bin/logstash --path.settings /etc/logstash

Sending Logstash's logs to ...

2018-01-09 17:41:25,582 main ERROR FileManager (/var/log/logstash/logstash-plain.log) java.io.FileNotFoundException: /var/log/logstash/logstash-plain.log (Permission denied) java.io.FileNotFoundException: /var/log/logstash/logstash-plain.log (Permission denied)

1. Failed command:  
cd /usr/share/logstash  
bin/logstash --path.settings /etc/logstash -e 'input { stdin { } } output { stdout {} }'

Sending Logstash's logs to ...

2018-01-09 18:11:28,473 main ERROR FileManager (/var/log/logstash/logstash-plain.log) java.io.FileNotFoundException: /var/log/logstash/logstash-plain.log (Permission denied)

1. Failed command:  
cd /usr/share/logstash  
sudo bin/logstash --path.settings /etc/logstash -e 'input { stdin { } } output { stdout {} }'

Sending ...

ERROR: Settings 'path.config' (-f) and 'config.string' (-e) can't be used simultaneously.

1. Failed command:  
cd ~  
/usr/share/logstash/bin/logstash --path.settings /etc/logstash

Sending ...

2018-01-09 18:14:57,517 main ERROR FileManager (/var/log/logstash/logstash-plain.log) java.io.FileNotFoundException: /var/log/logstash/logstash-plain.log (Permission denied)

1. Finally a working command:  
cd ~  
sudo /usr/share/logstash/bin/logstash --path.settings /etc/logstash

Sending ...

The stdin plugin is now waiting for input:  
I guess there is no -e option for logstash  
2018-01-09T23:17:08.654Z Elasticsearch I guess there is no -e option for logstash  
^C

1. Finally a working command:  
cd /usr/share/logstash  
sudo bin/logstash --path.settings /etc/logstash

Sending ...

The stdin plugin is now waiting for input:  
A good example of what works and what not with logstash is a must!  
2018-01-09T22:42:58.931Z Elasticsearch A good example of what works and what not with logstash is a must!  
^C

1. Failed command:  
cd ~  
sudo mv /etc/logstash/conf.d/stdin-stdout.conf /tmp/

sudo /usr/share/logstash/bin/logstash --path.settings /etc/logstash

Sending ...

[ERROR] 2018-01-09 18:22:42.531 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] sourceloader - No configuration found in the configured sources.

1. Failed command:  
cd ~  
sudo mv /etc/logstash/conf.d/stdin-stdout.conf /tmp/

sudo /usr/share/logstash/bin/logstash --path.settings /etc/logstash -e 'input { stdin { } } output { stdout {} }'  
Sending ...  
ERROR: Settings 'path.config' (-f) and 'config.string' (-e) can't be used simultaneously.

1. Kinda Failed command:  
cd ~  
sudo mv /etc/logstash/conf.d/stdin-stdout.conf /tmp/

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 errors to the console  
The stdin plugin is now waiting for input:  
what ?  
2018-01-09T23:25:14.561Z Elasticsearch what ?

In the past in Logstash 5.6, I looked back at my notes and I see Logstash worked just fine as root but I can't remember if it worked with the -e option. Something tells me it did work:  
/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/some.conf --path.settings=/etc/logstash

My questions and many others I assume are:  
Q1) What is the quickest way for a new user to use Logstash ?  
Q2) What is the production recommended way to run Logstash and continually ingest data from an increasing number of data sources continually ?

Feel free to ask me any clarification question,  
George

---

<div class="post-metadata">

### Author: ![georgezoto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/georgezoto/32/18855_2.png) [@georgezoto](https://discuss.elastic.co/u/georgezoto)
#### Post date: [January 10, 2018, 5:28pm UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/70 "2018-01-10T17:28:18Z")

</div>

Look also at this topic:

> [@Logstash requires setting a file](https://discuss.elastic.co/t/logstash-requires-setting-a-file/64658):
>
> Logstash Info error: A setting file is missing I installed the deb file of logstash 5.0 and I starting logstash for the first time. I get an INFO error: INFO: Logstash requires a setting file which is typically located in $LS\_HOME/config or /etc/logstash. If you installed Logstash through a package and are starting it manually please specify the location to this settings file by passing in "--path.settings=/path/.." ERROR: Failed to load settings file from "path.settings". Aborting... path.s…

and issues resolved:

> <https://github.com/elastic/logstash/issues/6164>
>
> Logstash installed via rpm and apt packages cannot be manually started with \`-e\`… flag. \`-e\` flag's behavior is to merge config string supplied via command line to config file supplied via \`-f\`. Now, in packages, \`logstash.yml\` is implicitly setting \`path.config\` to \`/etc/logstash/conf.d/\*\`. This means whenever a user does 
> 
> \`\`\`
> bin/logstash -e 'foo'
> \`\`\`
> 
> it is actually merging contents of directory \`/etc/logstash.conf.d\` 
> 
> For a fresh installation, no config files are found and LS bails with an error.
> 
> A combination of all these issues causes a lot of confusion for first users and users experienced with pre-5.0 behavior where there was no \`logstash.yml\`
> 
> Related: https://github.com/elastic/logstash/issues/6062
> https://discuss.elastic.co/t/logstash-5-not-running/64449
> 
> Also, our documentation for getting started instructs to use \`e\`, so this is needs to be fixed.

> <https://github.com/elastic/logstash/pull/6165>
>
> Previously if both -e and -f was specified, LS required that
> \-f still have vali…d config file(s) before merging. This fixes it
> to either have one of -f or -e provided
> 
> Fixes #6164

---

<div class="post-metadata">

### Author: ![strengthening](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@strengthening](https://discuss.elastic.co/u/strengthening)
#### Post date: [February 13, 2018, 9:43am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/71 "2018-02-13T09:43:26Z")

</div>

> [@georgezoto](#):
>
> input { stdin { } } output { stdout {} }

The resoltion is not only do not use -f -e flag on command,but also you must have right conf in /etc/logstash/conf.d/. more important is the input config like 'input { stdin { } } ' can't start with systemctl .You may change a example config like blew:

input {  
beats {  
port =\> 5000  
}  
}  
output { stdout {} }

---

<div class="post-metadata">

### Author: ![dessy53](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dessy53](https://discuss.elastic.co/u/dessy53)
#### Post date: [July 11, 2021, 11:39am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/72 "2021-07-11T11:39:04Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/f/7ff1ebfacde834abec5a39c3332e205423d35e8e.png)  
my services are up; logstash started yet when i run the below command;  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3cbcfe211c973b9483dd9a8692f5ba7b817c5899.png)  
i am still getting no such directory can not read, pls what could be the way out,  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6e71c0481f075f6409d360f71cfe52b984c54b68.png)  
my /etc/logstash/elastiflow/conf.d/\*.conf"

---

<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: [November 4, 2022, 4:31am UTC](https://discuss.elastic.co/t/logstash-5-not-running/64449/73 "2022-11-04T04:31:10Z")

</div>



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