Installing Kibana on a Raspberry Pi 4 using Raspbian Buster

I have ES and logstash 7.4 installed on a RPi 4B. I understand that Kibana no longer supports 32-bit operating systems, but I found another thread where someone installed 64-bit Kibana on a 32-bit OS.

I figured I could attempt this on Raspbian, so here are the commands I used:

sudo apt-get install nodejs

mkdir /usr/share/kibana && cd /usr/share/kibana

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.4.0-amd64.deb

sudo dpkg -i --force-all kibana-7.4.0-amd64.deb

Finally, I attempted to start it using my node installation from the directory /usr/share/kibana. Kibana attempts to start, but after several seconds I get a fatal error:

pi@raspberrypi:/usr/share/kibana $ /usr/bin/node src/cli
log [04:29:36.441] [info][plugins-system] Setting up [4] plugins: [security,translations,inspector,data]
log [04:29:36.501] [info][plugins][security] Setting up plugin
log [04:29:36.509] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
log [04:29:36.511] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.
log [04:29:36.843] [info][plugins][translations] Setting up plugin
log [04:29:36.846] [info][data][plugins] Setting up plugin
log [04:29:36.859] [info][plugins-system] Starting [3] plugins: [security,translations,data]
log [04:30:43.568] [fatal][root] Error: /usr/share/kibana/node_modules/@elastic/nodegit/build/Release/nodegit.node: wrong ELF class: ELFCLASS64
at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/usr/share/kibana/node_modules/@elastic/nodegit/dist/nodegit.js:12:12)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (/usr/share/kibana/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (/usr/share/kibana/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
log [04:30:43.582] [info][plugins-system] Stopping all plugins.
log [04:30:43.584] [info][data][plugins] Stopping plugin
log [04:30:43.586] [info][plugins][translations] Stopping plugin
log [04:30:43.587] [info][plugins][security] Stopping plugin

FATAL Error: /usr/share/kibana/node_modules/@elastic/nodegit/build/Release/nodegit.node: wrong ELF class: ELFCLASS64

I realize that it's not meant to run on a 32-bit OS, but if anyone could help here I would appreciate it. The other Kibana thread I linked seemed to have success using Node to accomplish this, but I'm at a loss on how to continue in my specific circumstance.

@glassman during the build we do some procedures to create our distributables. Right now we use a package called nodegit (https://github.com/elastic/nodegit) which is a native module and as so, one of the required steps from our build is to include the correct nodegit builds per platform (in that case a 64bits version).

I think your only option is to try to build @elastic/nodegit on your platform, then build kibana and in the end replace the nodegit build files on kibana/node_modules/@elastic/nodegit/build

Cheers,

@tiagocosta Thank you for your reply. It certainly helped point me in the right direction. Now I have another question, that is if you (or another knowledgeable stranger) would be generous enough to lend me some more advice.

I was able to build nodegit and place it into the appropriate Kibana directory, but like you said, that wasn't enough as I get the following fatal error when issuing the command '/usr/bin/node src/cli':

pi@raspberrypi:/usr/share/kibana $ /usr/bin/node src/cli

log [02:22:19.275] [info][plugins-system] Setting up [4] plugins: [security,translations,inspector,data]
log [02:22:19.308] [info][plugins][security] Setting up plugin
log [02:22:19.314] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
log [02:22:19.316] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.
log [02:22:19.350] [info][plugins][translations] Setting up plugin
log [02:22:19.351] [info][data][plugins] Setting up plugin
log [02:22:19.359] [info][plugins-system] Starting [3] plugins: [security,translations,data]
log [02:22:33.132] [fatal][root] { Error: Cannot find module '/usr/share/kibana/node_modules/@elastic/node-ctags/ctags/build/ctags-node-v64-linux-arm/ctags.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/usr/share/kibana/node_modules/@elastic/node-ctags/ctags/lib/ctags.js:7:12)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (/usr/share/kibana/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (/usr/share/kibana/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/usr/share/kibana/node_modules/@elastic/ctags-langserver/lib/lsp-server.js:28:28)
at Module._compile (internal/modules/cjs/loader.js:689:30) code: 'MODULE_NOT_FOUND' }
log [02:22:33.148] [info][plugins-system] Stopping all plugins.
log [02:22:33.150] [info][data][plugins] Stopping plugin
log [02:22:33.151] [info][plugins][translations] Stopping plugin
log [02:22:33.152] [info][plugins][security] Stopping plugin

FATAL Error: Cannot find module '/usr/share/kibana/node_modules/@elastic/node-ctags/ctags/build/ctags-node-v64-linux-arm/ctags.node'

Because of that, I've been trying to build Kibana from source. I have Yarn and Nodejs v10.15 installed, but when I try to run 'yarn kbn bootstrap', I get a specific error regarding Cypress that I cannot make go away.

[5/5] Building fresh packages...
[9/74] ⢀ puppeteer
[6/74] ⢀ node-sass
[12/74] ⠠ backport
[8/74] ⠠ yo
error /home/pi/kibana/node_modules/cypress: Command failed.
Exit code: 1
Command: node index.js --exec install
Arguments:
Directory: /home/pi/kibana/node_modules/cypress
Output:
Installing Cypress (version: 3.4.1)

[06:37:48] Downloading Cypress [started]
[06:37:51] Downloading Cypress [failed]
[06:37:51] → The Cypress App could not be downloaded.

I guess Cypress only supports up to version 3.2.0 for 32-bit operating systems, so I'm trying to figure out a way to either use version 3.2.0 or get rid of Cypress completely.

I've tried issuing the command 'yarn upgrade cypress@3.2.0' which to my understanding is supposed to update the yarn.lock file when finished, but even that doesn't make it through as for some reason, the upgrade process again gives me a message (like above) about failing to download Cypress 3.4.1.

Heck, I even tried taking Cypress out of the top level package.json and yarn.lock files completely, but no matter what I do, the yarn upgrade/bootstrap/install process will try to install Cypress 3.4.1. Any ideas on what I should do?

@tiagocosta I have Kibana 7.4.0 working for the RPi 4. Before I post the steps I took, I wanted to know your thoughs on node-ctags. Is there a place where I can get/compile a 32-bit feature comparable version of the 64-bit one included in Kibana?

As is stands, I have a version of ctags that works, but I don't know if it will present any issues moving forward as it was kind of "hacky" to get it to work in the first place.

1 Like

Hello, I have the same problem as you when I install kibana on Raspberry pi 4B, How did you solve it? Can you give me some advice?