Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

undefined method `[]' for nil:NilClass #1

@brian-olson

Description

@brian-olson

I'm having some issues getting the collector to run successfully. It looks like the code is being executed successfully because I can see that it establishes the logstash connection and opens the listening port via netstat. When running tcpdump on the second terminal I can also see that no packets are being sent from the sflow listener to logstash. The error below repeats indefinitely and the speed seems to be related to the expected flows, leading me to believe it is successfully receiving the packets, but just unable to process them successfully. I've gone back and ensured that eventmachine, yaml, and bindata are installed. Any other thoughts on what the issue may be? Thanks!

OS: CentOS 6.5
Ruby: ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]
Logstash: logstash-1.4.2

TERMINAL 1
[root@HOST sflow]# bundle exec ./bin/sflow.rb
Connecting to Logstash: localhost:6543
Server listening.
2014-11-07 09:50:23 -0500
nil
undefined method []' for nil:NilClass /DIR/logstash-1.4.2/sflow/lib/sflow/parsers/parsers.rb:7:inparse_packet'
/DIR/logstash-1.4.2/sflow/lib/sflow/collector.rb:13:in block in receive_data' /usr/local/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:incall'
/usr/local/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `block in spawn_threadpool'
2014-11-07 09:50:23 -0500

TERMINAL 2
[root@HOST sflow]# netstat -anup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:6543 0.0.0.0:* 32242/java
udp 0 0 127.0.0.1:57626 127.0.0.1:6543 ESTABLISHED 493/ruby
udp 0 0 0.0.0.0:6343 0.0.0.0:* 493/ruby

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions