# RSS NoMethodError nil:NilClass

**URL:** <https://discuss.elastic.co/t/rss-nomethoderror-nil-nilclass/133080>\
**Category:** Logstash\
**Created:** [May 24, 2018, 6:46am UTC](https://discuss.elastic.co/t/rss-nomethoderror-nil-nilclass/133080 "2018-05-24T06:46:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ole](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@Ole](https://discuss.elastic.co/u/Ole)\
**Post date:** [May 24, 2018, 6:46am UTC](https://discuss.elastic.co/t/rss-nomethoderror-nil-nilclass/133080/1 "2018-05-24T06:46:04Z")

</div>

I've just started working with Logstash 6.2.4 and want to use it with RSS feeds. I've installed the RSS plugin and I'm using this as my pipeline.conf:

```
input {
	rss {
	url => "http://www.nrk.no/rss"
	interval => 60
		tags => ["rss"]
	}
}
# filter {
#}
output {
    elasticsearch {
		action => "index"
        hosts => ["localhost:9200"]
		index => "rss"
		workers => 1
    }
	stdout {}
}

```

When I run this using

> .\bin/logstash -f first-pipeline.conf --config.reload.automatic

in windows powershell I get the following error.

> [2018-05-24T08:44:01,354][INFO][logstash.inputs.rss] Polling RSS {:url=\>"[RSS](http://www.nrk.no/rss)"}  
> [2018-05-24T08:44:01,447][ERROR][logstash.inputs.rss] Uknown error while parsing the feed {:url=\>"[RSS](http://www.nrk.no/rss)", :exception=\>#\<NoMethodError: undefined method `items' for nil:NilClass\>}  
> [2018-05-24T08:44:01,463][INFO][logstash.inputs.rss] Command completed {:command=\>nil, :duration=\>0.109}

I've tried to search for this and read on similar topics but is unable to understand what needs to be done. I can provide additional information if it'll help.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 24, 2018, 12:03pm UTC](https://discuss.elastic.co/t/rss-nomethoderror-nil-nilclass/133080/2 "2018-05-24T12:03:58Z")

</div>

If you look at the [source code](https://github.com/logstash-plugins/logstash-input-rss/blob/master/lib/logstash/inputs/rss.rb), it is doing this

```
body = response.body
begin
  feed = RSS::Parser.parse(body)
  feed.items.each do |item|

```

I suspect it is trying to tell you that what it got from [http://www.nrk.no/rss](http://www.nrk.no/rss) is not parseable.

---

<div class="post-metadata">

**Author:** ![Ole](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@Ole](https://discuss.elastic.co/u/Ole)\
**Post date:** [May 24, 2018, 1:29pm UTC](https://discuss.elastic.co/t/rss-nomethoderror-nil-nilclass/133080/3 "2018-05-24T13:29:33Z")

</div>

Yes the problem seemed to be with what it is receiving rather than my setup. When I tried it with another URL ("[http://feeds.washingtonpost.com/rss/world](http://feeds.washingtonpost.com/rss/world)") it worked fine.

---

<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:** [June 21, 2018, 1:29pm UTC](https://discuss.elastic.co/t/rss-nomethoderror-nil-nilclass/133080/4 "2018-06-21T13:29:38Z")

</div>

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