# Logstash not Starting

**URL:** <https://discuss.elastic.co/t/logstash-not-starting/79148>\
**Category:** Logstash\
**Created:** [March 18, 2017, 9:10pm UTC](https://discuss.elastic.co/t/logstash-not-starting/79148 "2017-03-18T21:10:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AHK](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AHK](https://discuss.elastic.co/u/AHK)\
**Post date:** [March 18, 2017, 9:10pm UTC](https://discuss.elastic.co/t/logstash-not-starting/79148/1 "2017-03-18T21:10:03Z")

</div>

Hello,

I am trying to install ELK & I follow all topic on

> **[How To Install Elasticsearch, Logstash, and Kibana (ELK Stack) on CentOS 7 |...](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-7)**
>
> In this tutorial, we will go over the installation of the Elasticsearch ELK Stack on CentOS 7—that is, Elasticsearch 2.1.x, Logstash 2.1.x, and Kibana 4.3.x. We will also show you how to configure it to gather and visualize the syslogs of your...

when i try this command  
**sudo service logstash configtest**  
Error is  
_Could not find any executable java binary. Please install java in your PATH or set JAVA\_HOME._  
**When Java is installed**

also when i try this command  
**sudo service logstash start**  
**logstash started.**

After  
**sudo service logstash status**  
**_logstash is not running_**

also when i try to see logs, i did't find any log file in  
**_/var/log/logstash/logstash.log_**

even when i print  
**_echo $JAVA\_HOME_**  
**_/usr/java/jdk1.8.0\_45/jre_**

how to find what is issue and fix?

Thanks

---

<div class="post-metadata">

**Author:** ![Sawyer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sawyer/32/15842_2.png) [@Sawyer](https://discuss.elastic.co/u/Sawyer)\
**Post date:** [March 21, 2017, 3:29am UTC](https://discuss.elastic.co/t/logstash-not-starting/79148/2 "2017-03-21T03:29:48Z")

</div>

There could be a few issues. I'm running logstash on 3 production machines with Centos 7.3 Minimal. I had several issues to work through. But honestly, my biggest struggle was various java installers. This one below, which happens to be the one they recommend in the documentation, but I missed it several times reading through. Once you install it, you should get the following when running "java -version"

```
[elasticsearch@blf-logstash-001 logstash]$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

```

![](https://us1.discourse-cdn.com/elastic/original/3X/9/8/98c26d664f776b8b130d0b5970704518bef39c06.png)

There is also a chance that your logstash user doesn't have enough permissions to write to the log file location. So you can chown/chmod that directory. You can also try to give the logstash user sudo rights without password input in visudo:  
sudo visudo  
ADD LINE BELOW  
logstash ALL=(ALL) NOPASSWD: ALL

Finally, make sure you have opened up port 9600/tcp on the firewall. Here is the command if you have firewall-cmd installed.  
sudo firewall-cmd --permanent --add-port=9600/tcp  
sudo systemctl restart firewalld

Hope these ideas help, we need to get that log writing so you can at least get some feed back. Can you post what you have for the yaml config? "/etc/logstash/logstash.yml"

---

<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:** [April 18, 2017, 3:29am UTC](https://discuss.elastic.co/t/logstash-not-starting/79148/3 "2017-04-18T03:29:58Z")

</div>

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