{"record":{"id":"04e0379a33c887f0","repo":"hashicorp/nomad","slug":"cannot-update-alloc-to-connect-in-place","errorCode":null,"errorMessage":"cannot update alloc to Connect in-place","messagePattern":"cannot update alloc to Connect in-place","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/consul_grpc_sock_hook.go","lineNumber":163,"sourceCode":"\t\t\tmErr = multierror.Append(mErr, err)\n\t\t}\n\t}\n\treturn mErr.ErrorOrNil()\n}\n\n// Update creates a gRPC socket file and proxy if there are any Connect\n// services.\nfunc (h *consulGRPCSocketHook) Update(req *interfaces.RunnerUpdateRequest) error {\n\th.mu.Lock()\n\tdefer h.mu.Unlock()\n\n\th.alloc = req.Alloc\n\n\tif !h.shouldRun() {\n\t\treturn nil\n\t}\n\tif len(h.proxies) == 0 {\n\t\treturn fmt.Errorf(\"cannot update alloc to Connect in-place\")\n\t}\n\n\tvar mErr *multierror.Error\n\tfor _, proxy := range h.proxies {\n\t\tif err := proxy.run(); err != nil {\n\t\t\tmErr = multierror.Append(mErr, err)\n\t\t}\n\t}\n\treturn mErr.ErrorOrNil()\n}\n\nfunc (h *consulGRPCSocketHook) Postrun() error {\n\th.mu.Lock()\n\tdefer h.mu.Unlock()\n\n\tfor _, proxy := range h.proxies {\n\t\tif err := proxy.stop(); err != nil {\n\t\t\t// Only log failures to stop proxies. Worst case scenario is a small","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/consul_grpc_sock_hook.go#L145-L181","documentation":"consulGRPCSocketHook.Update guard: the hook's Connect proxies were never initialized (len(h.proxies)==0), so the allocation cannot transition to using Connect via an in-place update. This is effectively a programming/state error, since Update should only run when Connect services exist and the hook preran.","triggerScenarios":"Thrown at client/allocrunner/consul_grpc_sock_hook.go:163 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify Prerun ran successfully before Update for this allocation","Ensure the job's group actually has Connect services defined","Resubmit the job or restart the allocation instead of an in-place update"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}