Upgrade Mule 4.3 to Mule 4.6 and Java 11

ANUPAM GOGOI
4 min readJan 15, 2025

--

Introduction

Nowadays, it’s likely that most people no longer use MuleSoft’s on-prem infrastructure. However, there are still some legacy systems that continue to rely on it.

This article will show how to upgrade on-prem Mule 4.3 runtime to Mule 4.6. Note that this will be an in-place upgrade.

Things you will need

Before you proceed

Notify the stakeholders that you will do the upgrade because it needs to stop the servers. Normally, if God is with you this can be done within one hour but in most of the cases God is busy with others.

So, be preventive and ask for a 2 hours window so that all the rollback can be done within the period.

The very first thing before you proceed is to take a backup of the complete on-prem server. If not one, take at least two or three copies of the backup just to be sure and in case of a wreck quickly rollback to prevent any damage to the business.

Steps to follow

Now let’s start the initial steps.

Step 1 — Install Java

Install OpenJDK-11 on the server. You can use the yum commands for this. (In my case I am using Red Hat Linux). After this, you need to notify the server to use Java 11. You can do this by executing the below command:

sudo update-alternatives --config java

It will list the available jdks installed and you can choose the jdk11.

Now, we need to set the JAVA_HOME variable in the .bashrc file found under the /mule folder:

export JAVA_HOME="/usr/lib/jvm/openlogic-openjdk-11-hotspot"

export PATH=$PATH:$JAVA_HOME/bin

Step 2 — Use the upgrade tool

Make any temporary folder and unzip the following zips:

  • mule-ee-distribution-standalone-4.6.0.zip
  • mule-runtime-upgrade-tool-1.1.4.zip

mule-runtime-upgrade-tool comes with a straightforward tool that we will use for the process.

It accepts the following arguments:

-o: The directory in which the old Mule 4.3 is found

-n: The directory in which the new Mule 4.6 is found

./upgrade-tool upgrade -o /mule/mule-enterprise-standalone-4.3.0 -n /mule/bkp/9-jan-2025/mule-enterprise-standalone-4.6.0

Note: Provide a full path to the arguments otherwise it will not work.

Well, it will fail because no one is that lucky to win a lottery!

So, don’t panic! It’s simple to resolve.

Our idea is to not change anything in our existing Mule 4.3 runtime. Keep all configs same except the internal lib updates (that will be done by the tool).

The above command execution creates the following structure inside mule-enterprise-standalone-4.3.0

new-mule-enterprise-standalone-4.6.0: The files inside this folders are the new configs that are for Mule 4.6.

to_review: This folder contains the old configs from our mule-enterprise-standalone-4.3.0that conflicted with the Mule 4.6.

ready: We need to decide what changes we need to merge between the old and new configs.

And we technically don’t need anything from Mule 4.6 configs. So, copy everything from from to_review folder to ready.

We need a very small change in the wrapper.conf file that we have moved from to_review to ready.

Open it and add the below line at the end:

wrapper.java.additional.<n>=-Dmule.bootstrap.container.wrapper.class=org.mule.runtime.module.boot.tanuki.internal.MuleContainerTanukiWrapper

Search for the word applicationinsightsand modify the version to 3.6.2

wrapper.java.additional.<n>=-javaagent:/mule/mule-enterprise-standalone-4.3.0/lib/boot/applicationinsights-agent-3.6.2.jar

Cool. Now one last thing. Remember the applicationinsights-agent-3.6.2.jar we downloaded?

Put it in the below location:

/mule/mule-enterprise-standalone-4.3.0/lib/boot

Now all set. Execute the migration tool again:

./upgrade-tool upgrade -o /mule/mule-enterprise-standalone-4.3.0 -n /mule/bkp/9-jan-2025/mule-enterprise-standalone-4.6.0

Now, I believe God is with you and the tool will be able to do the upgrade.

Step 3 — Start the server

Use the below command to start the server:

/mule/mule-enterprise-standalone-4.3.0/bin> ./mule

Check for the logs in this file:

/mule/mule-enterprise-standalone-4.3.0/logs/mule_ee.log

If there is no error you will see this nice screen with Mule 4.6 and Java 11

Cheers!!!!

References:

Mule Upgrade Tool | MuleSoft Documentation

--

--

ANUPAM GOGOI
ANUPAM GOGOI

Written by ANUPAM GOGOI

Mulesoft, WSO2, Java & Go expert. Checkout my DZone articles also: https://dzone.com/users/2946660/agogoi.html

No responses yet