Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running elasticsearch container on raspberry pi 3

I am trying to run an containerized Elasticsearch of ELK stack on rpi3. There is no existing image on docker hub, so I am trying to build one from scratch. I used Dockerfile as base and change the base image to resin/rpi-raspbian. However, I encountered several problems:

  1. For ES 5.4.0+, ES process failed to start up due to missing libjnidispatch.so in elastic-bundled jar file (Error: Native library (com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path)
  2. Therefore, I downgrade to se v5.3.2 instead. I got around jna problem and but ES still failed to bootstrap because due to runtime exception (seccomp unavailable: 'arm' architecture unsupported)

Elasticsearch log follows below. [2017-10-03T13:05:44,366][WARN ][o.e.b.JNANatives ] unable to install syscall filter: java.lang.UnsupportedOperationException: seccomp unavailable: 'arm' architecture unsupported

P.S. I already reduce heap size to 512m.

Is there anything I should do to make this happen? Thanks.

like image 505
mcfongtw Avatar asked Oct 03 '17 11:10

mcfongtw


People also ask

Can you run elk stack on Raspberry Pi?

Installing ELK stack on a Raspberry Pi 3 ELK, named for Elasticsearch Logstash and Kibana, is installed on the Raspberry Pi as it would be installed on a Linux server, except for a couple of extra work we'll have to do to run Logstash and Kibana successfully on an ARM architecture.

What is Elasticsearch container?

Elasticsearch is a powerful open source search and analytics engine that makes data easy to explore. docker pull elasticsearch.

Where is Elasticsearch stored Docker?

When you run in Docker, the Elasticsearch configuration files are loaded from /usr/share/elasticsearch/config/ . To use custom configuration files, you bind-mount the files over the configuration files in the image. You can set individual Elasticsearch configuration parameters using Docker environment variables.


1 Answers

Answering my own question in case someone also stumble on the same problem. However, any other answers are welcome!

I came across with a git repo that builds a docker image running on rpi boards. It seems the author has modified the original elasticsearch source code which adds seccomp support on ARM. The docker repo for the modified distribution can be found here.

I have ElasticSearch 2.4 successfullly running on my raspberry pi 3 board. Here is my git repo for reference

like image 76
mcfongtw Avatar answered Sep 29 '22 10:09

mcfongtw