Hello Mark,I think I've found a bug with interface discovery/autoconnect on macOS in RNS 1.4.2. I'm running RNS 1.4.2 installed with pipx on a Mac mini. RNS is using Python 3.12.13. I have: autoconnect_discovered_interfaces = 4 I'm getting errors when RNS tries to connect to discovered BackboneInterfaces: An interface error occurred for BackboneInterface[...]: module 'select' has no attribute 'epoll' I checked the Python environment RNS is actually running under and get: epoll available: False kqueue available: True I understand BackboneInterface itself isn't supported on macOS, so that's expected. The odd bit is that autoconnect seems to be trying to create a BackboneClientInterface on macOS anyway. I had a look through Discovery.py and BackboneInterface.py. Discovery.py seems to know about this limitation when generating discovered interface configs. It checks for Darwin and falls back to TCPClientInterface. But the autoconnect path looks like it uses the advertised interface type directly. If the remote advertises BackboneInterface it creates a BackboneClientInterface. That then ends up in BackboneInterface.ensure_epoll(), which calls select.epoll(), and fails on macOS. So I think the issue is specifically with autoconnect of discovered BackboneInterfaces on Darwin, rather than BackboneInterface not supporting macOS generally. For now I've set: autoconnect_discovered_interfaces = 0 and I'm using TCPClientInterface manually for backbone endpoints. It looks like autoconnect probably needs to check the local platform before creating BackboneClientInterface, or use TCPClientInterface on Darwin in the same way the discovered config generation already does. Happy to post the full logs/config if they're useful. ozCleric
macOS autoconnect discovery tries to use BackboneInterface
Started by ozCleric 1747e565d5d11f4c... ·
Oh I really should have checked the formatting for that post, oops sorry…
It does exactly the same thing on Windows last I checked, if you enable interface discovery it spams logs and fails to actually make any interfaces
Correct. On Windows the autoconnect path bypasses the degradation logic: backbone_support = ( not RNS.vendor.platformutils.is_windows() and not RNS.vendor.platformutils.is_darwin() ) It then directly constructs BackboneClientInterface when the remote advertises itself as a BackboneInterface.
Perhaps nodes could just advertise themselves as TCPInterface so every other node knows it's compatible and can swap out TCPInterface and BackboneInterface
Can confirm 100% on OSX still happens on 1.5.4. The core issue is that "autoconnect_discovered_interfaces = 3" attempts to use BackboneInterfaces. Evidently the docs show that windows and osx should use TCP_CLIENT_INTERFACE instead, but that's userland stuff, and users that read docs at that :)
So in the real world, what actually happens is the only interface(s) that actually gets connected to is/are the initial TCP client interfaces selected on the onboarding of clients that support it (MCX), or picked manually on this site for more advanced users that read docs.
Therefore, IF the user has autodiscovery on, and no matter how many slots there are for autoconnection, the user will always be connected the bootstraps, which will never get cleared, because the users, being users, are more likely to be on OSX or windows than linux
By extension, imho this makes the network weaker than it should, because peering for whatever % of nodes is windows/osx is done based on a arbitrary community list and not autodiscovery.
I'd love to know if maybe this an unsolvable issue, I'm not qualified enough to comment on that, but I do believe it to be an issue.
Yes, this is definitely a bug. It should work automatically on both macOS and Windows, and automatically fall back to TCPInterface (until BackboneInterface variants for those systems are ready).
It's 100% solvable, but it's the code that needs fixing ;)
I'll have it fixed in the upcoming release.
Now fixed in 1.5.5! Auto-connect works on Windows and macOS now :)