apache/druid · error · IAE

Property[%s] must be set

Error message

Property[%s] must be set

What it means

Emitters.makeHttpMap() reads the HTTP emitter target URL from property org.apache.druid.java.util.emitter.http.url. If the property is absent (null), it throws IllegalArgumentException 'Property[...] must be set', because an HTTP emitter has nowhere to send events without a recipient base URL.

Source

Thrown at processing/src/main/java/org/apache/druid/java/util/emitter/core/Emitters.java:83

          LOG_EMITTER_PROP,
          HTTP_EMITTER_PROP,
          CUSTOM_EMITTER_TYPE_PROP
      );
    }
    return jsonMapper.convertValue(jsonified, EmitterFactory.class).makeEmitter(jsonMapper, httpClient, lifecycle);
  }

  // Package-visible for unit tests

  static Map<String, Object> makeHttpMap(Properties props)
  {
    Map<String, Object> httpMap = new HashMap<>();

    final String urlProperty = "org.apache.druid.java.util.emitter.http.url";

    final String baseUrl = props.getProperty(urlProperty);
    if (baseUrl == null) {
      throw new IAE("Property[%s] must be set", urlProperty);
    }

    httpMap.put("recipientBaseUrl", baseUrl);
    httpMap.put("flushMillis", Long.parseLong(props.getProperty("org.apache.druid.java.util.emitter.flushMillis", "60000")));
    httpMap.put("flushCount", Integer.parseInt(props.getProperty("org.apache.druid.java.util.emitter.flushCount", "300")));
    /**
     * The defaultValue for "org.apache.druid.java.util.emitter.http.flushTimeOut" must be same as {@link HttpEmitterConfig.DEFAULT_FLUSH_TIME_OUT}
     * */
    httpMap.put(
        "flushTimeOut",
        Long.parseLong(props.getProperty(
            "org.apache.druid.java.util.emitter.http.flushTimeOut",
            String.valueOf(Long.MAX_VALUE)
        ))
    );
    if (props.containsKey("org.apache.druid.java.util.emitter.http.basicAuthentication")) {
      httpMap.put("basicAuthentication", props.getProperty("org.apache.druid.java.util.emitter.http.basicAuthentication"));
    }

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Add org.apache.druid.java.util.emitter.http.url=<recipient base URL> to runtime.properties
  2. Check for typos in the property key (it must be exactly org.apache.druid.java.util.emitter.http.url)
  3. Confirm the config file is loaded before calling Emitters.create

Example fix

// before
org.apache.druid.java.util.emitter.http.recipientUrl=... // wrong key
// after
org.apache.druid.java.util.emitter.http.url=http://recipient:8080/druid/metrics
Defensive patterns

Strategy: validation

Validate before calling

final String url = props.getProperty("org.apache.druid.java.util.emitter.http.url");
if (url == null || url.isEmpty()) {
  throw new IllegalStateException("org.apache.druid.java.util.emitter.http.url must be set");
}

Try / catch

try {
  Emitter e = Emitters.create(props);
} catch (IllegalArgumentException ex) {
  log.error(ex, "Missing HTTP emitter property");
  throw ex;
}

Prevention

When it happens

Trigger: Configuring an HTTP emitter path where the http emitter URL property is triggered but the org.apache.druid.java.util.emitter.http.url key is missing from the properties.

Common situations: Typo'd property key (e.g. 'http.emit.url'); property defined in the wrong file or environment; partial config migration dropping the URL key.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/3419c8b9d9b2be5f. Report an issue: GitHub.