HiveMQ CE Broker on Raspberry Pi?

Attempting to run HiveMQ broker on Raspberry Pi, OpenJDK 11.0.12. After executing I get a string of errors, the first is pasted below. Makes me wonder if there is a shared object compatibility issue with the underlying pi architecture. can anyone confirm if it is possible to run this on Raspberry Pi?

There was a similar thread, but it came to no conclusions… (Installation issues on Raspberry Pi 4)

My errors:

2025-04-21 17:54:01,534 INFO - Starting HiveMQ Community Edition Server
2025-04-21 17:54:01,540 INFO - HiveMQ version: 2025.2
2025-04-21 17:54:01,540 INFO - HiveMQ home directory: /home/pi/software/hive/hivemq-ce-2025.2
2025-04-21 17:54:01,925 INFO - Log Configuration was overridden by /home/pi/software/hive/hivemq-ce-2025.2/conf/logback.xml
2025-04-21 17:54:02,699 INFO - This HiveMQ ID is PpbhG
2025-04-21 17:54:04,117 ERROR - Uncaught Error:
com.google.inject.CreationException: Unable to create injector, see the following errors:

  1. [Guice/ErrorInjectingConstructor]: UnsatisfiedLinkError: /tmp/librocksdbjni3055219148247696799.so: /tmp/librocksdbjni3055219148247696799.so: cannot open shared object file: No such file or directory (Possible cause: can’t load IA 32-bit .so on a ARM-bit platform)
    at PublishPayloadRocksDBLocalPersistence.(PublishPayloadRocksDBLocalPersistence.java:65)
    at PublishPayloadRocksDBLocalPersistence.class(PublishPayloadRocksDBLocalPersistence.java:51)
    while locating PublishPayloadRocksDBLocalPersistence
    at PersistenceMigrationRocksDBModule.configure(PersistenceMigrationRocksDBModule.java:52)
    _ installed by: PersistenceMigrationModule → PersistenceMigrationFileModule → PersistenceMigrationRocksDBModule
    at PublishPayloadPersistenceImpl.(PublishPayloadPersistenceImpl.java:51)
    _ for 1st parameter
    at PublishPayloadPersistenceImpl.class(PublishPayloadPersistenceImpl.java:40)
    while locating PublishPayloadPersistenceImpl
    at RetainedMessageRocksDBLocalPersistence.(RetainedMessageRocksDBLocalPersistence.java:73)
    _ for 2nd parameter
    at RetainedMessageRocksDBLocalPersistence.class(RetainedMessageRocksDBLocalPersistence.java:60)
    while locating RetainedMessageRocksDBLocalPersistence
    at PersistenceMigrationRocksDBModule.configure(PersistenceMigrationRocksDBModule.java:47)
    _ installed by: PersistenceMigrationModule → PersistenceMigrationFileModule → PersistenceMigrationRocksDBModule
    while locating RetainedMessageLocalPersistence

Hi @jrdstall,
ja das wird ein Problem mit der ARM Architektur vom Pi sein:
UnsatisfiedLinkError: /tmp/librocksdbjni*.so: cannot open shared object file: No such file or directory (Possible cause: can’t load IA 32-bit .so on a ARM-bit platform)

sagt aus, dass HiveMQ versucht, eine RocksDB JNI-Bibliothek zu laden, die für eine andere Architektur gebaut wurde.

Jetzt hast du verschiedene Möglichkeiten. Du könntest beispielsweise die RocksDB JNI für ARM selbst bauen. Das ist aber aufwendig und kann zu unerwarteten Problemen führen. Ich würde dir empfehlen die RocksDB zu deaktivieren. Da hast du das Kompatibilitätsproblem nicht mehr. Zudem ist es auf einem PI besser im RAM zu arbeiten. Zu viele Lese-/ Schreibzyklen zerstören die SD Karte.
Ich habe gerade keine Instanz installiert, aber versuch mal folgendes (ohne Gewehr, dass es direkt klappt):

Editiere mal bitte testweise die config.xml
Da müsste unter “persistence” der “mode” stehen. Der ist vermutlich auf “file” konfiguriert. Ändere ihn mal testweise auf memory um (vorher ein Backup der Datei schadet nie).

also von

<persistence>
    <mode>file</mode>
</persistence>

auf

<persistence>
    <mode>memory</mode>
</persistence>

Versuche ihn auf “memory” umzukonfigurieren.

Ganz wichtig: Bedenke, dass durch diese Konfiguration die Messages nicht mehr auf der Platte persistiert werden. Wenn sie also gepuffert werden und der Pi sich neu startet, sind die Nachrichten verloren.

Ich hoffe das hilft. Gib gern Bescheid was rausgekommen ist.

Viele Grüße
Zündi