Undefined method `items' for nil:NilClass>

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", :exception=>#<NoMethodError: undefined method `items' for nil:NilClass>}

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 returns a 301 code that redirects the client to http://www.pashtovoa.com/api/zpktve-put. Perhaps the rss plugin doesn't deal with this? Try flipping to the correct URL.

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 and feeds.bbci.co.uk/news/rss.xml?edition=asia

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

Yes I have added

Yes I have added but still have problome

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