{"record":{"id":"eaa5bf7c8d101b58","repo":"temporalio/temporal","slug":"missing-current-cluster-metadata-under-clustermeta","errorCode":null,"errorMessage":"missing current cluster metadata under clusterMetadata.ClusterInformation","messagePattern":"missing current cluster metadata under clusterMetadata\\.ClusterInformation","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"temporal/fx.go","lineNumber":69,"sourceCode":"\t\"go.temporal.io/server/common/searchattribute/sadefs\"\n\t\"go.temporal.io/server/common/telemetry\"\n\t\"go.temporal.io/server/common/testing/testhooks\"\n\t\"go.temporal.io/server/common/wideevents\"\n\t\"go.temporal.io/server/service/frontend\"\n\t\"go.temporal.io/server/service/history\"\n\t\"go.temporal.io/server/service/history/replication\"\n\t\"go.temporal.io/server/service/history/tasks\"\n\t\"go.temporal.io/server/service/matching\"\n\t\"go.temporal.io/server/service/worker\"\n\t\"go.uber.org/fx\"\n\t\"go.uber.org/fx/fxevent\"\n\texpmaps \"golang.org/x/exp/maps\"\n\t\"google.golang.org/grpc\"\n)\n\nvar (\n\tclusterMetadataInitErr           = errors.New(\"failed to initialize current cluster metadata\")\n\tmissingCurrentClusterMetadataErr = errors.New(\"missing current cluster metadata under clusterMetadata.ClusterInformation\")\n\tmissingServiceInStaticHosts      = errors.New(\"hosts are missing in static hosts for service: \")\n)\n\ntype (\n\tServicesGroupOut struct {\n\t\tfx.Out\n\t\tServices *ServicesMetadata `group:\"services\"`\n\t}\n\n\tServicesGroupIn struct {\n\t\tfx.In\n\t\tServices []*ServicesMetadata `group:\"services\"`\n\t}\n\n\tServicesMetadata struct {\n\t\tapp         *fx.App\n\t\tserviceName primitives.ServiceName\n\t\tlogger      log.Logger","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/temporal/fx.go#L51-L87","documentation":"missingCurrentClusterMetadataErr is returned when the server configuration does not define the current cluster under clusterMetadata.ClusterInformation. The server requires an entry describing the current cluster (persistence settings, failover version, enabled flag) to initialize cross-cluster metadata.","triggerScenarios":"Booting temporal server with clusterMetadata.currentClusterName set to a name that has no matching key in clusterMetadata.ClusterInformation, or with ClusterInformation empty entirely.","commonSituations":"Renaming currentClusterName without updating clusterInformation; template config left unfilled; multi-cluster config merge dropping the current cluster's entry; typo in the cluster information map key.","solutions":["Add a clusterInformation entry whose key equals clusterMetadata.currentClusterName","Set initialFailoverVersion (0 for single-cluster) and isEnabled: true for the current cluster entry","Start from the shipped config template in config/config_template.yaml and fill in all clusterMetadata fields","Diff your effective config against the expected one (enable config loading logs) to spot the dropped key"],"exampleFix":"// before\nclusterMetadata:\n  enableGlobalNamespace: false\n  currentClusterName: \"active\"\n  clusterInformation: {}\n// after\nclusterMetadata:\n  enableGlobalNamespace: false\n  currentClusterName: \"active\"\n  clusterInformation:\n    active:\n      enabled: true\n      initialFailoverVersion: 0\n      clusterAddress: \"127.0.0.1:7233\"","handlingStrategy":"validation","validationCode":"func validateCurrentCluster(cfg *config.Config) error {\n    cm := cfg.ClusterMetadata\n    if cm == nil || cm.CurrentClusterName == \"\" { return errors.New(\"currentClusterName missing\") }\n    info, ok := cm.ClusterInformation[cm.CurrentClusterName]\n    if !ok { return fmt.Errorf(\"clusterInformation missing entry for %q\", cm.CurrentClusterName) }\n    if !info.IsEnabled { return errors.New(\"current cluster must be enabled\") }\n    return nil\n}","typeGuard":"func hasCurrentClusterEntry(cfg *config.Config) bool {\n    return cfg.ClusterMetadata != nil && cfg.ClusterMetadata.ClusterInformation[cfg.ClusterMetadata.CurrentClusterName] != nil\n}","tryCatchPattern":"if err := server.Start(); err != nil {\n    if strings.Contains(err.Error(), \"missing current cluster metadata\") {\n        log.Fatalf(\"config error: add clusterInformation entry for the current cluster\")\n    }\n    return err\n}","preventionTips":["Start every cluster config from config/config_template.yaml","After renaming currentClusterName, update the ClusterInformation map key to match","Lint configs so ClusterInformation must contain currentClusterName"],"tags":["temporal-server","startup","config","cluster-metadata"],"backgroundTag":"missing-cluster-metadata-config","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}