Uploaded image for project: 'logstash'
  1. LOGSTASH-2288

undefined method `flat_map' for nil:NilClass when conditional on an output

    Details

      Description

      Using the following config + the latest code as of 9/19/14, this error is thrown when the output receives an event:

      (eval):22:in `block in initialize': undefined method `flat_map' for nil:NilClass (NoMethodError)
      from /media/truecrypt1/git/danielredoak/logstash/lib/logstash/pipeline.rb:272:in `call'
      from /media/truecrypt1/git/danielredoak/logstash/lib/logstash/pipeline.rb:272:in `output'
      from /media/truecrypt1/git/danielredoak/logstash/lib/logstash/pipeline.rb:231:in `outputworker'
      from /media/truecrypt1/git/danielredoak/logstash/lib/logstash/pipeline.rb:160:in `block in start_outputs'

      Config Ex:

      input {
        file {
          path => "somefile"
        }
      }
      
      output {
        if [type] == "test" {
          stdout{}
        }
        file {
          path => "someoutput"
        }
      }
      

      Related file, code starts at 328:
      https://github.com/elasticsearch/logstash/blob/4211522de1cf996891c6b93f93ba1ab4e408d587/lib/logstash/config/config_ast.rb#L328

        Gliffy Diagrams

          Attachments

            Issue links

              Activity

                People

                • Assignee:
                  Colin Surprenant
                  Reporter:
                  Ryan O'Keeffe
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: