Unable to build Logstash 2.2.0 on ARM 64

I tried running Logstash 2.2.0 on ARM architecture (aarch64) system (w/ Fedora 22) but I am getting the following error:

[root@arm-01 logstash-2.2.0]# bin/logstash agent -f logstash_json.conf 
io/console not supported; tty will not be manipulated
LoadError: Unsupported platform: unknown-linux
  require at org/jruby/RubyKernel.java:1040
   (root) at /home/nbhoyar/logstash-2.2.0/vendor/jruby/lib/ruby/shared/ffi/ffi.rb:69
  require at org/jruby/RubyKernel.java:1040
   (root) at /home/nbhoyar/logstash-2.2.0/vendor/jruby/lib/ruby/shared/ffi.rb:1
  require at org/jruby/RubyKernel.java:1040
   (root) at /home/nbhoyar/logstash-2.2.0/vendor/jruby/lib/ruby/shared/ffi.rb:1
   (root) at /home/nbhoyar/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.0-java/lib/logstash/util/prctl.rb:1
  require at org/jruby/RubyKernel.java:1040
     LibC at /home/nbhoyar/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.0-java/lib/logstash/util/prctl.rb:3
   (root) at /home/nbhoyar/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.0-java/lib/logstash/util/prctl.rb:2
   (root) at /home/nbhoyar/logstash-2.2.0/lib/bootstrap/environment.rb:67

I did some research on web and then tried building Logstash from source (commit id: 4d153d2) as follows:

$ git clone https://github.com/elastic/logstash.git
$ cd logstash
$ git reflog
4d153d2 HEAD@{0}: clone: from https://github.com/elastic/logstash.git

$ rake bootstrap
mkdir -p vendor
mkdir vendor/_
Downloading http://jruby.org.s3.amazonaws.com/downloads/1.7.24/jruby-bin-1.7.24.tar.gz
Installing minitar >= 0 because the build process needs it.
mkdir -p build
mkdir -p build/bootstrap
[bootstrap] Fetching and installing gem: minitar (>= 0)
Fetching: minitar-0.5.4.gem (100%)
Successfully installed minitar-0.5.4
Installing minitar >= 0 because the build process needs it.
[bootstrap] Fetching and installing gem: minitar (>= 0)
Fetching: minitar-0.5.4.gem (100%)
Successfully installed minitar-0.5.4
Installing bundler ~> 1.9.4 because the build process needs it.
[bootstrap] Fetching and installing gem: bundler (~> 1.9.4)
Fetching: bundler-1.9.10.gem (100%)
Successfully installed bundler-1.9.10
Invoking bundler install...
/home/nbhoyar/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-libs-3.3.3/lib/maven.rb:9 warning: executable? does not in this environment and will return a dummy value
Error Bundler::InstallError, retrying 1/10
An error occurred while installing logstash-core-event-java (3.0.0.dev), and Bundler cannot continue.
Make sure that `gem install logstash-core-event-java -v '3.0.0.dev'` succeeds before bundling.
WARNING: SSLSocket#session= is not supported
/home/nbhoyar/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-libs-3.3.3/lib/maven.rb:9 warning: executable? does not in this environment and will return a dummy value

I then tried installing 'logstash-core-event-java' gem as suggested in the error message but it failed as it is not available in the ruby gem repository (https://rubygems.org/).

$ gem install logstash-core-event-java -v '3.0.0.dev'
ERROR:  Could not find a valid gem 'logstash-core-event-java' (= 3.0.0.dev) in any repository
ERROR:  Possible alternatives: logstash-codec-netflow, logstash-codec-nmap, logstash-event, logstash-codec-avro, logstash-codec-cef

Can anyone please let me know if this is the right way to go about installing on ARM and if so, then how to install logstash-core-event-java gem?

Thank you!
Nachiket

1 Like

kireevco on IRC #logstash channel suggested to build logstash-core-event-java gem from the source (https://github.com/elastic/logstash/tree/master/logstash-core-event-java).

I tried building it using following command but it fails:
# gradle build
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:javadoc UP-TO-DATE
:javadocJar UP-TO-DATE
:sourcesJar UP-TO-DATE
:copyGemjar
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/nbhoyar/logstash/logstash-core-event-java/build/reports/tests/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

System software details:
Java - Open JDK 8 16/02 release (Linaro aarch64)
Gradle - 2.2.1
OS - Fedora 22
Groovy: 2.4.0
Ant: Apache Ant(TM) version 1.9.4 compiled on February 4 2015

1 Like

I have pasted below the stack trace obtained from the test report. The first one is AssertionError and then there are a bunch of Null Pointer exceptions that followed.

org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not start process 'Gradle Test Executor 1'.
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.startProcessing(SuiteTestClassProcessor.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.startProcessing(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.startProcessing(TestWorker.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:360)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.AssertionError
at org.gradle.api.internal.tasks.testing.junit.JUnitTestEventAdapter.(JUnitTestEventAdapter.java:45)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.startProcessing(JUnitTestClassProcessor.java:63)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.startProcessing(SuiteTestClassProcessor.java:39)
... 21 more

org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not execute test class 'com.logstash.AccessorsTest'.
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:360)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:48)
... 21 more

1 Like