# Undefined method \`items' for nil:NilClass\>

**URL:** <https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792>\
**Category:** Logstash\
**Created:** [February 12, 2017, 7:12am UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792 "2017-02-12T07:12:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamal](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jamal](https://discuss.elastic.co/u/jamal)\
**Post date:** [February 12, 2017, 7:12am UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792/1 "2017-02-12T07:12:56Z")

</div>

here is the configuration of logstash

```
  input
  {
	   rss 
	  {
		 interval => 60000
		 url => "http://internews.org/rss.xml"
		 type => "tribune"
	   }
  }

  filter
  {
	 if [type] == "tribune" 
	{
	   ruby 
	    {
		  code => "require 'digest/md5';
		  event.set('[@metadata]''[computed_id]', Digest::MD5.hexdigest(event.get('[message]')))"
	    }
    }
 
 }
   output 
   {
	   stdout { codec => dots }
		if [type] == "tribune" 
		{
			elasticsearch 
			{
			    hosts => "10.20.1.123"
			    index => "rss_index_world"
				document_type => "tribune"
				document_id => "%{[@metadata][computed_id]}"
			}
		}

    }

```

when i run it it give me the the following error, while i am using logstash 5.2.1 and latest version of rss-input

**Uknown error while parsing the feed {:url=\>"[http://pashtovoa.com/api/zpktve-put](http://pashtovoa.com/api/zpktve-put)", :exception=\>#\<NoMethodError: undefined method `items' for nil:NilClass\>}**

---

<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:** [February 13, 2017, 7:04am UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792/2 "2017-02-13T07:04:31Z")

</div>

Please show the full error message with surrounding context. Make sure you format the next as preformatted text with the `</>` toolbar button.

I note that [http://pashtovoa.com/api/zpktve-put](http://pashtovoa.com/api/zpktve-put) returns a 301 code that redirects the client to [http://www.pashtovoa.com/api/zpktve-put](http://www.pashtovoa.com/api/zpktve-put). Perhaps the rss plugin doesn't deal with this? Try flipping to the correct URL.

---

<div class="post-metadata">

**Author:** ![jamal](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jamal](https://discuss.elastic.co/u/jamal)\
**Post date:** [February 20, 2017, 8:10am UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792/3 "2017-02-20T08:10:00Z")

</div>

I solved the previouse problem, but rss-input plugin have another problem with rss link which start with feeds, here is many link which is start with feed it give me `Connection refused error` here is the rss link that i use [feeds.washingtonpost.com/rss/world](http://feeds.washingtonpost.com/rss/world) and [feeds.bbci.co.uk/news/rss.xml?edition=asia](http://feeds.bbci.co.uk/news/rss.xml?edition=asia)

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [February 20, 2017, 5:29pm UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792/4 "2017-02-20T17:29:44Z")

</div>

Have you added the scheme `http://` to the links?

---

<div class="post-metadata">

**Author:** ![jamal](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jamal](https://discuss.elastic.co/u/jamal)\
**Post date:** [February 21, 2017, 4:09am UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792/5 "2017-02-21T04:09:37Z")

</div>

Yes I have added

---

<div class="post-metadata">

**Author:** ![jamal](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jamal](https://discuss.elastic.co/u/jamal)\
**Post date:** [February 21, 2017, 7:11am UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792/6 "2017-02-21T07:11:35Z")

</div>

Yes I have added but still have problome

---

<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 21, 2017, 7:11am UTC](https://discuss.elastic.co/t/undefined-method-items-for-nil-nilclass/74792/7 "2017-03-21T07:11:55Z")

</div>

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