# Logstash crash when starting after messing the queue files

**URL:** <https://discuss.elastic.co/t/logstash-crash-when-starting-after-messing-the-queue-files/324708>\
**Category:** Logstash\
**Created:** [February 4, 2023, 11:10am UTC](https://discuss.elastic.co/t/logstash-crash-when-starting-after-messing-the-queue-files/324708 "2023-02-04T11:10:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baygon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baygon/32/91792_2.png) [@Baygon](https://discuss.elastic.co/u/Baygon)\
**Post date:** [February 4, 2023, 11:10am UTC](https://discuss.elastic.co/t/logstash-crash-when-starting-after-messing-the-queue-files/324708/1 "2023-02-04T11:10:02Z")

</div>

I've just upgraded Logstash minor version from 7.13 to 7.17.9, but it doesn't restart, erroring about inability to create queues (there was a forced stop of Logstash, so I assume the files are corrupted).  
I tried to delete the queue folders:  
/usr/share/logstash/data/prod/queue/  
Which was a big mistake... and now it errors the following:

```auto
[2023-02-04T11:08:52,519][INFO][logstash.runner] Log4j configuration path used is: /etc/logstash/log4j2.properties
[2023-02-04T11:08:52,530][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"7.17.9", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.18+10 on 11.0.18+10 +indy +jit [linux-x86_64]"}
[2023-02-04T11:08:52,533][INFO][logstash.runner] JVM bootstrap flags: [-Xms4g, -Xmx16g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -Djruby.regexp.interruptible=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true]
[2023-02-04T11:08:52,571][FATAL][org.logstash.Logstash] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.20.1.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?]
        at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]

```

How can I restore logstash, should I delete the data folder completely ?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 4, 2023, 1:10pm UTC](https://discuss.elastic.co/t/logstash-crash-when-starting-after-messing-the-queue-files/324708/2 "2023-02-04T13:10:09Z")

</div>

> [@Baygon](#):
>
> `at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]`

This may indicate a configuration error, did you change anything else?

Check the systems log for any hint of why the service is not starting, look at `/var/log/messages` or `/var/log/syslog` depending on the distribution.

---

<div class="post-metadata">

**Author:** ![Baygon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baygon/32/91792_2.png) [@Baygon](https://discuss.elastic.co/u/Baygon)\
**Post date:** [February 5, 2023, 3:34am UTC](https://discuss.elastic.co/t/logstash-crash-when-starting-after-messing-the-queue-files/324708/3 "2023-02-05T03:34:10Z")

</div>

Thanks for your answer.

There was no change to the config files, just the upgrade.  
I ended making a VM snapshot and deleting the full data/prod/ folder and it solved the issue.

However I get a lot of issues with the tracking metadata, I'll open another topic on that.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 5, 2023, 3:34am UTC](https://discuss.elastic.co/t/logstash-crash-when-starting-after-messing-the-queue-files/324708/4 "2023-03-05T03:34:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
