Fixing "COMMAND_FAILED: 'python-nftables' failed: netlink: Error: Could not process rule: No buffer space available" Error
September 5, 2023(September 5, 2023)
Introduction #
I recently ran into a baffling error while configuring firewalld
on my system: COMMAND_FAILED: 'python-nftables' failed: netlink: Error: Could not process rule: No buffer space available
. Here’s how I diagnosed and resolved the issue.
When Did I Encounter This Error? #
This annoying message popped up when I was Configuring firewalld
.
Diagnosis #
After some digging, I found that the issue was likely related to the net.core.rmem_max
and possibly net.core.rmem_default
system parameters.
I checked the current settings with these commands(Since I was using LXC, I also had to check these settings on the host system):
sysctl -n net.core.rmem_max
sysctl -n net.core.rmem_default
How I Solved It #
Increasing the Buffer Sizes #
I temporarily increased the buffer sizes this way:
sysctl -w net.core.rmem_max=new_value_max
sysctl -w net.core.rmem_default=new_value_default
Testing #
After making these changes, I tried configuring firewalld
again and this time, it worked.
Making the Changes Permanent #
Because this solved my problem, I made the changes permanent by adding them to a sysctl config file.
I added the settings to /etc/sysctl.d/network_buffer.conf
like so:
echo "net.core.rmem_max = new_value_max" >> /etc/sysctl.d/network_buffer.conf
echo "net.core.rmem_default = new_value_default" >> /etc/sysctl.d/network_buffer.conf
Conclusion #
For me, tweaking the net.core.rmem_max
and net.core.rmem_default
parameters cleared up the “No buffer space available” error. If you’re facing a similar issue, especially while configuring firewalld
, you might want to try this out. But as always, make sure to test extensively after making any changes like this.