astrid-runtime/astrid · error
Windows named-pipe endpoint is absent
Error message
Windows named-pipe endpoint is absent
What it means
probe() checks a Windows named-pipe endpoint's state without connecting; EndpointState::Absent (the pipe name does not exist) is reported as io::ErrorKind::NotFound with this message. It is a non-blocking readiness check telling the caller that no server is currently listening on that pipe name.
Source
Thrown at crates/astrid-core/src/local_transport/windows.rs:334
matches!(
error.raw_os_error().map(i32::cast_unsigned),
Some(ERROR_BROKEN_PIPE | ERROR_NO_DATA | ERROR_PIPE_NOT_CONNECTED)
)
}
pub(super) fn split(
stream: LocalStream,
) -> (
tokio::io::ReadHalf<LocalStream>,
tokio::io::WriteHalf<LocalStream>,
) {
tokio::io::split(stream)
}
pub(super) fn probe(path: &Path) -> io::Result<()> {
match endpoint_state(path)? {
EndpointState::Available => Ok(()),
EndpointState::Absent => Err(io::Error::new(
io::ErrorKind::NotFound,
"Windows named-pipe endpoint is absent",
)),
EndpointState::BusyOrDenied => Err(io::Error::new(
io::ErrorKind::WouldBlock,
"Windows named-pipe endpoint is occupied but unavailable",
)),
}
}
pub(super) fn endpoint_is_present(path: &Path) -> io::Result<bool> {
Ok(!matches!(endpoint_state(path)?, EndpointState::Absent))
}
pub(super) fn remove_endpoint(path: &Path) -> io::Result<()> {
if endpoint_is_present(path)? {
return Err(io::Error::new(
io::ErrorKind::PermissionDenied,View on GitHub (pinned to affd8760f4)
Solutions
- Ensure the server is running and has created the pipe endpoint before probing; add startup ordering/readiness waiting
- Verify the exact pipe path/name matches what the server creates
- If the server was expected, restart it and re-probe; treat NotFound as 'wait for server' rather than a fatal client bug
Example fix
// before probe(&pipe_path)?; // may NotFound if server not up // after wait_until(|| probe(&pipe_path).is_ok(), Duration::from_secs(10))?;
Defensive patterns
Strategy: retry
Try / catch
// wait for server readiness instead of failing on first probe
let deadline = Instant::now() + Duration::from_secs(10);
while probe(&pipe).is_err() {
if Instant::now() > deadline { bail!("named-pipe endpoint never appeared"); }
sleep(Duration::from_millis(50)).await;
} Prevention
- Sequence startup so the server creates the pipe before clients probe
- Compare the pipe name byte-for-byte against what the server creates
- Treat probe NotFound as 'not ready yet' with a bounded wait, not an immediate failure
When it happens
Trigger: Calling probe(path) when no process has created the named pipe (CreateNamedPipe) for the given path, or the server has closed its listener.
Common situations: Client probes before the server finished starting; the server process died; the pipe name is misspelled so it never matches the server's name.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Windows named-pipe endpoint disappeared while waiting
- Windows named-pipe endpoint is occupied but unavailable
- Windows named-pipe endpoint denied access while waiting
- named-pipe client disconnected before transport authenticati
- Windows named-pipe endpoints are kernel-owned and cannot be
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/4ee9efb12a8a93c2.
Report an issue: GitHub.