# Logstash 5 unexpected error occurred queue must be a writable

**URL:** <https://discuss.elastic.co/t/logstash-5-unexpected-error-occurred-queue-must-be-a-writable/68926>\
**Category:** Logstash\
**Created:** [December 13, 2016, 7:20pm UTC](https://discuss.elastic.co/t/logstash-5-unexpected-error-occurred-queue-must-be-a-writable/68926 "2016-12-13T19:20:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![namobuddhaonion](https://avatars.discourse-cdn.com/v4/letter/n/b77776/32.png) [@namobuddhaonion](https://discuss.elastic.co/u/namobuddhaonion)\
**Post date:** [December 13, 2016, 7:20pm UTC](https://discuss.elastic.co/t/logstash-5-unexpected-error-occurred-queue-must-be-a-writable/68926/1 "2016-12-13T19:20:48Z")

</div>

```
I installed Logstash using the following guide (I also have Elasticseach and Kibana 5) on an Ubuntu 16.0x base.

https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html

Logstash appears to work from the command, but when I try to start it as a service, I get the following error.

[2016-12-13T14:13:38,292][FATAL][logstash.runner] An unexpected error occurred! {:error=>#<ArgumentError: Path "/usr/share/logstash/data/queue" must be a writable directory. It is not writable.>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/settings.rb:420:in `validate'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:202:in `validate_value'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:118:in `validate_all'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:117:in `validate_all'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:205: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:178: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)'"]}

Cat /var/log/syslog | grep logstash has the following, it looks like the service is trying to start over and over:

Dec 13 14:13:37 lab-elk50 logstash[22670]: Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties
Dec 13 14:13:38 lab-elk50 systemd[1]: logstash.service: Main process exited, code=exited, status=1/FAILURE
Dec 13 14:13:38 lab-elk50 systemd[1]: logstash.service: Unit entered failed state.
Dec 13 14:13:38 lab-elk50 systemd[1]: logstash.service: Failed with result 'exit-code'.
Dec 13 14:13:38 lab-elk50 systemd[1]: logstash.service: Service hold-off time over, scheduling restart.
Dec 13 14:13:38 lab-elk50 systemd[1]: Stopped logstash.
Dec 13 14:13:38 lab-elk50 systemd[1]: Started logstash.

 (I set it up as a service in auto start with systemd using
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable logstash.service`Preformatted text`
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 18, 2016, 8:50pm UTC](https://discuss.elastic.co/t/logstash-5-unexpected-error-occurred-queue-must-be-a-writable/68926/2 "2016-12-18T20:50:16Z")

</div>

Please edit your post and format your log snippet as preformatted text. When you don't do that, the really important part of the log message (the stuff that follows `:errors=>#`) is filtered out.

---

<div class="post-metadata">

**Author:** ![namobuddhaonion](https://avatars.discourse-cdn.com/v4/letter/n/b77776/32.png) [@namobuddhaonion](https://discuss.elastic.co/u/namobuddhaonion)\
**Post date:** [December 20, 2016, 9:15pm UTC](https://discuss.elastic.co/t/logstash-5-unexpected-error-occurred-queue-must-be-a-writable/68926/3 "2016-12-20T21:15:53Z")

</div>

Thanks!

I changed it as requested. Any ideas why Logstash won't startup as a service, it works from the command line.

Thanks again!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 20, 2016, 9:17pm UTC](https://discuss.elastic.co/t/logstash-5-unexpected-error-occurred-queue-must-be-a-writable/68926/4 "2016-12-20T21:17:52Z")

</div>

> I changed it as requested.

Next time, format the _the log snippet_ as preformatted text. Not the whole post.

Well, here's your error message:

> Path "/usr/share/logstash/data/queue" must be a writable directory. It is not writable.

So, make sure the directory is writable for the Logstash user.

---

<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:** [January 17, 2017, 9:18pm UTC](https://discuss.elastic.co/t/logstash-5-unexpected-error-occurred-queue-must-be-a-writable/68926/5 "2017-01-17T21:18:02Z")

</div>

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