Search code examples
javaiotactivemq-artemis

Problem creating ActiveMQ Artemis broker instance on Raspberry pi 3B+


I want to install ActiveMQ Artemis on my Raspberry pi 3B+, but I am getting a Java related error. I am using Java version 8. I have followed the total procedure as explained here.

While attempting to start the broker instance using command $ sudo /var/lib/test-broker/bin/artemis run I am getting the following error:

OpenJDK Client VM warning: G1 GC is disabled in this release.
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

I have tried to increase the heap space but it didn't work. Any help to remove this error would be appreciated.


Solution

  • By default, ActiveMQ Artemis server uses the G1 collector(-XX:+UseG1GC), 512MB for the initial size of the memory allocation pool(-Xms512M) and 2GB for the maximum size of the memory allocation pool(-Xmx2G). If your computer has less memory, or you want to run it with more available RAM, modify the values in artemis.profile file accordingly otherwise remove the hardcoded values.