# Not able to post data

**URL:** <https://discuss.elastic.co/t/not-able-to-post-data/68162>\
**Category:** Logstash\
**Created:** [December 6, 2016, 11:28am UTC](https://discuss.elastic.co/t/not-able-to-post-data/68162 "2016-12-06T11:28:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prateek\_Kshtriya](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Prateek\_Kshtriya](https://discuss.elastic.co/u/Prateek_Kshtriya)\
**Post date:** [December 6, 2016, 11:28am UTC](https://discuss.elastic.co/t/not-able-to-post-data/68162/1 "2016-12-06T11:28:15Z")

</div>

Hi All,

I am not able to post data using logstash 5.0.2 to elasticsearch5.0.1. I am getting below error-

\Logstash\logstash-5.0.2\bin\>logstash -f apache.conf  
Could not find log4j2 configuration at path /ELK/Logstash/logstash-5.0.2/config/  
log4j2.properties. Using default config which logs to console  
16:51:19.125 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - El  
asticsearch pool URLs updated {:changes=\>{:removed=\>[], :added=\>["[http://127.0.0](http://127.0.0)  
.1:9200"]}}  
16:51:19.125 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - Us  
ing mapping template from {:path=\>nil}  
16:51:19.235 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - At  
tempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "vers  
ion"=\>50001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"defaul  
t"=\>{"\_all"=\>{"enabled"=\>true, "norms"=\>false}, "dynamic\_templates"=\>[{"message  
\_field"=\>{"path\_match"=\>"message", "match\_mapping\_type"=\>"string", "mapping"=\>{"  
type"=\>"text", "norms"=\>false}}}, {"string\_fields"=\>{"match"=\>"_", "match\_mappin  
g\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false, "fields"=\>{"keywo  
rd"=\>{"type"=\>"keyword"}}}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date", "in  
clude\_in\_all"=\>false}, "@version"=\>{"type"=\>"keyword", "include\_in\_all"=\>false},  
"geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"t  
ype"=\>"geo\_point"}, "latitude"=\>{"type"=\>"half\_float"}, "longitude"=\>{"type"=\>"h  
alf\_float"}}}}}}}}  
16:51:19.245 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - Ne  
w Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>["12  
7.0.0.1"]}  
16:51:19.330 [[main]-pipeline-manager] ERROR logstash.agent - Pipeline aborted d  
ue to error {:exception=\>#\<Grok::PatternError: pattern %{HTTPNEWDATE:time} not d  
efined\>, :backtrace=\>["D:/ELK/Logstash/logstash-5.0.2/vendor/bundle/jruby/1.9/ge  
ms/jls-grok-0.11.4/lib/grok-pure.rb:123:in `compile'", "org/jruby/RubyKernel.jav a:1479:in`loop'", "D:/ELK/Logstash/logstash-5.0.2/vendor/bundle/jruby/1.9/gems/  
jls-grok-0.11.4/lib/grok-pure.rb:93:in `compile'", "D:/ELK/Logstash/logstash-5.0 .2/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-3.3.0/lib/logstash/filters/ grok.rb:272:in`register'", "org/jruby/RubyArray.java:1613:in `each'", "D:/ELK/L ogstash/logstash-5.0.2/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-3.3.0/l ib/logstash/filters/grok.rb:267:in`register'", "org/jruby/RubyHash.java:1342:in  
`each'", "D:/ELK/Logstash/logstash-5.0.2/vendor/bundle/jruby/1.9/gems/logstash- filter-grok-3.3.0/lib/logstash/filters/grok.rb:262:in`register'", "D:/ELK/Logst  
ash/logstash-5.0.2/logstash-core/lib/logstash/pipeline.rb:197:in `start_workers' ", "org/jruby/RubyArray.java:1613:in`each'", "D:/ELK/Logstash/logstash-5.0.2/lo  
gstash-core/lib/logstash/pipeline.rb:197:in `start_workers'", "D:/ELK/Logstash/l ogstash-5.0.2/logstash-core/lib/logstash/pipeline.rb:153:in`run'", "D:/ELK/Logs  
tash/logstash-5.0.2/logstash-core/lib/logstash/agent.rb:250:in `start\_pipeline'"  
]}  
16:51:19.393 [Api Webserver] INFO logstash.agent - Successfully started Logstas  
h API endpoint {:port=\>9600}  
16:51:22.349 [LogStash::Runner] WARN logstash.agent - stopping pipeline {:id=\>"  
main"}

PFB the config file snippet-

input {  
file {  
path =\> "tomcat7\logs\dashboard.log"  
start\_position =\> "beginning"  
}  
}

filter {

multiline {  
pattern =\> "%{YEAR}-%{MONTH}"  
what =\> "next"  
}  
grok {  
match =\> { "message" =\> " %{WORD:SEVERITYLEVEL} " }  
}  
grok {

```
       match => { "message" => " %{GREEDYDATA:ServerMessage}" }
      }
grok {
		match => { "message" => "] %{GREEDYDATA:ClassName}" }
        }
grok {
               match => { "message" => "\[%{PROG:ServiceName}" }
      }

```

}

output {  
if "ERROR" in [SEVERITYLEVEL]{  
elasticsearch {  
action =\> "index"  
codec =\> "json"  
index =\> "dashboardlogs"  
}  
}  
}

Please suggest if I am missing something as I had used logstash2.1.0 earlier.

Regards,  
Prateek Divya

---

<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:** [December 6, 2016, 11:42am UTC](https://discuss.elastic.co/t/not-able-to-post-data/68162/2 "2016-12-06T11:42:10Z")

</div>

Here's the error message:

> Grok::PatternError: pattern %{HTTPNEWDATE:time} not defined

You have a grok filter somewhere that attempt to use the non-existing HTTPNEWDATE pattern.

---

<div class="post-metadata">

**Author:** ![Prateek\_Kshtriya](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Prateek\_Kshtriya](https://discuss.elastic.co/u/Prateek_Kshtriya)\
**Post date:** [December 6, 2016, 11:46am UTC](https://discuss.elastic.co/t/not-able-to-post-data/68162/3 "2016-12-06T11:46:40Z")

</div>

Thank you. It worked on adding appropriate grok pattern.

Regards,  
Prateek Divya

---

<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, 2017, 11:46am UTC](https://discuss.elastic.co/t/not-able-to-post-data/68162/4 "2017-01-03T11:46:58Z")

</div>

Closed on January 3, 2017, 11:46am UTC

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