netbirdio/netbird · error
flush chain creation
Error message
flush chain creation: %w
What it means
Committing the creation of the raw notrack chains (output and prerouting) failed in initNoTrackChains. The chains were queued on the connection but the kernel rejected the batch, e.g. because a chain with a conflicting hook/priority already exists.
Solutions
- Check for pre-existing chains with the same name and hook
- Retry initialization after cleaning stale netbird tables
- Inspect kernel logs for the netlink rejection reason
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at client/firewall/nftables/manager_linux.go:817 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/354c205aad045115.
Report an issue: GitHub.
Appendix: source
Thrown at client/firewall/nftables/manager_linux.go:817
func (m *Manager) initNoTrackChains(table *nftables.Table) error {
m.notrackOutputChain = m.rConn.AddChain(&nftables.Chain{
Name: chainNameRawOutput,
Table: table,
Type: nftables.ChainTypeFilter,
Hooknum: nftables.ChainHookOutput,
Priority: nftables.ChainPriorityRaw,
})
m.notrackPreroutingChain = m.rConn.AddChain(&nftables.Chain{
Name: chainNameRawPrerouting,
Table: table,
Type: nftables.ChainTypeFilter,
Hooknum: nftables.ChainHookPrerouting,
Priority: nftables.ChainPriorityRaw,
})
if err := m.rConn.Flush(); err != nil {
return fmt.Errorf("flush chain creation: %w", err)
}
return nil
}
func (m *Manager) refreshNoTrackChains() error {
chains, err := m.rConn.ListChainsOfTableFamily(nftables.TableFamilyIPv4)
if err != nil {
return fmt.Errorf("list chains: %w", err)
}
tableName := getTableName()
for _, c := range chains {
if c.Table.Name != tableName {
continue
}
switch c.Name {
case chainNameRawOutput:View on GitHub (pinned to 93e97f4bf1)