Bootstrap FreeKB - Mule - Undeploy a Mule application on the command line
Mule - Undeploy a Mule application on the command line

Updated:   |  Mule articles

A mule app can be undeployed on the command line by removing the app's anchor.txt file. The app's anchor.txt file should be located in the mule_home/apps/ directory. In this example, an app named "myApp" is currently deployed to myJVM.

~]# ls -l /opt/MuleSoft/myJVM/apps
drwxr-sr-x 3 root root 4096 May 29 21:59 myApp
-rw-r--r-- 1 root root   77 May 29 21:59 myApp-anchor.txt

 

Remove the anchor.txt file to undeploy the app. A few moments after the anchor.txt file is removed, the anchor.txt as well as the directory and subdirectories that make up the app will also be removed. Be aware that the Mule JVM must be running for the undeploy to work.

~]# rm /opt/MuleSoft/myJVM/apps/myApp-anchor.txt

 

Sometimes, even after removing the anchor.txt file, the exploded application directory is not removed and no events are written to the mule_ee.log file. This usually means the application is in a bad way. In this scenario, you'll probably have to restart the Mule application server to undeploy the application.

 

The mule_ee.log should contain the following event, confirming that the application was undeployed.

INFO yyyy-mm-dd hh:mm:ss,sss [] org.mule.module.launcher.DefaultArchiveDeployer: ============== Request to Undeploy Artifact: appname-<version>-SNAPSHOT-<int>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Undeployed artifact 'appname-<version>-SNAPSHOT-<int>' +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO yyyy-mm-dd hh:mm:ss,sss [] com.mulesoft.mmc.agent.service.impl.ApplicationServiceImpl: Successfully undeployed [appname-<version>-SNAPSHOT-<int>]



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 4db5d4 in the box below so that we can be sure you are a human.