apache/druid · info

Requested tier [ ] lookupName [ ]. But no lookups exist!

Error message

Requested tier [%s] lookupName [%s]. But no lookups exist!

What it means

LookupCoordinatorManager.getLookup() logs this warning and returns null when there is no lookup configuration at all (getKnownLookups() == null). It is a soft-miss signal rather than an exception; callers must null-check the result.

Solutions

  1. Verify lookups exist: GET /druid/coordinator/v1/lookups/config.
  2. Null-check the return of getLookup() in client code instead of dereferencing it.
  3. If lookups were expected, check the lookup config manager's backing store connectivity and druid.manager.lookups settings.
  4. Point the client at the correct cluster/coordinator host.

Example fix

// before
LookupExtractorFactoryMapContainer c = manager.getLookup("__default", "country");
String v = c.get().get("version").toString(); // NPE risk
// after
LookupExtractorFactoryMapContainer c = manager.getLookup("__default", "country");
if (c != null) { String v = c.get().get("version").toString(); }
Defensive patterns

Strategy: type-guard

Validate before calling

LookupExtractorFactoryMapContainer c = coordinatorManager.getLookup(tier, lookupName);
if (c == null) { /* handle missing lookup explicitly */ }

Type guard

LookupExtractorFactoryMapContainer c = manager.getLookup(tier, name);
boolean present = c != null;

Prevention

When it happens

Trigger: getLookup(tier, lookupName) is called when LOOKUP_CONFIG_KEY has never been set or the config manager returns null — fresh cluster, empty config store, or store connectivity issue.

Common situations: Reading a lookup before any lookups were configured on the cluster; querying the wrong cluster's coordinator; lookup config store temporarily unreachable so known lookups appear null.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java:351

  public Map<HostAndPort, LookupsState<LookupExtractorFactoryMapContainer>> getLastKnownLookupsStateOnNodes()
  {
    Preconditions.checkState(lifecycleLock.awaitStarted(5, TimeUnit.SECONDS), "not started");
    return knownOldState.get();
  }

  /**
   * Try to find a lookupName spec for the specified lookupName.
   *
   * @param lookupName The lookupName to look for
   *
   * @return The lookupName spec if found or null if not found or if no lookups at all are found
   */
  @Nullable
  public LookupExtractorFactoryMapContainer getLookup(final String tier, final String lookupName)
  {
    final Map<String, Map<String, LookupExtractorFactoryMapContainer>> prior = getKnownLookups();
    if (prior == null) {
      LOG.warn("Requested tier [%s] lookupName [%s]. But no lookups exist!", tier, lookupName);
      return null;
    }
    final Map<String, LookupExtractorFactoryMapContainer> tierLookups = prior.get(tier);
    if (tierLookups == null) {
      LOG.warn("Tier [%s] does not exist", tier);
      return null;
    }
    return tierLookups.get(lookupName);
  }

  public boolean isStarted()
  {
    return lifecycleLock.isStarted();
  }

  @VisibleForTesting
  boolean awaitStarted(long waitTimeMs)
  {

View on GitHub (pinned to 9b90983fd2)