After installation of logstash 1.4.2 rpm on CentOS, I got stuck across this error:
[root@psj admin]# tail -f /var/log/logstash/logstash.err
require at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at org/jruby/RubyKernel.java:1085
(root) at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/ffi.rb:1
(root) at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at org/jruby/RubyKernel.java:1085
LibC at /opt/logstash/lib/logstash/util/prctl.rb:4
(root) at /opt/logstash/lib/logstash/util/prctl.rb:3
main at /opt/logstash/lib/logstash/runner.rb:79
(root) at /opt/logstash/lib/logstash/runner.rb:215
^C
[root@psj admin]# service logstash status
logstash is not running
After some time, I realized that it may be a path issue or not getting proper java environment variables issue.
So, to get rid of this, please check your environment for JAVA paths:
[root@psj ELK]# cat /etc/environment
JRE_HOME=/usr/java/jre1.8.0_40/
JAVA_HOME=/usr/java/jdk1.8.0_31
JDK_HOME=/usr/java/jdk1.8.0_31/
[root@psj ELK]# source /etc/environment
Also, add logstash and java to the path:
[root@psj ELK]# export PATH=$PATH:/usr/java/default/bin
[root@psj ELK]# export PATH=/opt/logstash/bin:$PATH
[root@psj ELK]# service logstash status
logstash is running
If this is not your case, perhaps, you can look up bug details reported on github.
https://github.com/elastic/logstash/issues/1289
[root@psj admin]# tail -f /var/log/logstash/logstash.err
require at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at org/jruby/RubyKernel.java:1085
(root) at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/ffi.rb:1
(root) at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at org/jruby/RubyKernel.java:1085
LibC at /opt/logstash/lib/logstash/util/prctl.rb:4
(root) at /opt/logstash/lib/logstash/util/prctl.rb:3
main at /opt/logstash/lib/logstash/runner.rb:79
(root) at /opt/logstash/lib/logstash/runner.rb:215
^C
[root@psj admin]# service logstash status
logstash is not running
After some time, I realized that it may be a path issue or not getting proper java environment variables issue.
So, to get rid of this, please check your environment for JAVA paths:
[root@psj ELK]# cat /etc/environment
JRE_HOME=/usr/java/jre1.8.0_40/
JAVA_HOME=/usr/java/jdk1.8.0_31
JDK_HOME=/usr/java/jdk1.8.0_31/
[root@psj ELK]# source /etc/environment
Also, add logstash and java to the path:
[root@psj ELK]# export PATH=$PATH:/usr/java/default/bin
[root@psj ELK]# export PATH=/opt/logstash/bin:$PATH
[root@psj ELK]# service logstash status
logstash is running
If this is not your case, perhaps, you can look up bug details reported on github.
https://github.com/elastic/logstash/issues/1289
No comments:
Post a Comment