# Logstash fails to start: "no such file to load -- concurrent"

**URL:** <https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268>\
**Category:** Logstash\
**Created:** [November 2, 2021, 9:38pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268 "2021-11-02T21:38:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwasss](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dwasss](https://discuss.elastic.co/u/dwasss)\
**Post date:** [November 2, 2021, 9:38pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/1 "2021-11-02T21:38:30Z")

</div>

I recently upgraded my Elastic stack from 7.12 to 7.15.1 on Ubuntu 18.04. Logstash is running via systemd. Now Logstash fails to start with the following error:

```auto
Nov 02 19:58:28 server logstash[30340]: Using bundled JDK: /usr/share/logstash/jdk
Nov 02 19:58:36 server logstash[30340]: [FATAL] 2021-11-02 19:58:36.526 [main] Logstash - Logstash stopped processing because of an error: (LoadError) no such file to load -- concurrent
Nov 02 19:58:36 server logstash[30340]: org.jruby.exceptions.LoadError: (LoadError) no such file to load -- concurrent
Nov 02 19:58:36 server logstash[30340]: at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974) ~[jruby-complete-9.2.19.0.jar:?]
Nov 02 19:58:36 server logstash[30340]: at RUBY.<main>(/usr/share/logstash/logstash-core/lib/logstash/config/defaults.rb:18) ~[?:?]
Nov 02 19:58:36 server logstash[30340]: at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974) ~[jruby-complete-9.2.19.0.jar:?]
Nov 02 19:58:36 server logstash[30340]: at RUBY.<main>(/usr/share/logstash/logstash-core/lib/logstash/config/cpu_core_strategy.rb:18) ~[?:?]
Nov 02 19:58:36 server logstash[30340]: at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974) ~[jruby-complete-9.2.19.0.jar:?]
Nov 02 19:58:36 server logstash[30340]: at RUBY.<main>(/usr/share/logstash/logstash-core/lib/logstash/environment.rb:19) ~[?:?]
Nov 02 19:58:36 server logstash[30340]: at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974) ~[jruby-complete-9.2.19.0.jar:?]
Nov 02 19:58:36 server logstash[30340]: at RUBY.<main>(/usr/share/logstash/logstash-core/lib/logstash/runner.rb:38) ~[?:?]
Nov 02 19:58:36 server logstash[30340]: at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974) ~[jruby-complete-9.2.19.0.jar:?]
Nov 02 19:58:36 server logstash[30340]: at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:92) ~[?:?]

```

It seems like there is a problem with jruby and some missing file? Can anyone help?

I did try the config test and exit option and that seemed to work just fine.

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [November 2, 2021, 9:44pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/2 "2021-11-02T21:44:29Z")

</div>

It seems your .conf file is missing. Do you have good extension .conf?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 2, 2021, 10:26pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/3 "2021-11-02T22:26:19Z")

</div>

> [@dwasss](#):
>
> It seems like there is a problem with jruby and some missing file? Can anyone help?

I cannot help, just thought I would mention that it is trying to load a specific version of the concurrent gem, and it is not finding the version of that gem that it expects. I really don't know how to dig any deeper into that.

---

<div class="post-metadata">

**Author:** ![dwasss](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dwasss](https://discuss.elastic.co/u/dwasss)\
**Post date:** [November 2, 2021, 10:35pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/4 "2021-11-02T22:35:18Z")

</div>

Which .conf file? I have several in /etc/logstash/conf.d/ that should be fine.

---

<div class="post-metadata">

**Author:** ![dwasss](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dwasss](https://discuss.elastic.co/u/dwasss)\
**Post date:** [November 2, 2021, 10:37pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/5 "2021-11-02T22:37:06Z")

</div>

Is that something I can manually install or load? How can I see what gems are already installed?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 2, 2021, 10:45pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/6 "2021-11-02T22:45:04Z")

</div>

logstash should come bundled with all the gems it depends on. On my system I see

```auto
drwxr-xr-x 4 root root 28 Mar 4 2020 /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5
drwxr-xr-x 4 root root 28 Sep 3 2020 /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.6
drwxr-xr-x 4 root root 28 Mar 10 2021 /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.7
drwxr-xr-x 4 root root 28 Jun 14 20:17 /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.8
drwxr-xr-x 4 root root 115 Oct 15 13:45 /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.9

```

Have you installed any additional plugins that could be adding dependencies?

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [November 3, 2021, 7:52am UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/7 "2021-11-03T07:52:50Z")

</div>

[dwasss], have you try to test a single conf file from command line:  
/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/test.conf --path.settings /etc/logstash/ -t  
Then without "-t"  
Have you enable debug mode?

- config.debug: true
- log.level: debug

---

<div class="post-metadata">

**Author:** ![dwasss](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dwasss](https://discuss.elastic.co/u/dwasss)\
**Post date:** [November 3, 2021, 5:16pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/8 "2021-11-03T17:16:24Z")

</div>

> [@Badger](#):
>
> `/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/`

I don't think I added any more plugins. I see that I do have the latest concurrent version there:

```auto
drwxr-xr-x 4 root root 4.0K Nov 2 19:19 concurrent-ruby-1.1.9

```

---

<div class="post-metadata">

**Author:** ![dwasss](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dwasss](https://discuss.elastic.co/u/dwasss)\
**Post date:** [November 3, 2021, 5:46pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/9 "2021-11-03T17:46:44Z")

</div>

I tried enabling debug logging but logstash wouldn't even start so there wasn't really a point.

I did just try from the command line with the "-t" switch and got an error. I then tried running with "sudo" and it validated and exited OK. So I guess it's a permissions issue?

```auto
Using bundled JDK: /usr/share/logstash/jdk
/usr/share/logstash/logstash-core-plugin-api/lib/logstash-core-plugin-api/version.rb:22: warning: The Psych YAML extension failed to load.
Check your env for conflicting versions of SnakeYAML
See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment
[FATAL] 2021-11-03 17:40:50.633 [main] Logstash - Logstash stopped processing because of an error: (GemspecError) 
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory. Bundler cannot continue.

 # from /usr/share/logstash/logstash-core-plugin-api/logstash-core-plugin-api.gemspec:23
 # -------------------------------------------
 #  
 > require "logstash-core-plugin-api/version"
 #  
 # -------------------------------------------

org.jruby.exceptions.StandardError: (GemspecError) 
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory. Bundler cannot continue.
...

```

---

<div class="post-metadata">

**Author:** ![dwasss](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dwasss](https://discuss.elastic.co/u/dwasss)\
**Post date:** [November 3, 2021, 7:47pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/10 "2021-11-03T19:47:06Z")

</div>

There were a lot of permissions issues I kept running into with various files, such as in the jruby plugins, java tmp folder, logstash logs folder, etc. that kept causing errors. Furthermore, the /usr/share/logstash/ directory and subfolders were all owned by root, thus there were more permissions issues. I just changed ownership to the logstash user and then things started working again.

I think I'm good now. Thanks @Rios and @Badger for your troubleshooting help. I'm not sure why upgrading from 7.12 to 7.15.1 jacked up the file and folder permissions 😖

---

<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:** [December 1, 2021, 7:47pm UTC](https://discuss.elastic.co/t/logstash-fails-to-start-no-such-file-to-load-concurrent/288268/11 "2021-12-01T19:47:46Z")

</div>

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