What this error means
When you see RPC_NT_CANT_CREATE_ENDPOINT (0XC0020015), it means the Remote Procedure Call service tried to open a network port but couldn't. This usually appears when a program tries to communicate over the network, like a database client connecting to a server, or when a service fails to start during boot.
The error text says "The endpoint cannot be created." That's Windows-speak for "I can't bind to the IP address and port I need." The root cause is almost always one of three things:
- A firewall rule is blocking the port range RPC needs.
- The RPC service or a dependent service is set to the wrong startup type.
- A registry key that defines the RPC port range got corrupted or deleted.
Let's fix it. Start with the first fix—it takes 30 seconds and solves about 40% of cases.
Fix 1: Quick check—restart the RPC service (30 seconds)
This sounds too simple, but it works more often than you'd think. When the RPC endpoint mapper gets stuck, a restart clears it.
- Press Win + R, type
services.msc, and hit Enter. - Scroll down to Remote Procedure Call (RPC). It's usually near the top.
- Right-click it and select Restart. If Restart is greyed out, the service is already stopped—click Start instead.
- Wait 10 seconds, then check if the error is gone.
What you should see: After restart, the service status will briefly show "Stopping" then "Running." If it fails to start, you'll get a popup with an error code. If that happens, skip to Fix 2.
Also check these two dependent services—they often get overlooked:
- Remote Procedure Call (RPC) Locator—set to Manual.
- DCOM Server Process Launcher—set to Automatic.
If either is disabled, that breaks RPC. Right-click each, go to Properties, and set the Startup type accordingly.
If restarting didn't fix it, move to Fix 2.
Fix 2: Check Windows Firewall rules for RPC (5 minutes)
Windows Firewall sometimes blocks RPC dynamic ports, especially after a Windows update or when you've installed third-party security software. The error shows up when a client tries to connect but the server can't create the listening endpoint because the firewall is denying it.
- Open Control Panel → Windows Defender Firewall.
- Click Advanced settings on the left.
- Click Inbound Rules.
- Look for rules named Remote Procedure Call (RPC) or COM+ Network Access. There should be several.
- Check if any of them are disabled. If so, right-click and Enable Rule.
What you should see: After enabling, the rule will have a green checkmark in the Enabled column.
If all rules are already enabled, the problem might be that RPC is trying to use a specific port range that's not allowed. Here's the quick test:
- Open Command Prompt as Administrator.
- Run
netstat -abn | findstr 135to see if port 135 is listening. - If nothing shows, RPC can't even open its main port. That points to something else blocking it—like a third-party firewall.
If you have third-party firewall software (McAfee, Norton, etc.), temporarily disable it and test. If the error goes away, add an exception for RPC in that software.
Still getting the error? Go to Fix 3.
Fix 3: Reset RPC port range in registry (15+ minutes)
This is the heavy-duty fix. It applies when the RPC service starts but can't create an endpoint because the registry key that defines the dynamic port range is missing or corrupted. I've seen this after botched uninstalls of database software or when someone messed with the registry manually.
Backup first. This is critical. Export the registry key before changing anything.
- Press Win + R, type
regedit, hit Enter. - Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc - Right-click Rpc in the left pane and select Export. Save it as
rpc_backup.reg. - Now look for a subkey called Internet. If it's missing, right-click on Rpc, select New → Key, and name it
Internet. - Inside the Internet key, check for two values:
PortsandPortsInternetAvailable. - If they're missing, create them: Right-click empty space → New → Multi-String Value. Name it
Ports. Do the same forPortsInternetAvailable. - Set
PortsInternetAvailabletoY(just the letter). - For
Ports, set it to a specific range or leave it empty. If you leave it empty, RPC will use the default dynamic range (49152-65535). If you want a fixed range, enter something like5000-6000, one range per line. But most people don't need that. Leave it empty unless you know you need a fixed range.
What you should see: After creating the values, close regedit and restart the computer. When it comes back, the error should be gone.
Still not working? One more thing to try: Re-register the RPC endpoint mapper.
- Open Command Prompt as Administrator.
- Run
regsvr32 rpcrt4.dll. You'll get a popup confirming success. - Restart the service again.
If you've tried all three fixes and the error persists, it's time to look at deeper system corruption. Run sfc /scannow from an elevated command prompt. That takes 10-15 minutes but will fix damaged system files that could be causing this.
One real-world scenario: You're setting up a SQL Server instance on Windows Server 2019, and during the install you get 0XC0020015. That happens when the Windows Firewall was turned off completely by group policy, but the RPC service still can't bind because the network profile is set to Public. Check your network profile in Settings → Network & Internet—make sure it's set to Private or Domain, not Public, if you're on a trusted network.
That's the complete flow. Start with Fix 1, and only move down if needed. Most people stop at Fix 1 or Fix 2.