Logstash can’t find JRuby

logstash

I download it at https://www.elastic.co/downloads/logstash. And test it in CentOS 7.0. The JRE's version is 1.8.0_101. When I run ./bin/logstash agent -f config/log4j_to_es.conf it prints:

Unable to find JRuby.
If you are a user, this is a bug.
If you are a developer, please run 'rake bootstrap'. Running 'rake' requires the 'ruby' program be available.

I download the TAR.GZ package. I don't know how to fix it.

Best Answer

I have found something really interesting relating to this error, where we see the following error: Unable to find JRuby.

In short, it turned out for me that the TAR.GZ file was incompletely unpacked.

I had a .tar.gz file and used tar -xzf command to extract its contents into a filesystem directory. What was missing was the following directory: logstash-5.5.2/vendor/jruby

I then found out that my server's filesystem was out of space, hence only partial TAR.GZ extraction happened. When I cleared up the filesystem, and unpacked the logstash archive, everything works! Happy days!

Related Topic