# Logstash Debugging

**URL:** https://discuss.elastic.co/t/logstash-debugging/95400
**Category:** Logstash
**Created:** [August 1, 2017, 6:45pm UTC](https://discuss.elastic.co/t/logstash-debugging/95400 "2017-08-01T18:45:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jfarrin1](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jfarrin1](https://discuss.elastic.co/u/jfarrin1)
#### Post date: [August 1, 2017, 6:45pm UTC](https://discuss.elastic.co/t/logstash-debugging/95400/1 "2017-08-01T18:45:40Z")

</div>

Hello,

I was wondering if anyone had a good way to debug with logstash. Currently, I am using the stdout with rubydebug. In my error file it shows an error name but won't give me any specific information, which makes the error message useless. How can I get the line number that an error is coming from?

---

<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 2, 2017, 10:24am UTC](https://discuss.elastic.co/t/logstash-debugging/95400/2 "2017-08-02T10:24:57Z")

</div>

You probably can't, but what's the error message?

---

<div class="post-metadata">

### Author: ![jfarrin1](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jfarrin1](https://discuss.elastic.co/u/jfarrin1)
#### Post date: [August 2, 2017, 12:56pm UTC](https://discuss.elastic.co/t/logstash-debugging/95400/3 "2017-08-02T12:56:10Z")

</div>

could not load : can't convert nil into string

Which, I assume comes from when I am loading in csv data and converting some of the columns into strings. However, I have tried removing all string conversions and even still got this error. Any thoughts?

---

<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 3, 2017, 7:57am UTC](https://discuss.elastic.co/t/logstash-debugging/95400/4 "2017-08-03T07:57:11Z")

</div>

> could not load : can’t convert nil into string

That's hardly the full error message, is it? Please post everything, and format it as preformatted text so it won't get mangled.

Seeing the configuration and sample input would also help.

---

<div class="post-metadata">

### Author: ![jfarrin1](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jfarrin1](https://discuss.elastic.co/u/jfarrin1)
#### Post date: [August 3, 2017, 1:54pm UTC](https://discuss.elastic.co/t/logstash-debugging/95400/5 "2017-08-03T13:54:02Z")

</div>

That was the full error message we were getting, but it turns out the error was fixed, Logstash just didn't reflect this change for some reason.

Is there any reason why an older version of our logstash conf file would be used by other components of the ELK Stack? (i.e. we made updates to the conf file and restarted each service, but the output we got was from an older version of the conf file that no longer existed).

This caused the confusion about our error as it didn't make sense given the new version of the conf file we were using.

---

<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 3, 2017, 2:16pm UTC](https://discuss.elastic.co/t/logstash-debugging/95400/6 "2017-08-03T14:16:58Z")

</div>

> Is there any reason why an older version of our logstash conf file would be used by other components of the ELK Stack?

Is your editor creating backup files? Logstash reads _all_ files in the configuration directory (typically /etc/logstash/conf.d).

---

<div class="post-metadata">

### Author: ![jfarrin1](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jfarrin1](https://discuss.elastic.co/u/jfarrin1)
#### Post date: [August 4, 2017, 6:01pm UTC](https://discuss.elastic.co/t/logstash-debugging/95400/7 "2017-08-04T18:01:03Z")

</div>

Ahhh, that makes a lot of sense. There was a backup file in the conf.d directory that was causing issue. Thank you 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: [September 1, 2017, 6:01pm UTC](https://discuss.elastic.co/t/logstash-debugging/95400/8 "2017-09-01T18:01:12Z")

</div>

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