RSS NoMethodError nil:NilClass


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 => ""
	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=>""}
[2018-05-24T08:44:01,447][ERROR][logstash.inputs.rss ] Uknown error while parsing the feed {:url=>"", :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.


If you look at the source code, it is doing this

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

I suspect it is trying to tell you that what it got from is not parseable.


Yes the problem seemed to be with what it is receiving rather than my setup. When I tried it with another URL ("") it worked fine.

(system) #4

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