---
schema_version: "1"
id: a8d5fa9dbcae3f1961523b2c7d2bfda9f6216bd4416eea02f158c82a9505f3f7
title: Start and Stop On-Premises Mule Runtime Engine
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/on-premises/4.3/starting-and-stopping-mule-esb.md
canonical_url: https://docs.mulesoft.com/on-premises/4.3/starting-and-stopping-mule-esb
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 41e3c135101747ffce75f47c8edf600c795afd2b351dbd1595562657bc6753f3
description: MuleSoft Documentation Site
release: "4.3"
latest: false
---
---
product: On-premises Runtimes
version: 4.3
keywords: systemd, systemctl, linux service, windows service, daemon, background, console, mule_ee.log, logs, restart, on-premises, on-prem, standalone
---

# Start and Stop On-Premises Mule Runtime Engine

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Start and stop on-premises runtime to run Mule applications on a host you manage. Use these commands
after you unpack the distribution and install an
[Enterprise license](https://docs.mulesoft.com/on-premises/4.3/installing-an-enterprise-license). After the runtime is running, deploy Mule
application JARs. See [On-Premises Mule Runtime Deployment Model](https://docs.mulesoft.com/on-premises/4.3/mule-deployment-model) and the
setup path in [On-Premises Runtimes Overview](https://docs.mulesoft.com/on-premises/4.3/).

Registration with Anypoint Runtime Manager is optional. That registered model is a
[Hybrid Standalone Runtime](https://docs.mulesoft.com/hybrid-standalone/).

Deployment status does not appear in the console when the runtime runs as a service or daemon. Look
in `$MULE_HOME/logs/mule_ee.log` (Enterprise) for startup and deployment messages.

Mule runtime engine uses the Java Service Wrapper (Tanuki) to control the Java Virtual Machine (JVM)
from your native OS. The wrapper provides many options and features, including the ability to run
Mule as a Unix daemon or install or remove Mule as a Windows Service. The wrapper can handle system
signals and start parameters, and overall provides much better interaction between the JVM and the
underlying OS.

## Use the Startup and Shutdown Script

The wrapper is called by a script in `$MULE_HOME/bin`.

The following table lists all the parameters that the script accepts:

<table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>start</code></p></div></div></td><td><div><div><p>Starts Mule in the terminal background.</p></div></div></td></tr><tr><td><div><div><p><code>stop</code></p></div></div></td><td><div><div><p>Stops Mule. Inbound endpoints process in-flight messages before Mule shuts down. However, after the timeout period, inflight messages that haven’t completed are abandoned and Mule shuts down.</p></div></div></td></tr><tr><td><div><div><p><code>restart</code></p></div></div></td><td><div><div><p>Restarts Mule.</p></div></div></td></tr><tr><td><div><div><p><code>status</code></p></div></div></td><td><div><div><p><strong>(Linux/Unix only.)</strong> Displays the status of the Mule server (<code>running</code> or <code>not running</code>) and the process PID if running.</p></div></div></td></tr><tr><td><div><div><p><code>dump</code></p></div></div></td><td><div><div><p><strong>(Linux/Unix only.)</strong> Dumps the Mule wrapper’s core to <code>$MULE_HOME/log/mule_ee.log</code>.</p></div></div></td></tr><tr><td><div><div><p><code>console</code></p></div></div></td><td><div><div><p>Start Mule in the terminal foreground (console mode). Same as running <code>mule</code> with no parameters.</p></div></div></td></tr><tr><td><div><div><p><code>install</code></p></div></div></td><td><div><div><p>Install Mule as a Windows Service or Linux/Unix Daemon.</p></div></div></td></tr><tr><td><div><div><p><code>remove</code></p></div></div></td><td><div><div><p>Remove Mule from your Windows Services or Linux/Unix Daemons.</p></div></div></td></tr></tbody></table>

## Start in the Console

Start Mule from a command line by changing the directory to where you unzipped the Mule software
distribution and then changing to the bin directory. Run the following commands:

- On Windows environments:

  ```powershell
  $ $MULE_HOME\bin\mule.bat
  ```

- On Linux/Unix environments:

  ```console
  $ $MULE_HOME/bin/mule
  ```

These commands run Mule in foreground mode, and the startup script displays information on the
terminal’s standard output. You can’t issue further commands on the terminal as long as Mule is
running.

To stop Mule, press `CTRL-C` in the terminal in which the script is running.

## Start as a Windows Service

To run Mule as a Windows service, you need to install it first by running:

```powershell
$ $MULE_HOME\bin\mule.bat install
```

Once installed, you can run Mule as a service:

```powershell
$ $MULE_HOME\bin\mule.bat start
```

> [!NOTE] When Windows restarts, the Mule service stops the same way as using the `mule stop`
> command. The only situation where this could be different is if Windows kills the process due to a
> timeout.

### Add Properties to wrapper.conf After Installation

After the installation of Mule as a Windows service, you can override the properties defined in the
`wrapper.conf` file by declaring new properties in the `wrapper.additional.conf` file.

The behavior changes depending on the Mule edition you are using:

- Mule Community Edition

  1.  After adding a new property, reinstall or restart the Windows Service.

  2.  Add the property and ensure that its index is greater than the greatest index in the
      `wrapper-additional.conf` file. Otherwise, your property can be overridden.

      For example, if the `wrapper-additional.conf` has the property:

      `wrapper.java.additional.n=-Dproperty=value`

      When `n` is the greatest index, you should add your property in the `wrapper.conf` file
      incrementing the index:

      `wrapper.java.additional.n+1=-DyourProperty=valueOfYourProperty`

- Mule Enterprise Edition

  1.  By default, you can add 20 extra properties after installing Mule as a Service.

  2.  Configure the number of extra properties you need, using the following command line argument
      when you install the service:

      `-additionalJavaProperties=numberOfExtraProperties`

## Start as a Linux or Unix Daemon

Installing the daemon does not create a systemd unit named `mule.service`. The `mule install`
command registers a Java Service Wrapper (Tanuki) daemon. `systemctl start mule` fails because that
unit does not exist. Use `$MULE_HOME/bin/mule start` after `mule install`, not
`systemctl mule start`.

To run Mule as a Linux-Unix Daemon, you need to install it first by running:

```console
$ $MULE_HOME/bin/mule install
```

Once installed, you can run Mule as a daemon:

```console
$ $MULE_HOME/bin/mule start
```

> [!NOTE] You can also start Mule without executing the installation step. This will start the Mule
> in the background for the current user session.

The following example starts Mule from a Unix console:

```console
$ $MULE_HOME/bin/mule start
MULE_HOME is set to ~/Downloads/mule-enterprise-standalone-4.3.0
MULE_BASE is set to ~/Downloads/mule-enterprise-standalone-4.3.0
Starting Mule Enterprise Edition...
Waiting for Mule Enterprise Edition.................
running: PID:87318
```

## Start from a Script

To start Mule from a script or from your IDE without using the Java Service Wrapper, you can use the
`org.mule.MuleServer` class. This class accepts a couple of parameters.

org.mule.MuleServer -config mule-config.xml

or

org.mule.MuleServer -builder <fully qualified classname> -config appContext.xml

- **\-config** specifies one or more configuration files to use. If this argument is omitted, it
  will look for and use `mule-config.xml` if it exists.

- **\-builder** is a fully qualified classname of the configuration builder to use. If this is not
  set, the default `org.mule.config.builders.AutoConfigurationBuilder` is used, which will try to
  auto-detect configuration files based on available builders. In the most common scenario, this
  will resolve to `org.mule.config.spring.SpringXmlConfigurationBuilder`.

The easiest way to set the classpath is to include all JARs in the `./lib/mule` and `./lib/opt`
directories of the distribution. You can look at the dependency report for the server and each of
the modules to see exactly which JARs are required for a particular module.

## Deploy Applications

1.  Start Mule.

2.  After Mule starts, you can deploy your Mule applications by moving your packaged JAR files to
    the `apps` directory in `$MULE_HOME`.

## Stop On-Premises Mule Runtime Engine

Run the `stop` command to stop Mule.

The following example stops Mule from a Unix console:

```console
$ $MULE_HOME/bin/mule stop
MULE_HOME is set to /Applications/mule-enterprise-standalone-4.3.0
MULE_BASE is set to /Applications/mule-enterprise-standalone-4.3.0
Stopping Mule Enterprise Edition...
Stopped Mule Enterprise Edition.
```

## Remove the Service or Daemon

Run the `remove` command to remove the service or daemon from your system.

The following example removes the Mule daemon from a Unix console:

```console
$ $MULE_HOME/bin/mule remove
MULE_HOME is set to /Applications/mule-enterprise-standalone-4.3.0
MULE_BASE is set to /Applications/mule-enterprise-standalone-4.3.0
Detected Mac OSX:
Mule Enterprise Edition is not running.
Removing Mule Enterprise Edition daemon...
```

## Enable Anypoint Monitoring

Optionally, you can [install Anypoint Monitoring](https://docs.mulesoft.com/monitoring/am-installing) for cloud-managed
supported versions of on-premises runtimes so you can monitor applications running on that server.

## Find Runtime Logs

When you start on-premises Mule runtime engine in the console, startup and `DEPLOYED` messages print
to standard output. When you start it as a Windows service or Linux daemon, those messages do not go
to the terminal.

Look in `$MULE_HOME/logs/mule_ee.log` (Enterprise Edition) for startup, deployment, and application
logs. The `mule dump` script parameter writes wrapper diagnostics to `$MULE_HOME/log/mule_ee.log`.

If the log file is missing, the process user cannot write to `$MULE_HOME/logs`. Confirm that user
owns `$MULE_HOME` and that you started the instance whose `MULE_HOME` you are inspecting.

## Troubleshoot Common Error Messages

### `Timed out waiting for signal from JVM`

The Java Service Wrapper (Tanuki) did not receive a ready signal from the JVM before
`wrapper.startup.timeout`. See
[Download, Install, and Upgrade On-Premises Mule Runtime Engine](https://docs.mulesoft.com/on-premises/4.3/runtime-installation-task) for
`wrapper.conf` timeouts.

### `JVM received a signal SIGKILL (9)`

The operating system killed the JVM. This is not a graceful `mule stop`. Check the out-of-memory
killer and whether another process sent SIGKILL.

### `Pinging the JVM took`

The wrapper pinged the JVM and the response was slow. Persistent ping delays can restart on-premises
Mule runtime engine automatically.

## See Also

- [On-Premises Runtimes Overview](https://docs.mulesoft.com/on-premises/4.3/)

- [Download, Install, Configure, and Upgrade On-Premises Mule Runtime Engine](https://docs.mulesoft.com/on-premises/4.3/runtime-installation-task)

- [Install an Enterprise License on On-Premises Mule Runtime Engine](https://docs.mulesoft.com/on-premises/4.3/installing-an-enterprise-license)

- [On-Premises Mule Runtime Deployment Model](https://docs.mulesoft.com/on-premises/4.3/mule-deployment-model)

- [Hybrid Standalone Runtimes](https://docs.mulesoft.com/hybrid-standalone/)

- [Set System Properties when Starting On-Premises Mule Runtime Engine](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-system#set-properties)
