{"record":{"id":"17d38816027615c9","repo":"apache/druid","slug":"requested-tier-s-lookupname-s-but-no-lookup","errorCode":null,"errorMessage":"Requested tier [%s] lookupName [%s]. But no lookups exist!","messagePattern":"Requested tier \\[(.+?)\\] lookupName \\[(.+?)\\]\\. But no lookups exist!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java","lineNumber":351,"sourceCode":"  public Map<HostAndPort, LookupsState<LookupExtractorFactoryMapContainer>> getLastKnownLookupsStateOnNodes()\n  {\n    Preconditions.checkState(lifecycleLock.awaitStarted(5, TimeUnit.SECONDS), \"not started\");\n    return knownOldState.get();\n  }\n\n  /**\n   * Try to find a lookupName spec for the specified lookupName.\n   *\n   * @param lookupName The lookupName to look for\n   *\n   * @return The lookupName spec if found or null if not found or if no lookups at all are found\n   */\n  @Nullable\n  public LookupExtractorFactoryMapContainer getLookup(final String tier, final String lookupName)\n  {\n    final Map<String, Map<String, LookupExtractorFactoryMapContainer>> prior = getKnownLookups();\n    if (prior == null) {\n      LOG.warn(\"Requested tier [%s] lookupName [%s]. But no lookups exist!\", tier, lookupName);\n      return null;\n    }\n    final Map<String, LookupExtractorFactoryMapContainer> tierLookups = prior.get(tier);\n    if (tierLookups == null) {\n      LOG.warn(\"Tier [%s] does not exist\", tier);\n      return null;\n    }\n    return tierLookups.get(lookupName);\n  }\n\n  public boolean isStarted()\n  {\n    return lifecycleLock.isStarted();\n  }\n\n  @VisibleForTesting\n  boolean awaitStarted(long waitTimeMs)\n  {","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java#L333-L369","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify lookups exist: GET /druid/coordinator/v1/lookups/config.","Null-check the return of getLookup() in client code instead of dereferencing it.","If lookups were expected, check the lookup config manager's backing store connectivity and druid.manager.lookups settings.","Point the client at the correct cluster/coordinator host."],"exampleFix":"// before\nLookupExtractorFactoryMapContainer c = manager.getLookup(\"__default\", \"country\");\nString v = c.get().get(\"version\").toString(); // NPE risk\n// after\nLookupExtractorFactoryMapContainer c = manager.getLookup(\"__default\", \"country\");\nif (c != null) { String v = c.get().get(\"version\").toString(); }","handlingStrategy":"type-guard","validationCode":"LookupExtractorFactoryMapContainer c = coordinatorManager.getLookup(tier, lookupName);\nif (c == null) { /* handle missing lookup explicitly */ }","typeGuard":"LookupExtractorFactoryMapContainer c = manager.getLookup(tier, name);\nboolean present = c != null;","tryCatchPattern":null,"preventionTips":["Always null-check getLookup() results.","Seed lookup config before reads.","Verify the coordinator host/cluster you query.","Alert on unexpected nulls rather than NPEs at use sites."],"tags":["lookups","coordinator","read","null"],"backgroundTag":"resource-not-found","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}