# While updating logstash 1.4.2 we encounter - Unable to find JRuby error

**URL:** <https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152>\
**Category:** Logstash\
**Created:** [December 2, 2015, 11:00am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152 "2015-12-02T11:00:42Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![meet2datta](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@meet2datta](https://discuss.elastic.co/u/meet2datta)\
**Post date:** [December 7, 2015, 10:02am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/21 "2015-12-07T10:02:18Z")

</div>

ok I have checked /etc/init.d/logstash with working logstash 2.1.0 environment & found 1 difference --  
export PATH HOME LS\_HEAP\_SIZE LS\_JAVA\_OPTS LS\_USE\_GC\_LOGGING JAVACMD

After adding above entry in /etc/init.d/logstash still it is not working ..

# echo $JAVA\_HOME

/usr/bin/java

one thing to note is -- If we downgrade this logstash 2.1.0 to 1.4.2 version by YUM it works.  
After downgrading I could see the logstash.lib & logstash files are as it is but still it works.

So it looks to me something with 1.4.2 binary .. not with config ..

---

<div class="post-metadata">

**Author:** ![meet2datta](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@meet2datta](https://discuss.elastic.co/u/meet2datta)\
**Post date:** [December 7, 2015, 10:04am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/22 "2015-12-07T10:04:03Z")

</div>

The ERROR still exists in logstash.err --

# tail -f /var/log/logstash/logstash.err

Could not find any executable java binary. Please install java in your PATH or set JAVA\_HOME.

---

<div class="post-metadata">

**Author:** ![meet2datta](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@meet2datta](https://discuss.elastic.co/u/meet2datta)\
**Post date:** [December 8, 2015, 4:44am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/23 "2015-12-08T04:44:59Z")

</div>

Could you please help in this regards..

---

<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 8, 2015, 6:33am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/24 "2015-12-08T06:33:03Z")

</div>

> After adding above entry in /etc/init.d/logstash still it is not working ..

> echo $JAVA\_HOME  
> /usr/bin/java

Wait, what? JAVA\_HOME should not point to /usr/bin/java. It should point to the root directory of the JVM—/usr/lib/jvm/java-8-oracle/jre or similar. /usr/bin/java is probably a (possibly recursive) symlink. Follow it until you find the JVM directory.

---

<div class="post-metadata">

**Author:** ![meet2datta](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@meet2datta](https://discuss.elastic.co/u/meet2datta)\
**Post date:** [December 8, 2015, 8:39am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/25 "2015-12-08T08:39:54Z")

</div>

[root@xyz ~]# echo $JAVA\_HOME  
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6\_7.x86\_64/jre  
[root@xyz ~]#  
[root@xyz ~]# service logstash status  
logstash is not running  
[root@xyz ~]# service logstash start  
logstash started.  
[root@xyz ~]# date; service logstash status  
Tue Dec 8 03:19:24 EST 2015  
logstash is not running  
[root@xyz ~]# rpm -qa | grep logstash  
logstash-2.1.0-1.noarch  
[root@xyz ~]#  
[root@xyz ~]# tail -f /var/log/logstash/logstash.err  
Could not find any executable java binary. Please install java in your PATH or set JAVA\_HOME.  
^C  
[root@xyz ~]# ls -l /var/log/logstash/logstash.err  
-rw-r--r-- 1 root root 94 Dec 8 03:19 /var/log/logstash/logstash.err  
[root@xyz ~]#

I just downgraded logstash to previous version , no configuration changes & it works ..

[root@xyz ~]# rpm -qa | grep logstash  
logstash-1.4.2-1\_2c0f5a1.noarch  
[root@xyz ~]#  
[root@xyz ~]# date; service logstash status  
Tue Dec 8 03:27:22 EST 2015  
logstash is not running  
[root@xyz ~]# ls -l /opt/logstash/bin/  
total 36  
-rwxr-xr-x 1 logstash logstash 1338 Jun 24 2014 logstash  
-rw-rw-r-- 1 logstash logstash 2651 Jun 24 2014 logstash.bat  
-rwxrwxr-x 1 logstash logstash 2716 Jun 24 2014 logstash.lib.sh  
-rwxr-xr-x 1 logstash logstash 4377 Dec 2 02:26 logstash.lib.sh\_original  
-rwxr-xr-x 1 logstash logstash 1086 Dec 2 02:27 logstash\_original  
-rwxrwxr-x 1 logstash logstash 84 Jun 24 2014 logstash-test  
-rwxrwxr-x 1 logstash logstash 82 Jun 24 2014 logstash-web  
-rwxrwxr-x 1 logstash logstash 1531 Jun 24 2014 plugin  
[root@xyz ~]# service logstash start  
logstash started.  
[root@xyz ~]# service logstash status  
logstash is running  
[root@xyz ~]# tail -f /var/log/logstash/logstash.err  
^C  
[root@xyz ~]#

Please let me know can we use these logstash, logstash.lib files for version 2.1.0..

---

<div class="post-metadata">

**Author:** ![meet2datta](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@meet2datta](https://discuss.elastic.co/u/meet2datta)\
**Post date:** [December 10, 2015, 9:19am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/26 "2015-12-10T09:19:37Z")

</div>

We are trying to update layer by Layer now --

1] Logstash 1.4.2 --\> Logstash 1.5.1 [Successful].  
2] Logstash 1.5.1 --\> Logstash 1.5.2 [Successful].  
3] Logstash 1.5.2 update to any version fails e.g 2.0.0, 2.1.0.

So its strong indication that there is an issue with binary.

Could you please provide how we can resolve this issue.

Thanks,

Datta

---

<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 10, 2015, 10:15am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/27 "2015-12-10T10:15:25Z")

</div>

There's a strong indication that something changed in the startup scripts between 1.5.2 and 2.0.0. Logstash complains about not being able to find the JVM so it's pretty clear what the problem is. Did you try setting JAVA\_HOME _in the init script_ (or, actually, in /etc/sysconfig/logstash which is sourced from the init script)? Setting it in the shell from which you invoke `service logstash start` doesn't make a difference.

Unless new information comes to light I have nothing more to add in this matter.

---

<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:** [July 6, 2017, 5:19am UTC](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152/28 "2017-07-06T05:19:09Z")

</div>



[Previous page](https://discuss.elastic.co/t/while-updating-logstash-1-4-2-we-encounter-unable-to-find-jruby-error/36152.md?page=1)
