NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Getting "write: address family not supported by protocol family" when using Restic over Tailscale



On Sun, Oct 18, 2026 at 05:23:22PM +0300, Chavdar Ivanov wrote:
> ----
> 
> On Sun, Oct 18, 2026 at 5:15 PM Greg Troxel <gdt%lexort.com@localhost> wrote:
> 
> > Andreas Kähäri <andreas.kahari%abc.se@localhost> writes:
> >
> > > I'm using a KVM virtual machine running NetBSD 11.0 (on amd64).  On it,
> > > I'm attempting to use Restic to perform backups and related operations
> > > over Tailscale.  When I do, I consistently get errors saying "write:
> > > address family not supported by protocol family".  This seems to happen
> > > regardless of whether the machine has IPv6 networking or not (just
> > > mentioning that since that's not the default network setup for qemu).
> >
> > You have not explained the networking plan for your KVM vm.  Is the
> > NetBSD (virtual) machine's interface bridged, or is it some kind of
> > NAT/routing?
> >
> > I am unfamiliar with tailscale details; I'd expect that to configure wg0
> > but maybe it is doing user-space wireguard.
> 
> 
> 
> $ ifconfig tun0 │
> ││tun0: flags=0x51<UP,POINTOPOINT,RUNNING> mtu 1280 │
> 7.0.t││ status: active │
> ││ inet6 fd7a:115c:a1e0::1901:cd50/48 -> flags 0 │
> ││ inet 100.73.205.61/32 -> flags 0
> 
> so, no wg0, wireguard is completely hidden from the user

Exactly:

tun0: flags=0x51<UP,POINTOPOINT,RUNNING> mtu 1280
        status: active
        inet6 fd7a:115c:a1e0::b831:4b3d/48 ->  flags 0
        inet 100.119.75.59/32 ->  flags 0

And no wg0.

The KVM network is a bog standard IPv4-only thing that I haven't
changed, and which other non-NetBSD guests are using without issue.

> > I would suggest running "ifconfig", understanding the results especially
> > the address, ping and traceroute to your NAS.

The _point_ of the Tailscale networking is to reach the NAS behind
my home firewall (and CG-NAT).  There is a direct route through the
Tailscale network, without going through any DERP server.

eeyore% tailscale ping disco                                     
pong from disco (100.102.136.126) via XXX.255.241.178:14032 in 5ms  

Here, eeyore is the NetBSD system, and disco is the NAS,
"XXX.255.241.178" is the visible IP of my home router, but since I'm
behind a CG-NAT, I see a 100-something address on my router's actual WAN
interface.

I found a similar report from April in the pkgsrc-users list:
https://mail-index.netbsd.org/pkgsrc-users/2026/04/28/msg042883.html

There, it was rsync, not restic, that triggered the error.


> >
> > Then, understand how restic uses the network (I don't know that either)
> > and generated that kind of traffic from client to NAS with test tools
> > (less complicated) and see how that goes, watching it with tcpdump.
> >
> >
> > You can also find the interface used and tcpdump on that. I suggest
> > "-wFILE" and leave it running, and then analyze later.  That way you can
> > capture once and try different filters.

I can actually see some 500 (Internal Server Error) responses, and
looking at the NAS logs, these corresponds to errors saying "Post
request put error: unexpected EOF" (and the same, but with "rcat error"
in place of "put error").

It's "rclone serve restic" listening on the NAS.

> >
> >
> >   "write: address family not supported by protocol family"
> >
> > I have a very dim memory of this happening either when writing via bpf
> > or various tunnels, when they are configured for one address family and
> > the packet written isn't right (or is interpreted as not right).

Is it maybe chopping parts of the messages off?  Unfortunately, I don't
really know the lower networking layers.

Andreas


Home | Main Index | Thread Index | Old Index