Outdated glibc results in ERROR upon startup

Expected behavior

HiveMQ startup completes without exhibiting an error.

Observed behavior

During the start process, HiveMQ will report an ERROR similar to the following. The tell-tale sign of having an outdated glib when starting HiveMQ is Guice/ErrorInjectingConstructor

ERROR - Uncaught Error: com.google.inject.CreationException: Unable to create injector, see the following errors: 1) [Guice/ErrorInjectingConstructor]: UnsatisfiedLinkError: /tmp/librocksdbjni3834168820441328881.so: /tmp/librocksdbjni3834168820441328881.so: failed to map segment from shared object at hmq.hz.l.<init>(Source.java:59) at hmq.hz.l.class(Source.java:42) while locating hmq.hz.l while locating hmq.hz.h at hmq.hr.a.configure(Source.java:75) at hmq.hz.j.<init>(Source.java:75) \_ for 2nd parameter at hmq.hz.j.class(Source.java:52) while locating hmq.hz.j at hmq.hr.a.configure(Source.java:79) at hmq.hy.e.<init>(Source.java:110) \_ for 7th parameter at hmq.hy.e.class(Source.java:82) while locating hmq.hy.e while locating hmq.ht.b at hmq.hr.a.configure(Source.java:69) while locating hmq.hu.c [...]

Reason

With the release of HiveMQ 4.3, a glibc version of 2.12 or higher became necessary. Operating systems which use older versions will not allow a HiveMQ instance to launch with default configuration.

Affected Version

glibc < 2.12

Solution / Workaround

  • Update glib to version 2.12 or greater

  • Alternatively the following internal config option may be added to HiveMQ’s config.xml:

<internal> <option> <key>retained-message-persistence.type</key> <value>FILE</value> </option> <option> <key>payload-persistence.type</key> <value>FILE</value> </option> </internal>