| Previous | Next |
| PEERDIST_ERROR_NOT_LICENSED | PEERDIST_ERROR_TRUST_FAILURE |
PEERDIST_ERROR_SERVICE_UNAVAILABLE
PeerDist Service is still initializing and will be available shortly.
PEERDIST_ERROR_SERVICE_UNAVAILABLE is Win32 error 4065 (0xFE1) and belongs to Peer Distribution and BranchCache PeerDistSvc startup readiness. The system description identifies the immediate condition but does not identify the caller, object, policy, device, service instance, or transition that produced it.
Interpret this result at the API boundary that returned it. Capture it before logging, cleanup, or another Windows call can replace the thread-local last-error value. Compare the recorded inputs with the documented precondition for Peer Distribution and BranchCache PeerDistSvc startup readiness rather than starting with a broad system repair.
Where the result appears
- This result can surface during the PeerDistSvc startup readiness stage of a PeerDist publisher or consumer.
- This result can surface during a BranchCache request where the Peer Distribution service is still initializing and cannot accept the request yet.
- It can surface during an API call whose diagnosis depends on capture service state, startup time, PeerDistGetStatus output, and relevant service events.
- It can surface during a recovery path that must apply bounded backoff while initialization progresses, then fail with diagnostics if readiness never arrives.
Likely causes
- the Peer Distribution service is still initializing and cannot accept the request yet.
- the caller made a stale assumption during PeerDistSvc startup readiness.
- the observed PeerDist state no longer matched capture service state, startup time, PeerDistGetStatus output, and relevant service events.
- the wrapper retried before it could apply bounded backoff while initialization progresses, then fail with diagnostics if readiness never arrives.
Diagnostic sequence
Diagnosis of it starts with the exact request type: read, write, create, transition, validation, cancellation, or administrative action. Identify the object generation and subsystem owner, then decide whether the failure happened before side effects, during a partial transition, or after completion. This ordering matters in Peer Distribution and BranchCache PeerDistSvc startup readiness because a blind retry can hide stale state or repeat a non-idempotent change.
- record capture service state, startup time, PeerDistGetStatus output, and relevant service events.
- record the exact PeerDist function involved in PeerDistSvc startup readiness.
- record the object generation used for PeerDistSvc startup readiness.
- record PeerDistSvc status while evaluating the Peer Distribution service is still initializing and cannot accept the request yet.
- record origin fallback behavior before attempting to apply bounded backoff while initialization progresses, then fail with diagnostics if readiness never arrives.
Correlate it with the owning component’s operational log, the Windows System log, and any subsystem trace. Telemetry for this Win32 error should preserve native identifiers such as a path or file ID, handle generation, node or peer identity, policy ID, object version, offset and length, or transaction token. Retain decimal 4065, hexadecimal 0xFE1, and the producing API even when a localized message is also shown.
State boundary to prove
The decisive boundary for this Win32 error is whether the Peer Distribution service is still initializing and cannot accept the request yet. Prove or disprove that proposition using capture service state, startup time, PeerDistGetStatus output, and relevant service events together with the exact PeerDist function involved in PeerDistSvc startup readiness. When observations for this Win32 error disagree, preserve both and inspect the transition between them instead of choosing the more convenient value.
A focused validation for this Win32 error should recreate the relevant part of this situation: a client starts at boot before PeerDistSvc reports ready. A readiness probe replaces an aggressive fixed retry loop. The negative case should keep the responsible condition unchanged and confirm error 4065; the recovery case should change only that condition and verify a successful result without an unrecorded side effect.
Suggested diagnostic fields
For error 4065, keep winerr_4065_api, winerr_4065_object, winerr_4065_state_before, winerr_4065_request, winerr_4065_first_status, winerr_4065_verification. These fields distinguish the initial state, requested transition, first status, and verified recovery result.
Handling, retry, and recovery
apply bounded backoff while initialization progresses, then fail with diagnostics if readiness never arrives A retry is justified only after the recorded state that produced this specific code has changed.
Retry it only after evidence shows a change in Peer Distribution and BranchCache PeerDistSvc startup readiness. Initialization, asynchronous completion, recall, or service readiness can justify bounded backoff; malformed metadata, invalid identifiers, policy rejection, unsupported versions, and integrity failures require correction. Before repeating a write or configuration operation after it, query completion state explicitly.
What to log for support and telemetry
- log decimal 4065, hexadecimal
0xFE1, and the producing API. - log the target object and observed Peer Distribution and BranchCache PeerDistSvc startup readiness state.
- log caller identity, process and thread IDs, machine or node identity, and UTC time.
- log attempt number, elapsed time, previous result, and any partial side effect.
- retain the first lower-level or component-specific error before Win32 translation.
Difference from nearby codes
SHUTDOWN_IN_PROGRESS identifies the opposite lifecycle direction; it is expected during startup.
Practical example
A client starts at boot before PeerDistSvc reports ready.
Developer and administrator guidance
Code that handles it should keep its Win32 domain visible across exceptions, RPC responses, and JSON or REST wrappers. Administrators should verify the subsystem evidence before changing policy, deleting state, forcing failover, or replacing storage. Recovery is demonstrated only when a test observes 4065, changes the responsible condition, and confirms that the same operation succeeds without hidden data loss.
References
- Microsoft: System Error Codes (4000–5999) — reference for error 4065.
- Microsoft: Peer Distribution API — reference for error 4065.
- Microsoft: peerdist.h API reference — reference for error 4065.
- Microsoft: BranchCache — reference for error 4065.
Looking for a different code? Search another status or error code.