{"record":{"id":"a281340b757c88fa","repo":"temporalio/temporal","slug":"unable-to-create-dynamic-config-client-w","errorCode":null,"errorMessage":"unable to create dynamic config client: %w","messagePattern":"unable to create dynamic config client: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"temporal/fx.go","lineNumber":232,"sourceCode":"\t\t}\n\t}\n\n\t// EventLoggerProvider backs structured (\"wide\") events. Select the custom OTEL LoggerProvider\n\t// if injected, else a no-op provider that discards events. A deployment opts in by injecting a\n\t// provider via WithCustomEventLoggerProvider.\n\teventLoggerProvider := so.eventLoggerProvider\n\tif eventLoggerProvider == nil {\n\t\teventLoggerProvider = lognoop.NewLoggerProvider()\n\t}\n\n\t// DynamicConfigClient\n\tdcClient := so.dynamicConfigClient\n\tif dcClient == nil {\n\t\tdcConfig := so.config.DynamicConfigClient\n\t\tif dcConfig != nil {\n\t\t\tdcClient, err = dynamicconfig.NewFileBasedClientWithMetrics(dcConfig, logger, stopChan, metricHandler)\n\t\t\tif err != nil {\n\t\t\t\treturn serverOptionsProvider{}, fmt.Errorf(\"unable to create dynamic config client: %w\", err)\n\t\t\t}\n\t\t} else {\n\t\t\t// noop client\n\t\t\tlogger.Info(\"Dynamic config client is not configured. Using default values.\")\n\t\t\tdcClient = dynamicconfig.NewNoopClient()\n\t\t}\n\t}\n\n\ttestHooks := testhooks.NewTestHooks()\n\tif so.testHooks != nil {\n\t\ttestHooks = *so.testHooks\n\t}\n\n\t// TLSConfigProvider\n\ttlsConfigProvider := so.tlsConfigProvider\n\tif tlsConfigProvider == nil {\n\t\ttlsConfigProvider, err = encryption.NewTLSConfigProviderFromConfig(so.config.Global.TLS, metricHandler, logger, nil)\n\t\tif err != nil {","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/temporal/fx.go#L214-L250","documentation":"ServerOptionsProvider creates the dynamic config client. When config.DynamicConfigClient is present it calls dynamicconfig.NewFileBasedClientWithMetrics, which loads and validates the dynamic config file; failure (parse error, bad value type, unreadable file) is wrapped as 'unable to create dynamic config client' and blocks startup. With no config block, a noop client is used instead.","triggerScenarios":"dynamicconfig-client block pointing at a YAML file that does not exist, is not valid YAML, or contains a key/value that fails validation (e.g. wrong type for a known key).","commonSituations":"Wrong filepath in config; file mounted but empty or truncated in Kubernetes; YAML with tabs or type errors; a dynamic config key renamed after a server upgrade with a mismatched value type.","solutions":["Fix the wrapped error's cause: correct the file path, YAML syntax, or invalid key/value in the dynamic config file","Validate the file with the temporal server's dynamicconfig tooling (temporal server start-dev or dynamicconfig CLI validation)","If no dynamic overrides are needed, remove the dynamicConfigClient block to use the noop client","Check file permissions/mount correctness in containerized deployments"],"exampleFix":"// before\ndynamicConfigClient:\n  filepath: \"config/dynamicconfig/not_exist.yaml\"\n// after\ndynamicConfigClient:\n  filepath: \"config/dynamicconfig/development.yaml\"","handlingStrategy":"validation","validationCode":"// validate the dynamic config file before server start\nif _, err := os.Stat(dcFilepath); err != nil { log.Fatal(err) }\ndata, err := os.ReadFile(dcFilepath)\nif err != nil { log.Fatal(err) }\nvar m map[string]any\nif err := yaml.Unmarshal(data, &m); err != nil { log.Fatalf(\"invalid yaml: %v\", err) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the dynamic config file in CI and on deploy (parse + key/type check)","Verify file mounts and permissions in Kubernetes before rollout","Confirm value types match the server version's expectations for renamed keys","Omit the dynamicConfigClient block entirely when no overrides are needed"],"tags":["dynamicconfig","config","startup","yaml","go"],"backgroundTag":"dynamic-config-file-invalid","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}