n0-computer / iroh

A toolkit for building distributed applications
https://iroh.computer
Apache License 2.0
2.16k stars 141 forks source link

'error flushing netlink socket (Permission Denied)' when trying to run iroh on android via termux #2324

Open expenses opened 1 month ago

expenses commented 1 month ago

I tried to run the latest (v0.16.2) aarch64-linux build of iroh on android via termux. As it's not a listed package, I had to manually download the binary (curl -fsSL https://sh.iroh.computer/install.sh | sh didn't work due to a different /bin location). I also tried running it in a proot via nix-on-droid. Both times when I run iroh start I get the following error:

2024-05-23T08:15:39.491516Z WARN magic_ep{me=amvpzvkd2md3pbvu}:magicsock{me=amvpzvkd2md3pbvu}:rtnetlink.conn: netlink_proto::connection: error flushing netlink socket: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }

I've attached the full log. Perhaps this is just a case of iroh trying to read/write to a directory in the linux filesystem hierarchy that's not accessible in termux? Even if running iroh on termux is impossible for whatever reason it'd be good to know why and have a less vague error message.

log.zip

expenses commented 1 month ago

Oh, it looks like you can't get the rooting table (using cli tools) any more: https://www.reddit.com/r/termux/comments/13sxh0l/why_ip_addr_or_other_ip_command_not_working_any/.

dignifiedquire commented 1 month ago

yes, newer android is very restrictive, which is why reading network interfaces is quite..complex

https://github.com/shellrow/netdev/pull/22

I suspect under termux the detection of it being a problematic android device fails (I don't know if this can be fixed) which is why you are seeing the issue.

expenses commented 1 month ago

Ah nice!

I suspect under termux the detection of it being a problematic android device fails (I don't know if this can be fixed) which is why you are seeing the issue.

Yes that's probably it. I'll try a binary actually compiled for android (as opposed to generic linux).