How to fix Windows error 0xC0000237: Graceful disconnect
By Sai Kiran Pandrala · reviewed by Sai Kiran Pandrala, Editor Last verified: 2026-05-25
Windows error 0xC0000237 (STATUS_GRACEFUL_DISCONNECT) is a NTSTATUS returned by the Windows NT kernel (NTSTATUS). The official meaning is: The transport connection was gracefully closed. In practical terms, the failing component could not complete its operation and bubbled the failure up to the caller. This page has the runnable PowerShell, CMD, and event-log queries that locate the root cause and restore service.
| Error code | 0xC0000237 |
|---|---|
| Symbolic name | STATUS_GRACEFUL_DISCONNECT |
| Code class | NTSTATUS |
| Platform | Windows |
| Subsystem | Windows NT kernel (NTSTATUS) |
| Official message | The transport connection was gracefully closed. |
| Source | Microsoft MS-ERREF (NTSTATUS) |
What is 0xC0000237?
0xC0000237 is a NTSTATUS value defined in Microsoft's MS-ERREF specification. It is owned by the windows nt kernel layer of Windows. The verbatim message Microsoft assigns to this code is: "The transport connection was gracefully closed." In day-to-day terms that means a call into the Windows NT kernel (NTSTATUS) returned without completing its work, and either the caller or an event-log entry surfaces this code so an administrator can act on it.
NTSTATUS values starting with 0xC0000000 are failure codes from the Windows kernel or one of its driver subsystems. They are usually translated to a friendlier Win32 error before they reach end users, but server logs and crash dumps surface the raw NTSTATUS exactly as you see it here.
When does 0xC0000237 appear?
These are the patterns that trigger 0xC0000237 most often in production:
- Service start failure shortly after a Windows Update reboot
- Application calling the affected API without the rights the API requires
- Group Policy or Local Security Policy revoking a privilege the caller needs
- Antivirus or EDR product locking a file or registry key the subsystem expects to write
- Corrupt or rolled-back configuration after a system restore
If the failure is intermittent, check the Reliability Monitor (perfmon /rel) to confirm whether the error correlates with a recent Windows Update, driver install, or app crash.
How to fix 0xC0000237
Start with the detection block so you know which process and which call site produced 0xC0000237. Then apply the subsystem-specific repair. Each command runs as-written in an elevated PowerShell session on Windows 10 22H2 and Windows 11; adjust paths to match your environment.
Detect where 0xC0000237 is firing (PowerShell, run as administrator)
# 1. Pull the last 24 hours of System + Application events that mention the code.
$since = (Get-Date).AddDays(-1)
Get-WinEvent -FilterHashtable @{ LogName='System'; StartTime=$since } -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match '0xC0000237' -or $_.Message -match 'STATUS_GRACEFUL_DISCONNECT' } |
Select-Object TimeCreated, ProviderName, Id, Message | Format-List
Get-WinEvent -FilterHashtable @{ LogName='Application'; StartTime=$since } -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match '0xC0000237' -or $_.Message -match 'STATUS_GRACEFUL_DISCONNECT' } |
Select-Object TimeCreated, ProviderName, Id, Message | Format-List
# 2. Snapshot which process is generating the failure, if it shows up live.
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Id, ProcessName, CPU, WS
Diagnose the failing subsystem (PowerShell, run as administrator)
# 1. Decode the code with err.exe (Microsoft Error Lookup Tool) for a second opinion.
&"C:\Tools\Err.exe" 0xC0000237 # download once from learn.microsoft.com
# 2. Capture a short ETW trace of the failing process so you can see which API call returns 0xC0000237.
logman create trace -n C0000237-trace -o C:\Logs\C0000237.etl `
-p "Microsoft-Windows-Kernel-General" 0xFFFFFFFFFFFFFFFF 0xFF
logman start -n C0000237-trace
# Reproduce the failure now, then:
logman stop -n C0000237-trace
logman delete -n C0000237-trace
# 3. Restart the user-mode service that hosts Windows NT kernel (NTSTATUS), then re-test.
Get-Service | Where-Object { $_.DisplayName -match 'service-keyword-for-this-subsystem' } |
Restart-Service -Force
CMD equivalent (for older or recovery shells)
sfc /scannow
dism /online /cleanup-image /restorehealth
chkdsk C: /scan
Repair core system files (last resort)
# Run all three; the order matters.
sfc /scannow
dism /online /cleanup-image /restorehealth
chkdsk C: /scan
shutdown /r /t 60
If you can't fix immediately
Workarounds that reduce exposure to 0xC0000237 while a full repair is scheduled:
- Run the failing application as administrator (right-click, Run as administrator) if the call site needs a privilege Group Policy normally withholds.
- Restart the host. Many windows nt kernel failures clear after a clean reboot because in-memory handle tables get rebuilt from scratch.
- Disable the offending feature in the relevant Group Policy or registry key, document the change, and re-enable it after the fix lands.
- Re-create the user profile if the error reproduces only for one account. User-specific corruption is a common cause when the kernel-side state is healthy.
How to verify the fix worked
After applying the repair, confirm 0xC0000237 stops appearing in event logs and that the failing operation completes.
# 1. Re-run the same event-log query and confirm zero matches in the last hour.
$since = (Get-Date).AddHours(-1)
Get-WinEvent -FilterHashtable @{ LogName='System'; StartTime=$since } -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match '0xC0000237' } | Measure-Object
Get-WinEvent -FilterHashtable @{ LogName='Application'; StartTime=$since } -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match '0xC0000237' } | Measure-Object
# 2. Re-run the failing application or API call and confirm it returns S_OK / 0.
# 3. Snapshot the relevant service state to prove it is running cleanly.
Get-Service | Where-Object { $_.Status -ne 'Running' -and $_.StartType -eq 'Automatic' } |
Format-Table Name, DisplayName, Status, StartType
Frequently asked questions
What does 0xC0000237 mean exactly?
It is the Microsoft-assigned NTSTATUS value for STATUS_GRACEFUL_DISCONNECT. The official text reads: "The transport connection was gracefully closed." In practical terms, the windows nt kernel layer could not complete the requested operation and returned this code to the caller.
Is 0xC0000237 dangerous on its own?
No. 0xC0000237 is a status value, not a security event. It signals that one specific call failed inside the Windows NT kernel (NTSTATUS). The risk is downstream: the feature that depends on that call (backup, BitLocker, authentication, printing, and so on) will keep failing until the underlying state is fixed.
Will reinstalling Windows fix 0xC0000237?
Usually no. A reinstall is a sledgehammer for what is normally a configuration, permission, or driver-state problem inside the windows nt kernel stack. Run the targeted PowerShell repair above first. Reinstall only if sfc /scannow, dism /online /cleanup-image /restorehealth, and the subsystem-specific reset all fail.
Where is STATUS_GRACEFUL_DISCONNECT defined?
In the Microsoft MS-ERREF specification under the NTSTATUS table. Microsoft Learn publishes the complete reference at https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/. The header-file definitions ship in the Windows SDK (winerror.h, ntstatus.h).
How is 0xC0000237 different from the codes either side of it?
Codes that sit next to 0xC0000237 in the spec usually belong to the same subsystem but cover a different failure mode. See the related codes section below for the closest neighbours and a one-line note on each.
Related error codes
- How to fix Windows error 0xC0000235 ,
STATUS_HANDLE_NOT_CLOSABLE: handle not closable. - How to fix Windows error 0xC0000236 ,
STATUS_CONNECTION_REFUSED: connection refused. - How to fix Windows error 0xC0000238 ,
STATUS_ADDRESS_ALREADY_ASSOCIATED: address already associated. - How to fix Windows error 0xC0000239 ,
STATUS_ADDRESS_NOT_ASSOCIATED: address not associated. - How to fix Windows error 0xC000023A ,
STATUS_CONNECTION_INVALID: connection invalid.
Related fixes
Related guides worth a look while you sort this one out:
- How to fix Windows error 0xC0000231: Marshall overflow
- How to fix Windows error 0xC0000232: Invalid variant
- How to fix Windows error 0xC0000233: Domain controller not found
- How to fix Windows error 0xC0000234: Account locked out
- How to fix Windows error 0xC0000235: Handle not closable
- How to fix Windows error 0xC0000236: Connection refused
References
- Microsoft MS-ERREF NTSTATUS values: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55
- Microsoft Learn , System Error Codes: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes
- Microsoft Learn , Windows error reporting overview: https://learn.microsoft.com/en-us/windows/win32/wer/windows-error-reporting
- Microsoft Q&A (community search by error code): https://learn.microsoft.com/en-us/answers/search.html?q=0xC0000237
*Assembled from the Microsoft MS-ERREF specification on 2026-05-25. Confirm against the official Microsoft Learn entry for STATUS_GRACEFUL_DISCONNECT before applying changes in production environments.*
Field notes from real Windows incidents
When I work on the 0xC0000237 symptom the rhythm I lean on is the one I have built over years of these tickets, not a stack of generic advice. DISM RestoreHealth needs network or a known-good source image; the most common cause of a failed RestoreHealth is a blocked Windows Update endpoint. STOP codes look terrifying but the first DWORD almost always points directly at the responsible driver.
Reliability Monitor is the single most underused triage surface in Windows — it gives 30 days of crash history without writing a query. Windows error codes come in a handful of families; once you recognise the family, the doc page is one search away.
Tools I actually reach for
For the 0xC0000237 symptom on Windows the cheapest signal I can land usually comes from Reliability Monitor (perfmon /rel), then Event Viewer (eventvwr.msc), DISM and sfc, WinDbg for STOP code analysis when Reliability Monitor (perfmon /rel) cannot see the layer the fault sits in, and PowerShell Get-WinEvent for the cases where neither of those answers cleanly. That ordering is not academic. It matches the layers the failure tends to surface through, so the cheap signal lands first and the heavier tooling only comes out when the simpler answer does not hold up under scrutiny.
Verification I run before I close the ticket
Before I mark the 0xC0000237 symptom resolved on a Windows unit, the verification loop below is what I actually run. Each step proves a different layer is green, and the order matters - the cheap checks gate the more expensive ones.
err.exe 0xXXXXXXXX # symbolic decodeIf that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
DISM /Online /Cleanup-Image /RestoreHealthIf that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
Get-WinEvent -FilterHashtable @{LogName='System'; Level=1,2; StartTime=(Get-Date).AddDays(-7)}If that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
sfc /scannowOnly when every line above runs clean do I close the ticket and update the runbook with the timestamps.
Where I check first when the docs disagree
When two sources contradict each other on a Windows detail, the disambiguation order I lean on is stable. I usually start at learn.microsoft.com/windows/win32/debug/system-error-codes for the ground-truth view on Windows. I usually start at techcommunity.microsoft.com/category/windows for the ground-truth view on Windows. I usually start at github.com/microsoft/Windows-Driver-Frameworks for the ground-truth view on Windows. I usually start at support.microsoft.com for the ground-truth view on Windows. Random blog posts and reseller wikis are signal, not ground truth, and I treat them as such until the references above either confirm or contradict the claim.
Pitfalls I have walked into on this exact path
The shortcuts that look smart on the 0xC0000237 symptom have a habit of biting back. The pitfalls below are the ones I have personally walked into on a Windows unit, not things I read about. STOP codes look terrifying but the first DWORD almost always points directly at the responsible driver. Reliability Monitor is the single most underused triage surface in Windows, it gives 30 days of crash history without writing a query. DISM RestoreHealth needs network or a known-good source image; the most common cause of a failed RestoreHealth is a blocked Windows Update endpoint. When in doubt I revert to the slower path that the manual prescribes - the time I save by skipping it is always smaller than the time I spend cleaning up afterwards.
What I tell the next on-call
When I hand the 0xC0000237 symptom off to the next person on rotation, the three lines I leave in the runbook are these. First, the symptom signature for Windows on the Windows family - not a paraphrase, the exact string that surfaces. Second, the diagnostic that gave the highest signal in the least time. Third, the exact verification command whose green output justified closing the ticket. That trio is what turns a one-off fix into a runbook entry the next engineer can use without paging me at three in the morning.
I also add a one-line note on the cost of getting this wrong. For the 0xC0000237 symptom on a Windows unit, the cost is rarely the replacement part. It is the downtime, the second site visit, and the trust deficit you spend with whoever owns the asset when the fix does not hold. That framing keeps the next on-call from choosing the cheap-looking shortcut that ends up costing the most in elapsed hours and goodwill.