Skip to content

CacheLoader returned null for key mcpConfiguration — openmetadata_settings not seeded with default mcpConfiguration during migration #28960

Closed

Description

@nickozilla

Affected module

Backend

Describe the bug

On a fresh install of 1.13.0, SettingsCache fails to load mcpConfiguration at startup because no default row is inserted into openmetadata_settings by the migration. getSettingOrDefault() returns null for this key, which Guava's LoadingCache rejects with InvalidCacheLoadException. The server starts despite this error, but it is logged as an ERROR on the main thread.

To Reproduce

  1. Fresh install of OpenMetadata 1.13.0
  2. Run DB migrations (openmetadata-ops.sh migrate)
  3. Start the server
  4. Observe the error in startup logs

Stack trace:

  ERROR [main] o.o.s.r.s.SettingsCache - Failed to fetch Settings . Setting mcpConfiguration
  com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader returned null for key mcpConfiguration.
      at org.openmetadata.service.resources.settings.SettingsCache.getSettingOrDefault(SettingsCache.java:538)
      at org.openmetadata.service.security.auth.SecurityConfigurationManager.initialize(SecurityConfigurationManager.java:124)
      at org.openmetadata.service.OpenMetadataApplication.run(OpenMetadataApplication.java:306)

Expected behavior

Expected behavior:
Either the 1.13.0 migration seeds a default mcpConfiguration row in openmetadata_settings, or SettingsCache.getSettingOrDefault() returns a hardcoded default MCPConfiguration object when the DB row is absent rather than returning null.

OS

No response

Python version

No response

OpenMetadata version

1.13.0

OpenMetadata Ingestion package version

1.13.0

Additional context

Not seen in version 1.12.x

Pre-submission checklist

  • I searched for duplicate issues.
  • I removed credentials, hostnames, emails, and other sensitive data from logs and config.

Activity

  1. added
    bug
    on Jun 11, 2026
  2. aresabalo commented on Jun 22, 2026

    @aresabalo

    I ran into the same issue on a fresh OpenMetadata 1.13 deployment.

    The server repeatedly logged:

    Failed to fetch Settings. Setting mcpConfiguration
    CacheLoader returned null for key mcpConfiguration
    

    In my case, the problem was that the MCP configuration had never been initialized. The solution was to create it through the MCP configuration API:

    curl -X PUT \
      '<OPENMETADATA_URL>/api/v1/system/mcp/config' \
      -H 'Authorization: Bearer <TOKEN>' \
      -H 'Content-Type: application/json' \
      -d '{
        "enabled": true,
        "baseUrl": "<OPENMETADATA_URL>",
        "allowedOrigins": ["<OPENMETADATA_URL>"],
        "connectTimeout": 30000,
        "readTimeout": 60000
      }'

    After submitting a valid MCP configuration payload, the mcpConfiguration setting was persisted and the startup errors disappeared.

  3. added this to Shipping and removed this from Roadmapon Jul 29, 2026
  4. moved this to Triage 🧐 in Shippingon Jul 29, 2026
  5. self-assigned this
    on Jul 29, 2026
  6. moved this from Triage 🧐 to In Progress 🏗️ in Shippingon Jul 29, 2026
  7. moved this from In Progress 🏗️ to In Review / QA 👀 in Shippingon Jul 29, 2026
  8. moved this from In Review / QA 👀 to Done ✅ in Shippingon Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

  • Status
    Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions