# Could not load : can't convert nil into String

**URL:** https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101
**Category:** Logstash
**Created:** [January 25, 2018, 6:52pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101 "2018-01-25T18:52:39Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![greenhorn](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@greenhorn](https://discuss.elastic.co/u/greenhorn)
#### Post date: [January 25, 2018, 6:52pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/1 "2018-01-25T18:52:39Z")

</div>

When I use

```
output {
      stdout { codec => rubydebug }
    }

```

I end up filling up my logs files with the following.

Could not load : can't convert nil into String

My configuration is as follows.

> <https://gist.github.com/anonymous/f6e74c1a0393a463f69314a1acbfdf11>

  
Grok Pattern File

CISCOTIMESTAMPTZ %{MONTH} +%{MONTHDAY}(?: %{YEAR})? %{TIME} %{TZ}

If I run without rubydebug I end up getting a grok parse failure on all of my IOS logs.

Any help would be appreciated. I am running logstash-5.4.0-1.

---

<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: [January 25, 2018, 9:20pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/2 "2018-01-25T21:20:09Z")

</div>

Please show the full error message (and maybe with some preceding lines for context).

---

<div class="post-metadata">

### Author: ![greenhorn](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@greenhorn](https://discuss.elastic.co/u/greenhorn)
#### Post date: [January 25, 2018, 9:28pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/3 "2018-01-25T21:28:35Z")

</div>

This is literally the whole message.

Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String  
Could not load : can't convert nil into String

If you can recommend elsewhere to look I will be happy to pull any and all logs needed.

---

<div class="post-metadata">

### Author: ![greenhorn](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@greenhorn](https://discuss.elastic.co/u/greenhorn)
#### Post date: [January 25, 2018, 9:32pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/4 "2018-01-25T21:32:37Z")

</div>

I will restart in debug and see if I cannot get some more detail.

---

<div class="post-metadata">

### Author: ![greenhorn](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@greenhorn](https://discuss.elastic.co/u/greenhorn)
#### Post date: [January 25, 2018, 9:39pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/5 "2018-01-25T21:39:43Z")

</div>

Sorry no additional detail with debug on.

---

<div class="post-metadata">

### Author: ![greenhorn](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@greenhorn](https://discuss.elastic.co/u/greenhorn)
#### Post date: [January 25, 2018, 10:07pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/6 "2018-01-25T22:07:54Z")

</div>

What is fairly confusing to me is why it would happen once rubydebug is enabled and why I cannot process IOS(Cisco) logs without it. The rest of my logs are processed without issue and that is around 120K per minute. Any ideas?

---

<div class="post-metadata">

### Author: ![greenhorn](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@greenhorn](https://discuss.elastic.co/u/greenhorn)
#### Post date: [January 29, 2018, 7:02pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/7 "2018-01-29T19:02:34Z")

</div>

I was able to distill my config down into the following and am still receiving the error. Any help would be appreciated.

```
input {
  beats {
    port => 5044
    ssl => false
  }
}
output {
  elasticsearch {
    hosts => ['xxxxxxxxxxxxxx:9200','xxxxxxxxxxxxxx:9200']
    sniffing => true
    manage_template => false
    index => "filebeat-%{+YYYY.MM.dd}"
    document_type => "%{[@metadata][type]}"
  }
  
  stdout { codec => rubydebug }
}
```

---

<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: [January 29, 2018, 8:57pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/8 "2018-01-29T20:57:33Z")

</div>

I'm pretty sure it's a Logstash bug (either in the core or in one of the plugins). I think it has come up before but I wasn't able to find a GitHub issue for it.

---

<div class="post-metadata">

### Author: ![greenhorn](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@greenhorn](https://discuss.elastic.co/u/greenhorn)
#### Post date: [January 29, 2018, 9:08pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/9 "2018-01-29T21:08:52Z")

</div>

Thank Magnus. I have seen some of the bugs also and would agree. I will create a bug issue for the problem. I believe the issue is with awesome\_print.

---

<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: [February 26, 2018, 9:23pm UTC](https://discuss.elastic.co/t/could-not-load-cant-convert-nil-into-string/117101/10 "2018-02-26T21:23:22Z")

</div>

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