Fix: ERROR_CANNOT_BREAK_OPLOCK (Error Code 802)
Check if firewall is conflicting with the connection
4 min. read
Published on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

The ERROR_CANNOT_BREAK_OPLOCK Windows system error, with code 802 (0x322), appears when an operation can’t be completed due to an oplock (opportunistic locking). This usually happens due to network-related issues, primarily misconfigured network settings, incorrect DNS, or blocks placed by the firewall.
The message for Error Code 802 reads, The operation did not complete successfully because it would cause an oplock to be broken. The caller has requested that existing oplocks not be broken.
Before you proceed to the solutions, restart the PC, install all pending updates for Windows and the affected software, and verify the health of the Active Directory (AD). For most, these basic checks will do the trick!
How can I fix ERROR_CANNOT_BREAK_OPLOCK in Windows?
1. Reset the network settings
- Press Windows + I to open Settings, go to Network & Internet from the left pane, and then click on Advanced network settings.
- Click on Network reset.
- Click on the Reset now button.
- Finally, click on Reset in the confirmation prompt to confirm the change.
- Once done, reboot the setup and verify whether ERROR_CANNOT_BREAK_OPLOCK is fixed.
2. Set a different DNS
- Press Windows + R to open Run, type ncpa.cpl in the text field, and hit Enter.
- Right-click on the active network adapter, and select Properties.
- Select Internet Protocol Version 4 (TCP/IPv4), and click on Properties.
- Select the Use the following DNS server addresses entry, and enter the following in the fields underneath:
- Preferred DNS server: 8.8.8.8
- Alternate DNS server: 8.8.4.4
- Tick the checkbox for Validate settings upon exit, and click OK to save the changes.
- Finally, reboot the PC and check for improvements.
An incorrect DNS configuration can also trigger Error Code 802 (ERROR_CANNOT_BREAK_OPLOCK), so try changing the DNS server. Also, while we have used Google’s Public DNS due to its reliability, you can switch to the fastest DNS server near you for better speed!
3. Allow RPC through the firewall
- Press Windows + S to open Search, type Control Panel, and click on the relevant result.
- Click on System and Security.
- Click on Windows Defender Firewall.
- Select Advanced settings from the left pane.
- Go to Inbound Rules from the navigation pane, and click on New Rule.
- Select the Custom entry and click on Next.
- Select the All programs entry and click Next.
- Choose TCP from the Protocol type dropdown menu and RPC Dynamic Ports from the Local port dropdown menu, and then click Next.
- Select the Any IP Address option under both local IP and remote IP settings, and click Next.
- Check the Allow the connection option and click Next.
- Select the profile(s) the rule applies to, and click Next.
- Add a name and description for the rule and click Finish to create it.
For 3 out of 5 users, ERROR_CANNOT_BREAK_OPLOCK appeared when RPC was blocked by the firewall. So, you will have to create a new rule within the firewall that unblocks RPC!
4. Temporarily disable the firewall
- Press Windows + S to open Search, type Windows Defender Firewall, and click on the relevant result.
- Select the Turn Windows Defender Firewall on or off option from the left pane.
- Choose Turn off Windows Defender Firewall under both Private network settings and Public network settings, and then click on OK to save the changes.
- Once done, reboot the PC and check for improvements.
Remember, disabling Windows Defender Firewall shouldn’t be a long-term solution. Instead, use it to identify if the firewall is conflicting with the connection, find out where the fault lies, rectify it, and re-enable the firewall right away!
5. Contact the administrator or support team
If nothing so far has worked, the last option is to contact the setup’s administrator. Or if you created the setup, get in touch with the support team. Because, at this point, it’s likely a misconfiguration in the setup or AD to blame, and that can only be identified after a thorough inspection.
In my experience, although ERROR_CANNOT_BREAK_OPLOCK (0x322) appears rarely, fixing it takes a lot of patience since there are several key aspects to look at. But, more often than not, the problem turns out to be with the firewall.
Before you leave, discover expert tips to make your Internet faster than ever and enjoy superfast browsing!
For any queries or to share which fix worked for you, drop a comment below.
User forum
0 messages