FreeKB - How to undeploy a Mule application
How to undeploy a Mule application

Home > Search > How-to


Using the Mule web console

In the Mule web console, select the Deployments tab. Check the application that needs to be undeployed, and select Undeploy

 

If the application is successfully undeployed, in no more than 60 seconds, the status of the application should be yellow / undeployed.

 


Using the command line

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.

~]# 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.

 


Logs

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>]

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments