# Logstash6.5: It seems your ruby installation is missing psych

**URL:** <https://discuss.elastic.co/t/logstash6-5-it-seems-your-ruby-installation-is-missing-psych/160062>\
**Category:** Logstash\
**Created:** [December 9, 2018, 6:34pm UTC](https://discuss.elastic.co/t/logstash6-5-it-seems-your-ruby-installation-is-missing-psych/160062 "2018-12-09T18:34:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevink00](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@kevink00](https://discuss.elastic.co/u/kevink00)\
**Post date:** [December 9, 2018, 6:34pm UTC](https://discuss.elastic.co/t/logstash6-5-it-seems-your-ruby-installation-is-missing-psych/160062/1 "2018-12-09T18:34:15Z")

</div>

Following steps exactly as noted here: [https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html](https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html)

I'm on CentOS 7.5 (3.10.0-862.14.4.el7.x86\_64). New OS installed.

I've installed elasticsearch, kibana, logstash, filebeat --all from elasticsearch-6.x reposotiry. No configurations modified.

**First issue:**

```
export LS_SETTINGS_DIR=/etc/logstash
/usr/share/logstash/bin/logstash -e 'input { stdin { } } output { stdout {} }'

Sending Logstash logs to /var/log/logstash which is now configured via log4j2.properties
[2018-12-09T10:07:49,883][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (LoadError) Could not load FFI Provider: (NotImplementedError) FFI not available: java.lang.UnsatisfiedLinkError: /tmp/jffi2854495824092053690.so: /tmp/jffi2854495824092053690.so: failed to map segment from shared object: Operation not permitted
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
	at java.lang.Runtime.load0(Runtime.java:809)
	at java.lang.System.load(System.java:1086)

[...]

```

Workaround:

```
/etc/logstash/jvm.options

# set the I/O temp directory
#-Djava.io.tmpdir=$HOME
-Djava.io.tmpdir=$HOME

```

While this allows me to run the simple command as noted in the 'Getting Started' docs, I'm unsure if this is the best approach. Please suggest a better solution if available.

**Second issue:**

```
Dec 9 09:17:08 narfy-2102 logstash: uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59:in `require':
Dec 9 09:17:08 narfy-2102 logstash: It seems your ruby installation is missing psych (for YAML output).
Dec 9 09:17:08 narfy-2102 logstash: To eliminate this warning, please install libyaml and reinstall your ruby.
Dec 9 09:17:08 narfy-2102 logstash: [ERROR] 2018-12-09 09:17:08.533 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (GemspecError) There was a LoadError while loading logstash-core.gemspec:
Dec 9 09:17:08 narfy-2102 logstash: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory
Dec 9 09:17:08 narfy-2102 logstash: Does it try to require a relative path? That's been removed in Ruby 1.9.
Dec 9 09:17:08 narfy-2102 systemd: logstash.service: main process exited, code=exited, status=1/FAILURE
Dec 9 09:17:08 narfy-2102 systemd: Unit logstash.service entered failed state.
Dec 9 09:17:08 narfy-2102 systemd: logstash.service failed.
Dec 9 09:17:08 narfy-2102 systemd: logstash.service holdoff time over, scheduling restart.
Dec 9 09:17:08 narfy-2102 systemd: Started logstash.
Dec 9 09:17:08 narfy-2102 systemd: Starting logstash...

```

This appears every 20 seconds in /var/log/messages. The logstash process is very busy cpu. I have verified the following are installed:

libyaml-0.1.4-11.el7\_0.x86\_64  
libyaml-devel-0.1.4-11.el7\_0.x86\_64  
rubygem-psych-2.0.0-34.el7\_6.x86\_64  
ruby-2.0.0.648-34.el7\_6.x86\_64

---

<div class="post-metadata">

**Author:** ![danhermann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danhermann/32/33024_2.png) [@danhermann](https://discuss.elastic.co/u/danhermann)\
**Post date:** [December 17, 2018, 1:34pm UTC](https://discuss.elastic.co/t/logstash6-5-it-seems-your-ruby-installation-is-missing-psych/160062/2 "2018-12-17T13:34:57Z")

</div>

@kevink00, this occurs when Logstash runs on a system where `/tmp` is mounted `noexec`. A number of Logstash dependencies copy jar files and other executables to the temp directory that are later executed. The proper resolution for this is what you identified -- setting the JVM temp directory to a directory that is both writable by the Logstash process and not mounted as `noexec`.

---

<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 14, 2019, 1:35pm UTC](https://discuss.elastic.co/t/logstash6-5-it-seems-your-ruby-installation-is-missing-psych/160062/3 "2019-01-14T13:35:09Z")

</div>

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