I upgraded my logstash node to 6.0.0 from 5.6.0. Initially the node worked fine, but today I tried to restart it and the node refused to start. The error logged was
[2017-11-22T10:41:30,054][ERROR][logstash.agent ] An exception happened when converging configuration {:exception=>LogStash::Error, :message=>"Don't know how to handle `Java::JavaLang::NullPointerException` for `LogStash::PipelineAction::Create/pipeline_id:main`", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/converge_result.rb:27:in `create'", "/usr/share/logstash/logstash-core/lib/logstash/converge_result.rb:67:in `add'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:347:in `block in converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in `with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:332:in `block in converge_state'", "org/jruby/RubyArray.java:1734:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:319:in `converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:166:in `block in converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in `with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:in `converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:90:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:362:in `block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}
So after many restarts, I downgraded to 5.6.0 and tried restarting. Now logstash gave up with an error like
[2017-11-22T10:59:44,603][ERROR][logstash.pipeline ] Logstash failed to create queue {"exception"=>"Page file size 0 different to configured page capacity 262144000 for /data/logstash/queue/main/page.16", "backtrace"=>["org/logstash/ackedqueue/ext/JrubyAckedQueueExtLibrary.java:133:in
open'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_acked_queue.rb:41:in
with_queue'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_acked_queue.rb:30:increate_file_based'", "/usr/share/logstash/logstash-core/lib/logstash/queue_factory.rb:29:in
create'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:168:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:286:in
create_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:95:inregister_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:309:in
execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:204:in
run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in
(root)'"]}
[2017-11-22T10:59:44,604][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Page file size 0 different to configured page capacity 262144000 for /data/logstash/queue/main/page.16"}
Apparently the page file was corrupted. So I removed all existing page files and upgraded back to 6.0.0. Tried starting Logstash and it worked.
Has the helpful page size wrong message been replaced with a NullPointerException due to a bug?