Storj-exporter on Raspberry Pi 4

I am using my rapberry pi 4 as a new node. I am running already 5 other node mostly on debian and ubuntu with storj-exporter, prometheus and grafana without problems.

Now after i installed my first node on raspberry i cant get this node to grafana. I think the problem is on storj-exporter where i get this on startup:

docker run -d --restart=unless-stopped --link=storagenode --name=storj-exporter -p 9651:9651 anclrii/storj-exporter:latest

this is the output - but with docker images i see this image running

Status: Downloaded newer image for anclrii/storj-exporter:latest
WARNING: The requested image’s platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested

Should it work on raspberry or not?

Added info: sudo ss -tulpn does not show the port 9651 anywhere

1 Like

That Dockerimage is not built for an Raspberry CPU Architecture. Anyhow you can Build it by yourself on the Raspberry, then it will work.

Clone this GIT Repository: https://github.com/anclrii/Storj-Exporter and follow its Buildguide (Basically one Command: https://github.com/anclrii/Storj-Exporter#or-build-your-own)

Then it also should run on an Raspberry PI (I did the same for an NAS based on ARM Architecture).

2 Likes

yeah I also mentioned it in my guide: How to monitor all nodes in your LAN using prometheus + grafana [linux using docker]

For arm you have to build the exporter yourself but it’s easy.

2 Likes

Ok now after a while of running there is a new problem on my Raspi.

Blockquote
juerg@raspi-4:~/Storj-Exporter $ sudo docker build -t storj-exporter .
Sending build context to Docker daemon 193.5kB
Step 1/8 : FROM python:3.7-alpine
3.7-alpine: Pulling from library/python
f55b840e27d3: Pull complete
b0d6d0efd5a7: Pull complete
41759a415244: Pull complete
250bdec2f938: Pull complete
b1c5527c8b86: Pull complete
Digest: sha256:94ff0c8e8640dc7202706424a0d995974ae57bb4bd04f22fecb272987d3472ee
Status: Downloaded newer image for python:3.7-alpine
—> c7869c3dc00c
Step 2/8 : COPY requirements.txt /
—> e40fa47c5f48
Step 3/8 : RUN pip install --no-cache-dir -r /requirements.txt
—> Running in a6e7e2d85965
Fatal Python error: _Py_InitializeMainInterpreter: can’t initialize time
PermissionError: [Errno 1] Operation not permitted
Current thread 0xb6fe3390 (most recent call first):
The command ‘/bin/sh -c pip install --no-cache-dir -r /requirements.txt’ returned a non-zero code: 132

interesting, but you don’t need to build for yourself anymore. you can use the docker image directly.

This is an issue on ARM with Docker images based on Alpine 3.13 whether you build or pull the image. Numerous images have been cropping up with issues since the base image was updated to 3.13.

Try the below fix that @Krawi mentioned in the main Storj-Exporter thread, i.e. download a backported updated version of the libseccomp2 package. Also see the LinuxServer.io FAQ which has some more details on this issue. It impacts any 32-bit ARM distro based on Debian Buster.

1 Like

Ok did it:

But i have no chance to get this data into my Grafana Dashboard. All other nodes (5 not arm nodes) are ok.

wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.de

1 Like

I can switch from alpine to a different base image for auto-builds but I have not rpi to test on. If you can confirm the base image that works, I’ll update images. Any other images are likely to take more disk space/ram though.

1 Like

Ups sorry - its working - i just forgot to start it with the “run” command after compiling. But it does not work with the base image.

For one of my projects, I did a quick and dirty freeze to Alpine 3.12.3 so I didn’t have to deal with libseccomp2 on the host. Not sure if that’s the correct approach but it definitely works. This will likely be an issue until the next version of Debian stable is released with an upgraded baseline libseccomp2 package. Popular 32-bit ARM host OSes (RPi, ODroid) will be impacted by this until then.

Perhaps freezing Storj-Exporter to the python:3.7-alpine3.12 baseimage would be an option to consider.

Cool, I did the same, if you have anywhere to test docker pull anclrii/storj-exporter:dev let me know if it works and I’ll update latest.

This should be ok approach I think, just need to remember to “unfreeze” it when it gets resolved :slight_smile:

1 Like

Tested on an Odroid HC2. It works, thanks!

Thanks, that’s latest updated and will keep it frozen for following builds until that issue is resolved.