# Logstash failed to write in ES!

**URL:** <https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544>\
**Category:** Logstash\
**Created:** [December 5, 2018, 1:22pm UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544 "2018-12-05T13:22:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [December 5, 2018, 1:22pm UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544/1 "2018-12-05T13:22:21Z")

</div>

```
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
[WARN] 2018-12-05 18:50:13.987 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO] 2018-12-05 18:50:14.004 [LogStash::Runner] runner - Starting Logstash {"logstash.version"=>"6.5.1"}
[INFO] 2018-12-05 18:50:17.054 [Converge PipelineAction::Create<main>] pipeline - Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[INFO] 2018-12-05 18:50:17.324 [Converge PipelineAction::Create<main>] pipeline - Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0xd1a94a2 run>"}
[INFO] 2018-12-05 18:50:17.391 [Ruby-0-Thread-1: /usr/share/logstash/lib/bootstrap/environment.rb:6] agent - Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[INFO] 2018-12-05 18:50:17.430 [[main]<file] observingtail - START, creating Discoverer, Watch with file and sincedb collections
[INFO] 2018-12-05 18:50:17.761 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9601}
```

---

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [December 6, 2018, 9:43am UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544/2 "2018-12-06T09:43:36Z")

</div>

Hello,  
Make sure you set the java path in environment variables.  
then  
check in command prompt,  
java -version

---

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [December 6, 2018, 9:44am UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544/3 "2018-12-06T09:44:55Z")

</div>

> [@balumurari1](#):
>
> Make sure you set the java path in environment variables.

how to check that on ubuntu 16.04 ?

---

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [December 6, 2018, 9:49am UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544/4 "2018-12-06T09:49:53Z")

</div>

> [@balumurari1](#):
>
> check in command prompt,  
> java -version

As i said,  
open command prompt, you also have it in ubuntu

---

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [December 6, 2018, 9:51am UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544/5 "2018-12-06T09:51:40Z")

</div>

> [@balumurari1](#):
>
> Make sure you set the java path in environment variables.  
> then

🙂  
not that ..u said to set java path in env variable, that is what i am asking how to do ?

---

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [December 6, 2018, 9:54am UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544/6 "2018-12-06T09:54:30Z")

</div>

set environment variables as follows

Edit the system Path file /etc/profile

```auto
sudo gedit /etc/profile

```

Add following lines in end

```auto
JAVA_HOME=/usr/lib/jvm/jdk1.8.0
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH

```

or

follow this path

> **[How to Set Up Your Java\_Home Path in Ubuntu](https://www.wikihow.com/Set-Up-Your-Java_Home-Path-in-Ubuntu)**
>
> This short article will explain how to set your JAVA\_HOME Environment path in your /etc/bash.basrc profile. Many Applications today look for the JAVA\_HOME path, in order to function correctly. Launch the Terminal and sudo su to root.

---

<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, 2019, 9:54am UTC](https://discuss.elastic.co/t/logstash-failed-to-write-in-es/159544/7 "2019-01-03T09:54:56Z")

</div>

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