Issues
- undefined method `flat_map' for nil:NilClass when conditional on an outputLOGSTASH-2288Resolved issue: LOGSTASH-2288Colin Surprenant
- Logstash 1.4.2 RPM Creation (auto-dependencies)LOGSTASH-2287Resolved issue: LOGSTASH-2287Logstash Developers
- nagios_nsca plugin not workingLOGSTASH-2286Resolved issue: LOGSTASH-2286Logstash Developers
- 1.4.2 crash for unknown reasonLOGSTASH-2285Logstash Developers
- ArgumentError: invalid byte sequence in UTF-8LOGSTASH-2284Resolved issue: LOGSTASH-2284Logstash Developers
- Logstash (node client) haphazardly connects to ElasticsearchLOGSTASH-2283Resolved issue: LOGSTASH-2283Logstash Developers
- http output plugin leaks FDsLOGSTASH-2282Resolved issue: LOGSTASH-2282Logstash Developers
- S3 input config - credentials never nilLOGSTASH-2281Resolved issue: LOGSTASH-2281Logstash Developers
- S3 configuration doesn't work when loaded via folderLOGSTASH-2280Philippe Weber
- Process dies when trying to *use* it.LOGSTASH-2279Resolved issue: LOGSTASH-2279Logstash Developers
- "java.lang.OutOfMemoryError: Java heap space" when using rabbitmq input (march_hare variant) with ack => falseLOGSTASH-2278Resolved issue: LOGSTASH-2278Logstash Developers
- RabbitMQ input should support multi ackLOGSTASH-2277Avishai Ish-Shalom
- RabbitMQ input (march_hare variant) uses incorrect connection urlLOGSTASH-2276Resolved issue: LOGSTASH-2276Logstash Developers
- logstash crash when elasticsearch output no longer reachableLOGSTASH-2275Resolved issue: LOGSTASH-2275Logstash Developers
- multiline codec: logstash getting blockedLOGSTASH-2274Jordan Sissel
- Logstash does not appear to cleanup after itself well (specifically S3)LOGSTASH-2273Resolved issue: LOGSTASH-2273Logstash Developers
- kv filter: support escaped quotesLOGSTASH-2272Resolved issue: LOGSTASH-2272Aaron Mildenstein
- contrib zabbix plugin - zabbix_sender [805]: Warning: incorrect answer from server []LOGSTASH-2271Logstash Developers
- redis input reconnectLOGSTASH-2270Logstash Developers
- Zabbix plugin crashLOGSTASH-2269Resolved issue: LOGSTASH-2269Logstash Developers
- How to troubleshoot Exception: java.lang.ThreadDeathLOGSTASH-2268Logstash Developers
- One output blocking will block all outputs.LOGSTASH-2267Resolved issue: LOGSTASH-2267Philippe Weber
- Documentation for metrics filter uses wrong exampleLOGSTASH-2266Resolved issue: LOGSTASH-2266Logstash Developers
- How to consume Logstash's own messages?LOGSTASH-2265Resolved issue: LOGSTASH-2265Logstash Developers
- "make package" is a bit fragileLOGSTASH-2264Resolved issue: LOGSTASH-2264Logstash Developers
- filter chaining questionLOGSTASH-2263Logstash Developers
- Guidance on lookupLOGSTASH-2262Logstash Developers
- Remove unneeded fields in elasticsearch templateLOGSTASH-2261Resolved issue: LOGSTASH-2261Philippe Weber
- Redis output balancingLOGSTASH-2260Resolved issue: LOGSTASH-2260Logstash Developers
- file input plugin overrides "path" field in jsonLOGSTASH-2259Resolved issue: LOGSTASH-2259Philippe Weber
- Critical error in multiline filter pluginLOGSTASH-2258Resolved issue: LOGSTASH-2258Logstash Developers
- plugin install contrib failsLOGSTASH-2257Logstash Developers
- contrib plugin: cipher filter, base64 encoding bug on encryption, support for random IVsLOGSTASH-2256Logstash Developers
- sqs input does not work after a whileLOGSTASH-2255Resolved issue: LOGSTASH-2255Logstash Developers
- sqs input does not work after a whileLOGSTASH-2254Resolved issue: LOGSTASH-2254Logstash Developers
- Mixed up Init and upstart configs and process.LOGSTASH-2253Logstash Developers
- Exclude .gitignore files from the release tarballsLOGSTASH-2252Resolved issue: LOGSTASH-2252Jordan Sissel
- fingerprint punctuation doesn't just leave punctuationLOGSTASH-2251Resolved issue: LOGSTASH-2251Logstash Developers
- [ES_master] observer: timeout notification from cluster service. timeout setting [1m], time since start [1m]LOGSTASH-2250Logstash Developers
- Contrib distribution overwrites some files in LogstashLOGSTASH-2249Logstash Developers
- Logstash contrib plugin manual installation steps are not correctLOGSTASH-2248Logstash Developers
- Logstash crashs and Google BigQuery feature upgradeLOGSTASH-2247Logstash Developers
- UndefinedConversionError with UTF-8 encoding in xml pluginLOGSTASH-2246Resolved issue: LOGSTASH-2246Philippe Weber
- Input imap - undefined method encode for nil:NilClassLOGSTASH-2245Logstash Developers
- Running logstash with wildcard configuration failsLOGSTASH-2244Resolved issue: LOGSTASH-2244Philippe Weber
- Make it configurable, in what timezone events are written to the outputLOGSTASH-2243Resolved issue: LOGSTASH-2243Philippe Weber
- Logstash JMX input plugin doesn't support add_fieldLOGSTASH-2242Resolved issue: LOGSTASH-2242Logstash Developers
- logstash takes forever to run, even just 'logstash version'LOGSTASH-2241Resolved issue: LOGSTASH-2241Logstash Developers
- fingerprint filter fails on Windows for SHA & MD5LOGSTASH-2240Resolved issue: LOGSTASH-2240Logstash Developers
- Unable to stop Logstash with a unix inputLOGSTASH-2239Philippe Weber
50 of
undefined method `flat_map' for nil:NilClass when conditional on an output
Fixed
Details
Details
Assignee
Colin Surprenant
Colin SurprenantReporter
Ryan O'Keeffe
Ryan O'KeeffeFix versions
Affects versions
Created September 19, 2014 at 6:08 PM
Updated September 23, 2014 at 2:38 PM
Resolved September 23, 2014 at 2:38 PM
Activity
Show:
Colin Surprenant September 23, 2014 at 2:37 PM
merged in master!
Colin Surprenant September 23, 2014 at 12:51 PM
Confirmed. Thanks for the report! See https://github.com/elasticsearch/logstash/pull/1768
Will be merged in master shortly!
Ryan O'Keeffe September 19, 2014 at 6:21 PMEdited
Looks like its related to the events local var not being set initially for the output_func in the compiled config.
Related code starts at line 73: https://github.com/elasticsearch/logstash/blob/master/lib/logstash/config/config_ast.rb#L73
Perhaps the fix is to change this line to include "output" as well (or remove the conditional around it) but I don't have the experience with this code to really know for sure at this point. https://github.com/elasticsearch/logstash/blob/master/lib/logstash/config/config_ast.rb#L77-L79
["filter", "output"].each do |type|
# defines @filter_func and @output_func
definitions << "@#{type}_func = lambda do |event, &block|"
if type == "filter"
definitions << " events = [event]"
end
...
to
["filter", "output"].each do |type|
# defines @filter_func and @output_func
definitions << "@#{type}_func = lambda do |event, &block|"
definitions << " events = [event]"
...
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