linuxlxclxd

Failed lxd init


It's failed after I run lxd init --auto:

$ lxd init --auto
Error: Failed to create network 'lxdbr0': Failed adding DHCP/DNS access rules for network "lxdbr0" (ip): Failed apply nftables config: Failed to run: nft 
table ip lxd {
chain in.lxdbr0 {
        type filter hook input priority 0; policy accept;
        iifname "lxdbr0" tcp dport 53 accept
        iifname "lxdbr0" udp dport 53 accept
        iifname "lxdbr0" udp dport 67 accept

}

chain out.lxdbr0 {
        type filter hook output priority 0; policy accept;
        oifname "lxdbr0" tcp sport 53 accept
        oifname "lxdbr0" udp sport 53 accept
        oifname "lxdbr0" udp sport 67 accept

}
}
: Error: Could not process rule: No such file or directory

      ^^^^^^^^^
Error: Could not process rule: No such file or directory

      ^^^^^^^^^^
Error: Could not process rule: No such file or directory

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Could not process rule: No such file or directory

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Could not process rule: No such file or directory

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Could not process rule: No such file or directory

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Could not process rule: No such file or directory

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Could not process rule: No such file or directory

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I've been trying reinstall a lxd but error appears again (lxd installed using snap).


Solution

  • I know that this question is old, but I had same problem. After googling error message ended up here. Still there is no solution so this might help: In my case lxc wrongly detects that I'm using nftables instead of iptables because iptables was empty. I've added one iptable rule, restarted lxd and it's now working. More information: https://github.com/lxc/lxd/issues/8724