{"record":{"id":"78915bd2e5391115","repo":"temporalio/temporal","slug":"hosts-are-missing-in-static-hosts-for-service-s","errorCode":null,"errorMessage":"hosts are missing in static hosts for service: ${service}","messagePattern":"hosts are missing in static hosts for service: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"temporal/fx.go","lineNumber":70,"sourceCode":"\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\n\t}","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/temporal/fx.go#L52-L88","documentation":"missingServiceInStaticHosts is a prefix error wrapped with the service name when a service listed in the cluster's membership configuration cannot be found in the staticHosts map. The server requires every service to resolve to a host:port when using static (non-membership) resolution.","triggerScenarios":"Starting temporal server with global/membership configured to use static hosts (p2p/static resolution) while the config's services list or cross-service references include a service (e.g. \"worker\", \"bifrost\") absent from the staticHosts section.","commonSituations":"Adding a new service to config without updating static hosts; typo in service name; running with a multi-service config file but static host list copied from a single-service template; disabling membership/ringpop without defining all hosts.","solutions":["Add the missing service to the staticHosts map with its host:port","Remove the stray service from config if it is not meant to run","If using dynamic membership, fix config so static host resolution is not selected (or supply hashring/static hosts consistently)","Check for typos between service names in services list and staticHosts keys"],"exampleFix":"// before\nstaticHosts:\n  frontend: \"127.0.0.1:7233\"\n  history: \"127.0.0.1:7234\"\n  matching: \"127.0.0.1:7235\"\n# config references service: worker\n// after\nstaticHosts:\n  frontend: \"127.0.0.1:7233\"\n  history: \"127.0.0.1:7234\"\n  matching: \"127.0.0.1:7235\"\n  worker: \"127.0.0.1:7239\"","handlingStrategy":"validation","validationCode":"func validateStaticHosts(cfg *config.Config, services []string) error {\n    for _, s := range services {\n        if _, ok := cfg.Global.Membership.FrontendHosts /* or relevant staticHosts map */ [s]; !ok {\n            return fmt.Errorf(\"service %q missing from staticHosts\", s)\n        }\n    }\n    return nil\n}","typeGuard":"func staticHostDefined(hosts map[string]string, service string) bool {\n    _, ok := hosts[service]\n    return ok\n}","tryCatchPattern":"if err := server.Start(); err != nil {\n    if strings.Contains(err.Error(), \"hosts are missing in static hosts for service\") {\n        log.Fatalf(\"add the named service to staticHosts in config\")\n    }\n    return err\n}","preventionTips":["Keep the services list and staticHosts map in the same config file/section to avoid drift","When adding a service, update static hosts in the same change","Grep config for service names and cross-check against staticHosts keys before deploy"],"tags":["temporal-server","config","membership","static-hosts"],"backgroundTag":"missing-static-host-entry","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}