# Logstash7.4.2 shutsdown when run from command line attached to elastic search

**URL:** <https://discuss.elastic.co/t/logstash7-4-2-shutsdown-when-run-from-command-line-attached-to-elastic-search/209166>\
**Category:** Logstash\
**Created:** [November 23, 2019, 11:37pm UTC](https://discuss.elastic.co/t/logstash7-4-2-shutsdown-when-run-from-command-line-attached-to-elastic-search/209166 "2019-11-23T23:37:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant\_kulkarni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_kulkarni/32/58221_2.png) [@prashant\_kulkarni](https://discuss.elastic.co/u/prashant_kulkarni)\
**Post date:** [November 23, 2019, 11:37pm UTC](https://discuss.elastic.co/t/logstash7-4-2-shutsdown-when-run-from-command-line-attached-to-elastic-search/209166/1 "2019-11-23T23:37:37Z")

</div>

New to using Elastic search and logstash. I installed elasticsearch and logstash on windows. Started Elasticsearch on localhost without any issues. I was able to get the response at port 9200 as expected.

I installed logstash next and tried to start logstash with elasticsearch as output and taking input from command line. Logstash starts ok but shoutsdown after few seconds before I could type anything for input. If I don't use elasticsearch for output then it works ok.

Here's the log output on the terminal window when I start logstash.

PS E:\logstash-7.4.2\> bin/logstash -e 'input { stdin { } } output { elasticsearch {hosts =\> ["localhost:9200"]} stdout {} }'  
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
WARNING: An illegal reflective access operation has occurred  
WARNING: Illegal reflective access by org.jruby.runtime.encoding.EncodingService (file:/E:/logstash-7.4.2/logstash-core/lib/jars/jruby-complete-9.2.8.0.jar) to field java.io.Console.cs  
WARNING: Please consider reporting this to the maintainers of org.jruby.runtime.encoding.EncodingService  
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations  
WARNING: All illegal access operations will be denied in a future release  
Thread.exclusive is deprecated, use Thread::Mutex  
Sending Logstash logs to E:/logstash-7.4.2/logs which is now configured via log4j2.properties  
[2019-11-23T15:34:00,816][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2019-11-23T15:34:00,831][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.4.2"}  
[2019-11-23T15:34:01,701][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, {, ,, ] at line 1, column 64 (byte 64) after output { elasticsearch {hosts =\> [localhost", :backtrace=\>["E:/logstash-7.4.2/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "E:/logstash-7.4.2/logstash-core/lib/logstash/compiler.rb:49:in `compile\_graph'", "E:/logstash-7.4.2/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2584:in `map'", "E:/logstash-7.4.2/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:153:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in `i nitialize'", "E:/logstash-7.4.2/logstash-core/lib/logstash/java_pipeline.rb:26:in `initialize'", "E:/logstash-7.4.2/logstash-core/lib/logstash/pipeline\_action/create.rb:36:in `execute'", "E:/logstash-7.4.2/logstash-core/lib/logstash/agent.rb:326:in `block in converge\_state'"]}  
[2019-11-23T15:34:02,129][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2019-11-23T15:34:07,006][INFO][logstash.runner] Logstash shut down.  
PS E:\logstash-7.4.2\>

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 24, 2019, 3:15pm UTC](https://discuss.elastic.co/t/logstash7-4-2-shutsdown-when-run-from-command-line-attached-to-elastic-search/209166/2 "2019-11-24T15:15:42Z")

</div>

> [@prashant\_kulkarni](#):
>
> "Expected one of #, {, ,, ] at line 1, column 64 (byte 64) after output { elasticsearch {hosts =\> [localhost"

The hostname should be in double quotes. You could get this error if you are missing a quote earlier in the file.

---

<div class="post-metadata">

**Author:** ![prashant\_kulkarni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_kulkarni/32/58221_2.png) [@prashant\_kulkarni](https://discuss.elastic.co/u/prashant_kulkarni)\
**Post date:** [November 25, 2019, 11:34pm UTC](https://discuss.elastic.co/t/logstash7-4-2-shutsdown-when-run-from-command-line-attached-to-elastic-search/209166/3 "2019-11-25T23:34:20Z")

</div>

Moved the configuration to a file and worked fine, not sure why. Thanks for your help.

---

<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:** [December 23, 2019, 11:34pm UTC](https://discuss.elastic.co/t/logstash7-4-2-shutsdown-when-run-from-command-line-attached-to-elastic-search/209166/4 "2019-12-23T23:34:23Z")

</div>

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