1

I know Mule ESB Enterprise edition can be installed on Raspberry Pi because it ships with support for arm based processors. Unfortunately, Community edition does not have it. This makes it difficult to use Mule ESB on pi for longer time as I don't have the enterprise license (it's for personal projects and enterprise trial ends in 30 days). I wonder, why community edition does not have this support? Are there any restrictions for using community edition on pi?? Can the support be added to community edition? Has anyone done it and using it?

Manik Magar
  • 1,403
  • 2
  • 10
  • 20

1 Answers1

1

Yes, it is possible to install and run Mule on Raspberry PI 3 (and by extension any armhf/armel machine). You have to tweak your installation to ensure Mule uses the Linux armhf 32-bit Java Service Wrapper (or the related OS/architecture Wrapper). The steps in details:

Install Mule CE

Install Mule Standalone as you would do on any other machine:

  1. Download the Mule CE Runtime
  2. Unpack the content somewhere, such as in /opt/mule (i.e. MULE_HOME=/opt/mule) and change owner of the content to a Mule user (such as mule:mule)
  3. Optionally, perform some hardening

You should be able to run Mule using $MULE_HOME/bin/mule start|stop|restart

Configure Java Service Wrapper

You need to manually add the Java Service Wrapper support for your OS and processor architecture, for Raspberry PI 3 it would be Linux armhf 32-bit.

  1. Download the Linux armhf 32-bit Community Tanuki Java Service Wrapper and unpack it
  2. Copy the Wrapper lib/libwrapper.so to $MULE_HOME/lib/boot/libwrapper-linux-armhf-32.so, ensure it has read+execute permission and is Mule user owned
  3. Copy the Wrapper lib/wrapper.jar to $MULE_HOME/lib/boot/wrapper-{version}.jar (replace {version} by your Wrapper version), ensure it's Mule user owned and remove or backup somewhere else the previous wrapper-{oldVersion}.jar
  4. Copy the Wrapper bin/wrapper to $MULE_HOME/lib/boot/exec/wrapper-linux-armhf-32, ensure it has read+execute permission and is Mule user owned
  5. This one is a bit tricky, you have to update the $MULE_HOME/bin/mule launch script. Look for the line case "$PROC_ARCH" in, Such as:

    'x86_64') DIST_ARCH="x86" DIST_BITS="64" break;; Each case match a specific hardware name to define DIST_ARCH and DIST_BITS variables, allowing to use the proper Wrapper files. Add a new case to handle your Raspberry PI hardware. For Raspberry 3, it's should be something like armv71 (check with uname -m if required):

    'armv71') DIST_ARCH="armhf" DIST_BITS="32" break;;

  6. You may need to update $MULE_HOME/conf/wrapper.conf to avoid memory related issues. I usually have to play around with the following properties:

    wrapper.java.initmemory=512 wrapper.java.maxmemory=512 wrapper.java.additional.X=-XX:PermSize=256m wrapper.java.additional.Y=-XX:MaxPermSize=256m wrapper.java.additional.Z=-XX:NewSize=512m wrapper.java.additional.V=-XX:MaxNewSize=512m

When Mule will run on armv71 hardware, it will now use wrapper-{OS}-{DIST_ARCH}-{DIST_BITS}, in our case wrapper-linux-armhf-32. You should be able to run Mule as usual - check the logs for any error on start-up.

This method has been tested with Raspberry PI 2 and 3 for Mule CE 3.7 and 3.8 (it should work for previous versions). It may be a bit tricky, if you have any issue post a comment I'll update this post to add details.

By the way, this method can be used to add support for any architecture and OS as long as it is supported by Java Service Wrapper.

I wonder, why community edition does not have this support?

I don't know, Mule CE simply does not support ARM architecture - for now. Only a limited list of platform and architecture is supported by CE (i.e. the launch script filtering architecture types). Maybe they simply did not take the time (~money) to add support, or they purposefully prevent ARM support to favor Mule EE. Considering Mule CE is open-source, in theory someone could contribute to add such support... (just saying ! :)

Pierre B.
  • 11,612
  • 1
  • 37
  • 58
  • Thanks for the descriptive answer @Pierre-B. I think I had done all the steps except using a armhf specific java service wrapper for pi. I saw a wrapper in EE but wasn't sure if it can be used or not. I will get the Java Service Wrapper and give this a try soon. I will update result here. Again, Thanks! – Manik Magar Jul 18 '17 at 17:49