Loading

CloudHub app produces no application logs and scheduled flows do not run when a Splunk Log4j2 appender has a blank host

Julkaisupäivä: Sep 29, 2026
Kuvaus

Issue / Symptoms

The application deploys and starts normally, but you observe:

  • No application logs at all after the startup lines, in both the live Runtime Manager log console and the downloaded logs. Raising the level to DEBUG makes no difference.
  • Scheduled (cron/polling) flows appear not to run. There is no error, no execution entry, and nothing in the logs to indicate the scheduler fired.
  • The same application version runs fine in your other environments; only the environment where the Splunk logging properties are missing or empty is affected.
  • "Run Now" on the schedule also produces no visible execution in the logs.

There is typically no visible exception on CloudHub, because the console appender is disabled there and even Log4j2's own StatusLogger error output is not surfaced. The app simply looks dead.

Environment

  • Mule Runtime 4.x
  • CloudHub 2.0 (the same pattern applies to CloudHub 1.0 and Runtime Fabric)
  • Java 17
  • Log4j2 asynchronous logging (`<AsyncRoot>` / async loggers)
  • A Splunk HTTP appender configured in `log4j2.xml` via `splunk-library-javalogging` (`com.splunk.logging.HttpEventCollectorLog4jAppender`)

Cause

The `log4j2.xml` defines a Splunk HTTP appender that shares the same asynchronous root logger (`<AsyncRoot>`) as the normal file appender. The Splunk appender reads its endpoint from a property, for example `url="${sys:splunk.host}"`.

When that host property is left blank (or is not resolved at deployment), the Splunk appender throws `java.lang.NullPointerException: url == null` on every single log event, synchronously, on the Log4j2 async consumer thread.

Because the file appender and the Splunk appender share one async ring buffer:

  1. The consumer thread keeps dying on the NullPointerException, so the ring buffer never drains.
  2. Under normal log volume the buffer fills up.
  3. Log4j2's default queue-full policy then blocks the producer, which is the Mule flow thread, until space frees. It never does, so the flow thread parks indefinitely inside the logging call.
The net effect is twofold: no logs are written (the file appender never receives events), and the scheduled flow threads park inside logging and never complete, so the schedulers appear to never run.

An important nuance: only a blank or null host triggers the hard stall (a synchronous failure per event). A non-blank but merely unreachable host does not stall logging. In that case the Splunk send just fails asynchronously in the background, connectivity errors are printed, and normal logging continues.

This is a configuration issue amplified by third-party library behavior and by documented Log4j2 async behavior. It is not a Mule Runtime defect.
Ratkaisu
Choose the option that fits whether the application actually needs to forward logs to Splunk.

  1. If the app needs Splunk logging, set valid, non-blank values for all Splunk configuration (host, index, token, etc).
  2. If the app does not need Splunk logging, remove the Splunk appender (and its reference from the root/async logger) from `log4j2.xml` and use the standard logging configuration. This avoids both the stall and any Splunk connectivity errors.
  3. If you want the Splunk appender but want to remove the risk of unset properties, hardcode fixed values in `log4j2.xml` instead of using `${...}` placeholders.
  4. To prevent recurrence across environments, always deploy through a CI/CD pipeline that is pre-configured to supply every required property (including the Splunk properties) for each environment, so no environment can be deployed with a blank host.
 
After applying a fix, validate by triggering the schedule (or using Run Now) and confirming that both the flow start log entries appear and the scheduled flow executes.
Knowledge-artikkelin numero

005460815

 
Ladataan
Salesforce Help | Article