# Logstash-6.0.0 displays an unhelpful NullPointerException Error in case of corrupted persistent queue

**URL:** <https://discuss.elastic.co/t/logstash-6-0-0-displays-an-unhelpful-nullpointerexception-error-in-case-of-corrupted-persistent-queue/108641>\
**Category:** Logstash\
**Created:** [November 22, 2017, 5:43am UTC](https://discuss.elastic.co/t/logstash-6-0-0-displays-an-unhelpful-nullpointerexception-error-in-case-of-corrupted-persistent-queue/108641 "2017-11-22T05:43:51Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Dheeraj\_Gupta](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Dheeraj\_Gupta](https://discuss.elastic.co/u/Dheeraj_Gupta)\
**Post date:** [November 24, 2017, 4:50am UTC](https://discuss.elastic.co/t/logstash-6-0-0-displays-an-unhelpful-nullpointerexception-error-in-case-of-corrupted-persistent-queue/108641/5 "2017-11-24T04:50:43Z")

</div>

Hi @colinsurprenant . Thanks for your reply.

> [@colinsurprenant](#):
>
> Could you elaborate a bit more on your exact restart process?

The restart was using `service logstash restart` (service script as provided by logstash RPM).

I have another open question [here](https://discuss.elastic.co/t/counters-can-not-be-incremented-by-negative-values-error-when-using-metric-filters-freezes-workers-and-corrupts-the-persistent-queue/108644), where I have reported an error logged by metrics leading to drop in performance. Service restart was necessitated because of that issue.

> [@colinsurprenant](#):
>
> Was LS stuck or did the shutdown process hang or did the shutdown completed "cleanly" - how did you do the shutdown?

The shutdown process did not "hang". It did take some time with a number of messages about `"inflight_count"=>` like it always does, but the last message logged was `Pipeline terminated` (as always) so to me it appeared that shutdown was clean.

> [@colinsurprenant](#):
>
> Also do you have any other relevant logs prior to the shutdown and prior the the exception on restart?

Logs on restart are:

```
[2017-11-22T10:38:34,625][INFO][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
[2017-11-22T10:38:34,629][INFO][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
[2017-11-22T10:38:34,842][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
...a really big line that I can't add because of post limits (see screenshot)...
[2017-11-22T10:58:19,939][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'"]}

```

 ![Screenshot](https://us1.discourse-cdn.com/elastic/original/3X/a/5/a5b6233ca41f45ec64868b34e2de12d23b4ac356.png)

For 5.6.0, the same node gave the following stack-trace

```
[2017-11-22T10:59:41,020][INFO][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
[2017-11-22T10:59:41,026][INFO][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
[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:in `create_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:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:286:in `create_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:95:in `register_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:in `run'", "/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:in `run'", "/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"}

```

After this I removed all existing pages, upgraded back to 6.0.0 and then logstash service started correctly.

Regards,  
Dheeraj

---

_[View the full topic](https://discuss.elastic.co/t/logstash-6-0-0-displays-an-unhelpful-nullpointerexception-error-in-case-of-corrupted-persistent-queue/108641)._
