0XC0020008

Fix RPC_NT_INVALID_NET_ADDR (0XC0020008) — Network Address Invalid

RPC_NT_INVALID_NET_ADDR (0XC0020008) means your RPC call is hitting a bad or unresolvable network address. Here's how to track it down and fix it fast.

Quick answer: The RPC client passed an address the server can't parse or resolve — fix the DNS name, IP, or SMB binding and the error goes away.

I've seen 0XC0020008 pop up on backup jobs, WMI queries, and remote registry calls for years. The client code (or the tool wrapping it) built a binding string with a hostname or IP the RPC runtime refuses to accept. Could be a trailing space in a config file, a UNC path with the wrong server name, a DNS record pointing at a decommissioned host, or an IPv6 address your app tried to cram into an IPv4-only binding. The RPC layer validates that address before it ever hits the wire, so you get the error locally, which is why it looks random.

Last month a client called because their nightly Veeam job kept dying at 2 AM with exactly this code. Turned out somebody had edited the repository host entry and left a stray space after the server name. One character. Three days of failed backups. Fun times.

How to fix RPC_NT_INVALID_NET_ADDR

  1. Find the calling process. Check Event Viewer under Applications and Services Logs, or just run the app from a command prompt so you catch the error live. You need to know which tool is making the RPC call — backup agent, monitoring suite, SCOM, WMI consumer, whatever.
  2. Inspect the address string. Open the config file or GUI field that holds the target. Look for:
  • Trailing spaces or newlines
  • Mismatched quotes wrapping the hostname
  • A hostname that doesn't resolve (nslookup server01.corp.local)
  • An IP with a port crammed in like 10.0.0.5:445 when the format wants them separate
  • An IPv6 address in a field the app only parses as IPv4

Test resolution from the machine throwing the error, not from your laptop. Half the time the DNS record exists in your subnet but not the server's.

nslookup targetserver.corp.local
ping -4 targetserver.corp.local
Test-NetConnection targetserver.corp.local -Port 135
Test-NetConnection targetserver.corp.local -Port 445

Port 135 is the RPC Endpoint Mapper. If that fails, nothing else matters yet.

  1. Fix the binding, then retry. Replace the hostname with a known-good FQDN, save, and rerun the operation. If the tool accepts an IP, try that as a sanity check — if IP works and hostname doesn't, you've got a DNS problem, not an RPC problem.
  2. Check the firewall on the target. RPC dynamic ports (the range 49152–65535 on modern Windows) have to be open, or you'll get related errors. The Microsoft netsh rule usually handles it:
netsh advfirewall firewall show rule name="Remote Service Management (RPC)"
netsh advfirewall firewall show rule name="Remote Service Management (RPC-EPMAP)"

On Server 2012 R2 and earlier the dynamic range is 1024–5000, which trips people up when they copy firewall rules from a 2019 box.

  1. Verify the RPC services are running. Both ends need RpcSs up. Sounds dumb, but I've found it stopped on freshly-imaged VMs more than once.
Get-Service RpcSs, RpcEptMapper | Format-Table Name, Status, StartType

If that doesn't work

Sometimes the address is fine and the runtime is still rejecting it. Work through these:

  • Check the hosts file. C:\Windows\System32\drivers\etc\hosts on the calling machine. A stale entry overrides DNS and gives you exactly this error when the target's IP changed.
  • Clear the DNS cache. ipconfig /flushdns on the caller. Stale negative cache entries are quieter killers than people realize.
  • Disable IPv6 on the NIC temporarily. If the app builds a binding using the IPv6 address but the target only listens on IPv4, you get 0XC0020008. Test with it off; if that fixes it, you know where the real bug is.
  • Look for a hardcoded address in the app config. Plenty of legacy tools have the old server name baked into a .config or .ini that survived a migration. Grep for it:
findstr /s /i "oldserver" C:\ProgramData\YourApp\*.config
findstr /s /i "oldserver" C:\Program Files\YourApp\*.ini
  • Test with a raw RPC ping. Eros from rpcping.exe (part of the Windows SDK) tells you whether the runtime itself is happy:
rpcping -s targetserver.corp.local -e 135 -a connect -u NTLM -t ncacn_ip_tcp

If that succeeds, the problem is 100% in the calling app's address handling, not in Windows.

Stop it from coming back

Use FQDNs everywhere, never bare hostnames. Add monitoring for RPC Endpoint Mapper (port 135) on every server you call remotely — Nagios, Zabbix, PRTG, whatever you've got, just watch it. And when you decommission a server, hunt down every config file that referenced it before you power it off. The address hanging around in a config three months later is how this error finds you at 2 AM.

One more thing: if you're on a mixed IPv4/IPv6 network, force your RPC-binding apps to IPv4 explicitly in their config if they even offer the option. The number of tools that quietly prefer IPv6 and then choke on a dual-stack DNS response is absurd. Skip the "let Windows figure it out" approach for anything mission-critical.

Related Errors in Network & Connectivity
0X000013C7 Cluster Network Stuck in 'Already Online' — 0X000013C7 Fix 0X000000E9 Fix ERROR_PIPE_NOT_CONNECTED (0X000000E9) on Windows Wi-Fi Keeps Dropping on Windows 11: 3 Fixes That Actually Work Fix DHCP Not Enabled for WiFi on Windows

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.