Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined method for nil:NIlClass #24

Open
DBARUNNER opened this issue Feb 12, 2017 · 3 comments
Open

Undefined method for nil:NIlClass #24

DBARUNNER opened this issue Feb 12, 2017 · 3 comments

Comments

@DBARUNNER
Copy link

here is the logstash configuration
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 give me the "nown error while parsing the feed {:url=>"http://pashtovoa.com/api/zpktve-put", :exception=>#<NoMethodError: undefined method `items' for nil:NilClass>}

@fmbento
Copy link

fmbento commented Nov 21, 2017

Hi @DBARUNNER ,

Were you able to fix this? I'm facing the same issue with any RSS Feed I through at it, logstash 5.6.4

Appreciate the sharing! Thanks.

@fmbento
Copy link

fmbento commented Nov 21, 2017

Ops, bad RSS feeds...

Now I have a new one: "tag is too much in tag <item>"

@matthew-williams
Copy link

This is the error I am getting over and over. Similar

[2018-01-05T09:53:27,235][INFO ][logstash.inputs.beats ] Beats inputs: Starting input listener {:address=>"0.0.0.0:5044"}
[2018-01-05T09:53:27,238][INFO ][logstash.inputs.rss ] Registering RSS Input {:url=>"https://threatpost.com/category/vulnerabilities/feed", :interval=>300}
[2018-01-05T09:53:27,242][INFO ][logstash.inputs.udp ] Starting UDP listener {:address=>"0.0.0.0:5140"}
[2018-01-05T09:53:27,245][INFO ][logstash.pipeline ] Pipeline main started
[2018-01-05T09:53:27,250][INFO ][logstash.inputs.udp ] UDP listener started {:address=>"0.0.0.0:5140", :receive_buffer_bytes=>"106496", :queue_size=>"2000"}
[2018-01-05T09:53:27,252][INFO ][logstash.inputs.rss ] Polling RSS {:url=>"https://threatpost.com/category/vulnerabilities/feed"}
[2018-01-05T09:53:27,269][INFO ][org.logstash.beats.Server] Starting server on port: 5044
[2018-01-05T09:53:27,333][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-01-05T09:53:28,205][ERROR][logstash.inputs.rss ] Uknown error while parsing the feed {:url=>"https://threatpost.com/category/vulnerabilities/feed", :exception=>#<NoMethodError: undefined method `items' for nil:NilClass>}
[2018-01-05T09:53:28,206][INFO ][logstash.inputs.rss ] Command completed {:command=>nil, :duration=>0.954}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants