# Logstash container stuck in a restart loop

**URL:** <https://discuss.elastic.co/t/logstash-container-stuck-in-a-restart-loop/271372>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [April 27, 2021, 12:40pm UTC](https://discuss.elastic.co/t/logstash-container-stuck-in-a-restart-loop/271372 "2021-04-27T12:40:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gorbroth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gorbroth/32/105251_2.png) [@gorbroth](https://discuss.elastic.co/u/gorbroth)\
**Post date:** [April 27, 2021, 12:40pm UTC](https://discuss.elastic.co/t/logstash-container-stuck-in-a-restart-loop/271372/1 "2021-04-27T12:40:47Z")

</div>

Hi,

My new logstash docker container is stuck in a restart loop .

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/9/694a0cdcddfb58d15cce60dc34391f593da45244.png)

**Error in logs** -

```auto
        Does it try to require a relative path? That's been removed in Ruby 1.9.
        uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require':
        It seems your ruby installation is missing psych (for YAML output).
        To eliminate this warning, please install libyaml and reinstall your ruby.
        [ERROR] 2021-04-27 09:21:00.555 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (GemspecError) There was a LoadError while loading logstash-core.gemspec:
        load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory from
          /usr/share/logstash/logstash-core/logstash-core.gemspec:1:in `block in (root)'
         
        Does it try to require a relative path? That's been removed in Ruby 1.9.

```

I tried what was suggested in the below discussions and checked the /tmp permissions(PFB)

[Logstash6.5: It seems your ruby installation is missing psych - Elastic Stack / Logstash - Discuss the Elastic Stack](https://discuss.elastic.co/t/logstash6-5-it-seems-your-ruby-installation-is-missing-psych/160062)  
[Logstash起動時のエラー - Elastic In Your Native Tongue / 日本語による質問・議論はこちら - Discuss the Elastic Stack](https://discuss.elastic.co/t/logstash/159275/5)

`drwxrwxrwt. 14 root root 360 Apr 27 13:09 tmp`  
ruby -v  
ruby 2.0.0p648 (2015-12-16) [x86\_64-linux]

I'm trying to run the container with a non privilege user , should that be an issue ? Cause it worked when I ran it as a root user . However with the current permissions it should work for all users. It'd be really helpful if someone could help me

Thanks

---

<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:** [May 25, 2021, 12:41pm UTC](https://discuss.elastic.co/t/logstash-container-stuck-in-a-restart-loop/271372/2 "2021-05-25T12:41:20Z")

</div>

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