# X-Pack Machine Learning Lab 1 Logstash Error

**URL:** <https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205>\
**Category:** Elastic Training\
**Created:** [January 12, 2018, 4:24am UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205 "2018-01-12T04:24:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![thelonestargeek](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@thelonestargeek](https://discuss.elastic.co/u/thelonestargeek)\
**Post date:** [January 12, 2018, 4:24am UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/1 "2018-01-12T04:24:52Z")

</div>

I'm having an issue getting the stocks data into kibana using logstash.

Here is my log file:

[2018-01-11T22:17:04,976][INFO][logstash.inputs.metrics] Monitoring License OK  
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................[2018-01-11T22:17:05,631][FATAL][logstash.runner] An unexpected error occurred! {:error=\>#\<NoMethodError: undefined method `<' for nil:NilClass>, :backtrace=>["/Users/<USER>/Downloads/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:213:in`get\_event\_type'", "/Users//Downloads/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:165:in `event_action_params'", "/Users/<USER>/Downloads/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:39:in`event\_action\_tuple'", "/Users//Downloads/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:34:in `block in multi_receive'", "org/jruby/RubyArray.java:2486:in`map'", "/Users//Downloads/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:34:in `multi_receive'", "/Users/<USER>/Downloads/logstash-6.1.1/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:13:in`multi\_receive'", "/Users//Downloads/logstash-6.1.1/logstash-core/lib/logstash/output\_delegator.rb:50:in `multi_receive'", "/Users/<USER>/Downloads/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:487:in`block in output\_batch'", "org/jruby/RubyHash.java:1343:in `each'", "/Users/<USER>/Downloads/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:486:in`output\_batch'", "/Users//Downloads/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:438:in `worker_loop'", "/Users/<USER>/Downloads/logstash-6.1.1/logstash-core/lib/logstash/pipeline.rb:393:in`block in start\_workers'"]}`

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 19, 2018, 1:51pm UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/2 "2018-01-19T13:51:33Z")

</div>

Sorry for the slow response, but it took me some time to reproduce the error you are seeing. What is probably happening is that you set up a different password for the `elastic` user than the password that is configured in the `stocks.conf` Logstash configuration file.

If you open `stocks.conf` with a text editor, you can change the `changeme` password near the bottom of the file into the password that you have chosen when you set up X-Pack.

You will have to do the same for the other `.conf` Logstash files that you will be using in the labs.

---

<div class="post-metadata">

**Author:** ![thelonestargeek](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@thelonestargeek](https://discuss.elastic.co/u/thelonestargeek)\
**Post date:** [January 24, 2018, 5:34am UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/3 "2018-01-24T05:34:21Z")

</div>

Thanks I reinstalled everything and was able to import the stocks data. The only issue I'm seeing is that it's only importing 1625 of the 1859 records in the CSV. I'm using the latest version of ELK; are there any known issues getting the data imported with that version?

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [January 24, 2018, 11:58am UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/4 "2018-01-24T11:58:24Z")

</div>

Unfortunately, it seems that Logstash 6.1.0 has introduced a bug which causes it to drop some documents. The Logstash team is looking into the issue right now. As a workaround, you could use [Logstash 6.0.1](https://www.elastic.co/downloads/past-releases/logstash-6-0-1), which should work fine with the latest version of Elasticsearch, and which does not seem to have the problem.

---

<div class="post-metadata">

**Author:** ![tayel5](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@tayel5](https://discuss.elastic.co/u/tayel5)\
**Post date:** [February 5, 2018, 3:28pm UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/5 "2018-02-05T15:28:09Z")

</div>

Hello there, so my test ELK is at 6.1.2 and recently 6.1.3 was released, do you know if .3 addresses this error because I'm seeing it in all the .csv files I'm putting in as well.

---

<div class="post-metadata">

**Author:** ![pmusa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pmusa/32/3498_2.png) [@pmusa](https://discuss.elastic.co/u/pmusa)\
**Post date:** [February 5, 2018, 3:46pm UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/6 "2018-02-05T15:46:14Z")

</div>

Hey T,  
sorry but I don't think it was fixed. Here is the main issue which is only included in 6.2.0 which will be released soon ([https://github.com/elastic/logstash/pull/9024](https://github.com/elastic/logstash/pull/9024)). I know the bug is annoying, but the labs are still valid and all the experience is pretty much the same. I would not be too worried about those few hundred documents that could not be indexed.

Please, let us know if you have other issues.

Cheers,  
Pablo

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [February 5, 2018, 4:10pm UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/7 "2018-02-05T16:10:00Z")

</div>

Actually, 6.1.3 has fixed the issue. 🙂 Please let us know if you still run into problems with 6.1.3.

---

<div class="post-metadata">

**Author:** ![tayel5](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@tayel5](https://discuss.elastic.co/u/tayel5)\
**Post date:** [February 5, 2018, 4:30pm UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/8 "2018-02-05T16:30:39Z")

</div>

Oh great! I'll install 6.1.3 for my test environment, I'll let you know if its still a problem, thank you!

---

<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:** [March 7, 2018, 4:30pm UTC](https://discuss.elastic.co/t/x-pack-machine-learning-lab-1-logstash-error/115205/9 "2018-03-07T16:30:46Z")

</div>

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