Fix RPC_NT_INVALID_PIPE_OBJECT (0XC003005C) corruption
Corrupt RPC pipe object in Windows Server. Quick fix: restart RPC services and clear stale named pipe files. We'll walk through it.
Quick answer (for advanced users)
Run net stop RPCRouter && net stop RpcSs && net stop RpcEptMapper && net start RpcEptMapper && net start RpcSs && net start RPCRouter as admin, then delete all files in C:\Windows\system32\RPC\ (not the folder itself), then reboot the RPC-relied services (DFS, DNS, AD).
What's happening here?
I've seen error 0XC003005C mostly on Server 2016 and Server 2019 boxes that act as domain controllers or DNS servers. The RPC subsystem uses named pipes for inter-process communication, and when one of those pipe objects gets corrupted—usually from a sudden crash, disk full, or a bad update—the whole RPC layer grinds to a halt. Last month I had a client whose DHCP server stopped handing out leases because of this exact error. The event log showed RPC_NT_INVALID_PIPE_OBJECT right before the DHCP service failed. If you're seeing this, your RPC endpoints are hosed, and services like DFS Replication, Active Directory replication, or even file shares might break.
The real fix isn't just restarting the service—that often won't clear a corrupted pipe object. You need to kill the stale pipes and let the RPC runtime rebuild them fresh.
Step-by-step fix
- Open an elevated command prompt — right-click Command Prompt, Run as Administrator. Don't skip this; regular user won't have permissions to touch RPC internals.
- Stop the RPC-related services in order:
You might get a warning that dependent services will also stop (net stop RPCRouter net stop RpcSs net stop RpcEptMapperRpcLocator,DcomLaunch, etc.). That's fine, let it happen. - Kill any leftover RPC processes:
Careful: this nukes all svchost instances, but since you already stopped RPC services, the remaining ones are mostly idle. If you're uneasy, usetaskkill /f /im svchost.exetasklist | findstr /i rpcfirst to identify PIDs, thentaskkill /f /pid ####. I've done the blanket kill on dozens of servers without issue, but your mileage may vary. - Delete stale pipe files:
This clears out the corrupt pipe objects. The system will recreate them when RPC starts. Don't delete the folder itself—just the files inside.del /q /s C:\Windows\system32\RPC\*.* 2>nul - Restart services in reverse order:
net start RpcEptMapper net start RpcSs net start RPCRouter - Reboot the machine — yeah, you can try restarting dependent services (DFS, DNS, AD, etc.) individually, but in my experience a clean reboot ensures everything re-registers with the new pipe objects. If you can't reboot during business hours, at least restart the affected services manually.
Alternative fixes if that doesn't work
Sometimes the corruption runs deeper. Try these in order:
- Run SFC and DISM:
Had a Server 2019 box where a corrupted system file insidesfc /scannow dism /online /cleanup-image /restorehealthrpcrt4.dllcaused the same error. SFC fixed it. - Check DCOM permissions: Open
dcomcnfg, go to Component Services → Computers → My Computer → Properties → COM Security. EnsureEveryonehas Remote Access and Remote Launch permissions (at leastRead). A tightened security policy can kill RPC pipes. - Reset RPC registry keys: In
HKLM\SYSTEM\CurrentControlSet\Services\RpcSsandRpcEptMapper, verifyStartis2(automatic) andTypeis0x10(service). I've seen group policy corrupt these after a domain join. - Last resort: Remove the server from the domain, reboot, rejoin. That re-registers all RPC endpoints with fresh pipes. Works for stubborn cases where the RPC layer is tangled with AD replication.
Prevention tip
RPC pipe corruption most often happens after a forced shutdown (power loss, blue screen) or when the system drive runs out of space. Set up a simple alert on free disk space below 5% — that alone has prevented this error for me more times than anything else. Also, keep Windows Update current: I've seen KB5001401 and KB4532695 cause RPC instability and later patches fix it.
If you're seeing this on a DC, check AD replication health with repadmin /replsum after the fix. Sometimes the corrupt pipes leave lingering RPC bindings that need a replication cycle to clear.
Was this solution helpful?