You are not logged in.
Trying to get my system not to throw random errors all the time and getting Android Studio(AUR/android-studio) device connect to work, following https://wiki.archlinux.org/title/Avahi#Installation
I have put "hosts: mymachines mdns [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns" in /etc/nsswitch.conf.
Seems like KDEConnect is running its own mDNS server - https://bugs.kde.org/show_bug.cgi?id=487719 - I kill the kdeconnectd process for good measure when testing.
Seems like avahi-daemon is runnning its own mDNS server (which is intentional).
Seems like systemd-resolved responds to some queries even with its mDNS resolver disabled, according to the wiki, but the same output from `resolvectl` on Ubuntu 24.04 (Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported) has it working.
Even if I kill Connect, Avahi(systemctl disable --now avahi-daemon.service avahi-daemon.socket) and restart systemd-resolved, I always get this state:
# Android Studio runs this check, adb is from android-tools
$ adb mdns check
error: unknown host service 'mdns:check'
$ host -vt SOA local
Trying "local"
Host local not found: 5(REFUSED)
/etc/resolv.conf:
nameserver 127.0.0.53
options edns0 trust-ad
search .
/etc/hosts:
127.0.0.1 localhost
127.0.1.1 Luxuria
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
/etc/systemd/resolved.conf.d/c0rn3j.conf:
[Resolve]
MulticastDNS=no
LLMNR=no
Arch:
# resolvectl
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Fallback DNS Servers: 1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net 8.8.8.8#dns.google 2606:4700:4700::1111#cloudflare-dns.com 2620:fe::9#dns.quad9.net 2001:4860:4860::8888#dns.google
Link 2 (enp14s0)
Current Scopes: none
Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 3 (wlan0)
Current Scopes: none
Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 4 (sysdbr0)
Current Scopes: DNS
Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.1.2
DNS Servers: 192.168.1.2 fdb7:667c:d51e::1
Ubuntu (no extra config, 24.04 LXD container):
# resolvectl
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 118 (eth0)
Current Scopes: DNS
Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
…
Last edited by C0rn3j (2024-06-11 10:57:05)
Offline
adb can come from the repo android-tools package or from an sdk platform package .
Which one are you using ?
Also aur has several android studio packages, which of them are you using ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
AUR/android-studio and android-tools
Last edited by C0rn3j (2024-06-10 12:55:31)
Offline
Please use [code][/code] tags, mardown is too hip for the BBS
Edit your post in this regard.
host -vt SOA local
to see where that's coming from (and therefore maybe why it's not NXDOMAIN) - is that w/ tne mdns nsswitch entry but w/o avahi running, though?
Did you disable the resolved mdns responder as is pointed out in https://wiki.archlinux.org/title/Avahi#Installation ?
Did you add the domains to /etc/mdns.allow ?
For clarification: you want to use avahi? Or you're just trying to use avahi to avoid android-studio related errors?
The ubuntu system only uses the systemd-resolved mdns responder?
Offline
I have edited the requested information into the OP.
> Did you disable the resolved mdns responder as is pointed out in https://wiki.archlinux.org/title/Avahi#Installation ?
Should be disable by default, I use systemd-networkd+resolved.
> Did you add the domains to /etc/mdns.allow ?
Hmm no, for now I want to test with the default .local, only using a custom domain I own after I get that working.
> For clarification: you want to use avahi? Or you're just trying to use avahi to avoid android-studio related errors?
I supposedly need Avahi for svp(?), I also want to be able to do things like `ssh computerName` to SSH to machines on my LAN, and I want Android Studio to stop crashing (seemingly repeatedly on that adb command?) and KDEConnect to stop spamming mDNS errors.
> is that w/ tne mdns nsswitch entry but w/o avahi running, though?
With the entry, with or without avahi running(same output), stopped by `sudo systemctl stop avahi-daemon avahi-daemon.socket`
> The ubuntu system only uses the systemd-resolved mdns responder?
Whatever default 22.04/24.04 LXD container uses, should only use resolved as it is headless.
Last edited by C0rn3j (2024-06-10 19:58:28)
Offline
Should be disable by default, I use systemd-networkd+resolved.
No.
Note: systemd-resolved has a built-in mDNS service, make sure to disable systemd-resolved's multicast DNS resolver/responder (refer to resolved.conf(5)) or disable systemd-resolved.service entirely before using Avahi.
Set MulticastDNS=no there and restart resolved, yor goal is to to have "host" receive an NXDOMAIN
Offline
Ah right, I had already done that, added to OP.
Offline
I'd suggest to clean up the system and return to baseline.
W/ avahi removed and the nsswitch.conf returned to default, what does "host -vt SOA local" respond?
What's the response if you then stop resolved?
Offline