{"record":{"id":"31b7f749152a027e","repo":"databendlabs/databend","slug":"in-process-grpc-endpoint-closed","errorCode":null,"errorMessage":"in-process gRPC endpoint closed","messagePattern":"in-process gRPC endpoint closed","errorType":"exception","errorClass":"ConnectionRefused","httpStatus":null,"severity":"error","filePath":"src/meta/runtime/src/in_process_grpc.rs","lineNumber":189,"sourceCode":"\n        let sender = sender.ok_or_else(|| ChannelError::CannotConnect {\n            uri: addr.clone(),\n            message: \"in-process gRPC endpoint is not registered\".to_string(),\n        })?;\n\n        let mut endpoint = Endpoint::from_static(\"http://[::]:0\");\n        if let Some(timeout) = timeout {\n            endpoint = endpoint.timeout(timeout);\n        }\n\n        let connector = service_fn(move |_| {\n            let sender = sender.clone();\n            async move {\n                let (client, server) = tokio::io::duplex(IN_PROCESS_GRPC_BUFFER_SIZE);\n                sender\n                    .send(InProcessGrpcStream { inner: server })\n                    .map_err(|_| {\n                        io::Error::new(\n                            io::ErrorKind::ConnectionRefused,\n                            \"in-process gRPC endpoint closed\",\n                        )\n                    })?;\n                Ok::<_, io::Error>(TokioIo::new(client))\n            }\n        });\n\n        endpoint\n            .connect_with_connector(connector)\n            .await\n            .map_err(|e| ChannelError::CannotConnect {\n                uri: addr,\n                message: e.to_string(),\n            })\n    })\n}\n","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/meta/runtime/src/in_process_grpc.rs#L171-L207","documentation":"A sentinel error surfaced in connect_in_process_grpc when the duplex channel to the in-process gRPC endpoint fails — the registered in-process endpoint's sender has been dropped (server shut down) so no connection can be established. It is a generic guard: the target address has no live in-process receiver, meaning the meta or service process hosting the endpoint is not running in this process.","triggerScenarios":"Thrown at src/meta/runtime/src/in_process_grpc.rs:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the in-process gRPC endpoint is registered before calling connect, and that it is not shut down while clients are still connecting.","Re-register the endpoint or retry connect once registration completes.","Audit lifecycle ordering so the endpoint handle outlives all expected client connections."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}