{"record":{"id":"ec8661feefeb09a9","repo":"temporalio/temporal","slug":"cannot-resolve-nexus-endpoints-partition-owner-w","errorCode":null,"errorMessage":"cannot resolve Nexus endpoints partition owner: %w","messagePattern":"cannot resolve Nexus endpoints partition owner: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"service/matching/matching_engine.go","lineNumber":2927,"sourceCode":"\t\t\tcase <-ctx.Done():\n\t\t\t\treturn resp, nil\n\t\t\tcase <-tableVersionChanged:\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\treturn resp, err\n\t}\n}\n\nfunc (e *matchingEngineImpl) checkNexusEndpointsOwnership() (bool, <-chan struct{}, error) {\n\t// Get the channel before checking the condition to prevent the channel from being closed while we're running this\n\t// check.\n\tch := e.nexusEndpointsOwnershipLostCh.Load().(chan struct{}) //nolint:revive // type is always chan struct{}\n\tself := e.hostInfoProvider.HostInfo().Identity()\n\towner, err := e.serviceResolver.Lookup(nexusEndpointsTablePartitionRoutingKey)\n\tif err != nil {\n\t\treturn false, nil, fmt.Errorf(\"cannot resolve Nexus endpoints partition owner: %w\", err)\n\t}\n\treturn owner.Identity() == self, ch, nil\n}\n\nfunc (e *matchingEngineImpl) notifyNexusEndpointsOwnershipChange() {\n\t// We don't care about the channel returned here. This method is ensured to only be called from the single\n\t// watchMembership method and is the only way the channel may be replaced.\n\tisOwner, _, err := e.checkNexusEndpointsOwnership()\n\tif err != nil {\n\t\te.logger.Error(\"Failed to check Nexus endpoints ownership\", tag.Error(err))\n\t\treturn\n\t}\n\tif !isOwner {\n\t\tclose(e.nexusEndpointsOwnershipLostCh.Swap(make(chan struct{})).(chan struct{})) //nolint:revive // type is always chan struct{}\n\t}\n\te.nexusEndpointClient.notifyOwnershipChanged(isOwner)\n}\n","sourceCodeStart":2909,"sourceCodeEnd":2945,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/matching/matching_engine.go#L2909-L2945","documentation":"The matching engine periodically checks whether it still owns the Nexus endpoints table partition by resolving the partition's current owner through the service resolver. This error wraps the failure of that ring/membership Lookup call for the nexusEndpointsTablePartitionRoutingKey, meaning the engine could not determine which host owns the partition. The caller treats this as 'not the owner' and aborts the ownership check.","triggerScenarios":"e.isNexusEndpointsTableOwner (via the shown helper) runs while the membership service resolver fails to resolve the routing key — e.g. membership provider errors, ring not yet populated, or internal frontend/service discovery unavailable.","commonSituations":"Startup before membership/ring convergence; a membership provider hiccup or network partition; host membership churn (many joining/leaving hosts) making the resolver temporarily unable to return an owner; misconfigured internal frontend address.","solutions":["Retry the operation: the ownership check runs periodically, and a transient membership lookup failure typically self-heals on the next tick","Verify membership service health and that the service resolver's ring is populated (check membership provider logs/membership endpoint)","Check internal-frontend / service peer configuration and network connectivity between matching and the resolver target","If persistent after stable membership, restart the affected matching host so it re-registers with the ring"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before relying on nexus endpoint ownership, confirm the resolver is reachable\nowner, err := serviceResolver.Lookup(nexusEndpointsTablePartitionRoutingKey)\nif err != nil { return err } // surface membership problems early","typeGuard":null,"tryCatchPattern":"for attempt := 0; attempt < 3; attempt++ {\n\tisOwner, _, err := checkOwnership(ctx)\n\tif err == nil {\n\t\tbreak\n\t}\n\tlogger.Warn(\"nexus endpoints ownership lookup failed, retrying\", tag.Error(err))\n\ttime.Sleep(backoff(attempt))\n}","preventionTips":["Monitor membership provider health and ring convergence after restarts","Ensure internal-frontend addresses and ports are correctly configured on all hosts","Avoid mass simultaneous host restarts that churn membership","Alert on repeated 'cannot resolve Nexus endpoints partition owner' log lines"],"tags":["go","nexus","membership","ring-owner","matching-service","temporal-server"],"backgroundTag":"membership-lookup-failed","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}