# Logstash nlp error cannot create pipeline

**URL:** <https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432>\
**Category:** Logstash\
**Created:** [June 22, 2017, 10:33am UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432 "2017-06-22T10:33:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nusrath](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nusrath](https://discuss.elastic.co/u/Nusrath)\
**Post date:** [June 22, 2017, 10:33am UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/1 "2017-06-22T10:33:38Z")

</div>

[http://blog.jaywayco.co.uk/analyze-sentiment-and-log-all-the-things/](http://blog.jaywayco.co.uk/analyze-sentiment-and-log-all-the-things/)

i have used this blog ,and followed the steps to download NLP jars.

my logstash.conf file is look like as follow  
input {  
stdin {}  
}  
filter {  
nlp {  
source =\> "message"  
}  
}  
output {  
stdout {}  
}

After running this my getting error as follows

[root@node1 bin]# ./logstash -f /home/node1/ES/syed/twitter\_conf.conf  
Sending Logstash's logs to /home/node1/ES/logstash-5.4.1/logs which is now configured via log4j2.properties  
[2017-06-22T15:19:03,557][ERROR][logstash.agent] Cannot create pipeline {:reason=\>"Expected one of #, { at line 12, column 7 (byte 435) after filter"}

its is not creating pipeline at NLP after filter.

Any help will be appreciated. Advance Thanks!! Cheers

---

<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:** [June 22, 2017, 11:43am UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/2 "2017-06-22T11:43:29Z")

</div>

You're showing us logstash.conf but Logstash is complaining about twitter\_conf.conf.

---

<div class="post-metadata">

**Author:** ![Nusrath](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nusrath](https://discuss.elastic.co/u/Nusrath)\
**Post date:** [June 22, 2017, 11:59am UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/3 "2017-06-22T11:59:13Z")

</div>

Hi Magnusbaeck ,  
Thanks for your response.

## Here is my twitter\_conf.conf

input {  
twitter {  
consumer\_key =\> "KEY"  
consumer\_secret =\> "Key"  
oauth\_token =\> "key"  
oauth\_token\_secret =\> "key"  
keywords =\> ["Antman", "spiderman", "batman", "superman"]  
full\_tweet =\> true  
}  
}

filters {  
nlp {  
source =\> "message"  
}  
}

## output { stdout { codec =\> dots } elasticsearch { hosts =\> "localhost:9200" index =\> "twitter" document\_type =\> "tweets" } }

This is my full twitter\_conf.conf file  
I have run this conf without filter its working fine and inserting data in ES.  
please assist me thanks once again.....🙂

---

<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:** [June 22, 2017, 12:31pm UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/4 "2017-06-22T12:31:12Z")

</div>

> filters {  
> nlp {  
> source =\> "message"  
> }  
> }

"filter", not "filters".

---

<div class="post-metadata">

**Author:** ![Nusrath](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nusrath](https://discuss.elastic.co/u/Nusrath)\
**Post date:** [June 22, 2017, 2:48pm UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/5 "2017-06-22T14:48:57Z")

</div>

Thanks

## filter is working bt i got anther issue

Sending Logstash's logs to /home/node1/ES/logstash-5.4.1/logs which is now configured via log4j2.properties  
[2017-06-22T20:04:16,583][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>[], :added=\>[[http://localhost:9200/](http://localhost:9200/)]}}  
[2017-06-22T20:04:16,587][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
[2017-06-22T20:04:16,664][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>#\<URI::HTTP:0x22021d6e URL:[http://localhost:9200/](http://localhost:9200/)\>}  
[2017-06-22T20:04:16,665][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
[2017-06-22T20:04:16,702][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "version"=\>50001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"\_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\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false, "fields"=\>{"keyword"=\>{"type"=\>"keyword"}}}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date", "include\_in\_all"=\>false}, "@version"=\>{"type"=\>"keyword", "include\_in\_all"=\>false}, "geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"type"=\>"geo\_point"}, "latitude"=\>{"type"=\>"half\_float"}, "longitude"=\>{"type"=\>"half\_float"}}}}}}}}  
[2017-06-22T20:04:16,707][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>[#\<URI::Generic:0x408f31ac URL://localhost:9200\>]}  
Adding annotator tokenize  
TokenizerAnnotator: No tokenizer type provided. Defaulting to PTBTokenizer.  
Adding annotator ssplit  
edu.stanford.nlp.pipeline.AnnotatorImplementations:  
Adding annotator parse  
Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ...done [0.5 sec].  
Adding annotator sentiment  
[2017-06-22T20:04:17,542][INFO][logstash.pipeline] Starting pipeline {"id"=\>"main", "pipeline.workers"=\>24, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>5, "pipeline.max\_inflight"=\>3000}  
[2017-06-22T20:04:17,743][INFO][logstash.pipeline] Pipeline main started  
[2017-06-22T20:04:17,747][INFO][logstash.inputs.twitter] Starting twitter tracking {:track=\>"icc,Champions trophy,india,pakistan,bcci"}  
[2017-06-22T20:04:17,775][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2017-06-22T20:04:19,702][ERROR][logstash.pipeline] Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {"exception"=\>"Direct event field references (i.e. event['field']) have been disabled in favor of using event get and set methods (e.g. event.get('field')). Please consult the Logstash 5.0 breaking changes documentation for more details.", "backtrace"=\>["/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/event.rb:48:in `method_missing'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/nlp.rb:30:in`filter'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/base.rb:145:in `do_filter'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/base.rb:164:in`multi\_filter'", "org/jruby/RubyArray.java:1613:in `each'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/base.rb:161:in`multi\_filter'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filter\_delegator.rb:43:in `multi_filter'", "(eval):46:in`filter\_func'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:370:in `filter_batch'", "org/jruby/RubyProc.java:281:in`call'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:224:in `each'", "org/jruby/RubyHash.java:1342:in`each'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:223:in `each'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:369:in`filter\_batch'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:350:in `worker_loop'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:317:in`start\_workers'"]}  
[2017-06-22T20:04:19,753][FATAL][logstash.runner] An unexpected error occurred! {:error=\>#\<NoMethodError: Direct event field references (i.e. event['field']) have been disabled in favor of using event get and set methods (e.g. event.get('field')). Please consult the Logstash 5.0 breaking changes documentation for more details.\>, :backtrace=\>["/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/event.rb:48:in `method_missing'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/nlp.rb:30:in`filter'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/base.rb:145:in `do_filter'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/base.rb:164:in`multi\_filter'", "org/jruby/RubyArray.java:1613:in `each'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filters/base.rb:161:in`multi\_filter'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/filter\_delegator.rb:43:in `multi_filter'", "(eval):46:in`filter\_func'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:370:in `filter_batch'", "org/jruby/RubyProc.java:281:in`call'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:224:in `each'", "org/jruby/RubyHash.java:1342:in`each'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:223:in `each'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:369:in`filter\_batch'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:350:in `worker_loop'", "/home/node1/ES/logstash-5.4.1/logstash-core/lib/logstash/pipeline.rb:317:in`start\_workers'"]}

* * *

---

<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:** [June 22, 2017, 6:48pm UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/6 "2017-06-22T18:48:04Z")

</div>

It looks like the nlp filter isn't Logstash 5.x compatible.

---

<div class="post-metadata">

**Author:** ![Nusrath](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nusrath](https://discuss.elastic.co/u/Nusrath)\
**Post date:** [June 24, 2017, 5:18am UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/7 "2017-06-24T05:18:32Z")

</div>

Thanks Magnusbaeck for your help,

I want to do some twitter sentimental analysis with ELK , do you have any knowledge about it . i am a new bee i dont have much knowledge about ELK and Sentimental analysis . From google i tried API's like AlchemyAPI and NLP both are not in use as of now. have you ever face any question like these.How can i do twitter sentimental analysis with ELK.

Any help will be appreciated. Advance Thanks!!

---

<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:** [July 22, 2017, 5:18am UTC](https://discuss.elastic.co/t/logstash-nlp-error-cannot-create-pipeline/90432/8 "2017-07-22T05:18:39Z")

</div>

Closed on July 22, 2017, 5:18am UTC

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