# Logstash.conf error

**URL:** <https://discuss.elastic.co/t/logstash-conf-error/145440>\
**Category:** Logstash\
**Created:** [August 21, 2018, 5:43pm UTC](https://discuss.elastic.co/t/logstash-conf-error/145440 "2018-08-21T17:43:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nipunthathsara](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@nipunthathsara](https://discuss.elastic.co/u/nipunthathsara)\
**Post date:** [August 21, 2018, 5:43pm UTC](https://discuss.elastic.co/t/logstash-conf-error/145440/1 "2018-08-21T17:43:36Z")

</div>

I'm following this tutorial to setup logstash for ballerina.  
[https://ballerina.io/learn/how-to-observe-ballerina-code/#elastic-stack](https://ballerina.io/learn/how-to-observe-ballerina-code/#elastic-stack)

Created the logstash.conf with below content.  
input {  
beats {  
port =\> 5044  
}  
}  
filter {  
grok {  
match =\> { "message" =\> "%{TIMESTAMP\_ISO8601:date}%{SPACE}%{WORD:logLevel}%{SPACE}[%{GREEDYDATA:package}]%{SPACE}-%{SPACE}%{GREEDYDATA:logMessage}"}  
}  
}  
output {  
elasticsearch {  
hosts =\> "elasticsearch:9200"  
index =\> "ballerina"  
document\_type =\> "ballerina\_logs"  
}  
}

Started the docker with below command  
`docker run -h logstash --name logstash --link elasticsearch:elasticsearch -it --rm -v /tmp/pipeline:/usr/share/logstash/pipeline/ -p 5044:5044 docker.elastic.co/logstash/logstash:6.2.4`

Getting this error on startup  
`[ERROR][logstash.agent] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, input, filter, output at line 1, column 1 (byte 1) after ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:42:in`compile\_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:50:in `compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:12:in`block in compile\_sources'", "org/jruby/RubyArray.java:2486:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in`compile\_sources'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:51:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:169:in`initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:40:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:315:in`block in converge\_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in `with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:312:in`block in converge\_state'", "org/jruby/RubyArray.java:1734:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:299:in`converge\_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:166:in `block in converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in`with\_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:in `converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:90:in`execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:348:in `block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in`block in initialize'"]}`

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 21, 2018, 6:55pm UTC](https://discuss.elastic.co/t/logstash-conf-error/145440/2 "2018-08-21T18:55:21Z")

</div>

What files do you have in /tmp/pipeline? It looks like one of them begins with a garbage character, possibly non-printable (i.e. might not show up in a text editor). Dump the file contents with e.g. hexdump to make sure there's nothing there.

---

<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:** [September 18, 2018, 6:55pm UTC](https://discuss.elastic.co/t/logstash-conf-error/145440/3 "2018-09-18T18:55:23Z")

</div>

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