You are not logged in.
I had a working network printer, but now the "avahi-browse" is not returning any devices on my ".local".
I did find that there was an issue with "firewalld" but I have since disabled it. I do have a vpn (nordvpn) installed, but stopping it doesn't help.
(base) mark@confucius:etc$ sudo pacman -Q avahi
avahi 0.8+22+gfd482a7-1
(base) mark@confucius:etc$ sudo pacman -Q nss-mdns
nss-mdns 0.15.1-1
(base) mark@confucius:etc$
My /etc/nsswitch.conf hosts line:
hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
My avahi-daemon status:
(base) mark@confucius:etc$ systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2021-11-03 14:39:18 PDT; 2h 6min ago
TriggeredBy: ● avahi-daemon.socket
Main PID: 232185 (avahi-daemon)
Status: "avahi-daemon 0.8 starting up."
Tasks: 2 (limit: 38369)
Memory: 1.2M
CPU: 45ms
CGroup: /system.slice/avahi-daemon.service
├─232185 "avahi-daemon: running [confucius.local]"
└─232186 "avahi-daemon: chroot helper"
Nov 03 14:39:18 confucius avahi-daemon[232185]: No service file found in /etc/avahi/services.
Nov 03 14:39:18 confucius avahi-daemon[232185]: *** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDN>
Nov 03 14:39:18 confucius avahi-daemon[232185]: Joining mDNS multicast group on interface enp4s0.IPv4 with address 192.168.86.43.
Nov 03 14:39:18 confucius avahi-daemon[232185]: New relevant interface enp4s0.IPv4 for mDNS.
Nov 03 14:39:18 confucius avahi-daemon[232185]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
Nov 03 14:39:18 confucius avahi-daemon[232185]: New relevant interface lo.IPv4 for mDNS.
Nov 03 14:39:18 confucius avahi-daemon[232185]: Network interface enumeration completed.
Nov 03 14:39:18 confucius avahi-daemon[232185]: Registering new address record for 192.168.86.43 on enp4s0.IPv4.
Nov 03 14:39:18 confucius avahi-daemon[232185]: Registering new address record for 127.0.0.1 on lo.IPv4.
Nov 03 14:39:19 confucius avahi-daemon[232185]: Server startup complete. Host name is confucius.local. Local service cookie is 171>
When I run
avahi-browse --all --ignore-local --resolve --terminate
and in another terminal I am already running
sudo tcpdump port 5353
I see:
(base) mark@confucius:etc$ sudo tcpdump port 5353
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on enp4s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
16:56:16.515323 IP confucius.mdns > 224.0.0.251.mdns: 0 [3q] PTR (QM)? _services._dns-sd._udp.local. PTR (QM)? _mpd._tcp.local. PTR (QM)? _device-info._tcp.local. (81)
16:56:16.526887 IP 192.168.86.90.mdns > 224.0.0.251.mdns: 0*- [0q] 2/0/7 PTR _spotify-connect._tcp.local., PTR _sonos._tcp.local. (708)
16:56:16.531160 IP 192.168.86.31.mdns > 224.0.0.251.mdns: 0*- [0q] 2/0/7 PTR _spotify-connect._tcp.local., PTR _sonos._tcp.local. (708)
16:56:16.567816 IP HomeShare.mdns > 224.0.0.251.mdns: 0*- [0q] 2/0/0 PTR _rsp._tcp.local., PTR _daap._tcp.local. (84)
16:56:16.598044 IP HomeShare.mdns > 224.0.0.251.mdns: 0*- [0q] 5/0/0 PTR _workstation._tcp.local., PTR _afpovertcp._tcp.local., PTR _adisk._tcp.local., PTR _http._tcp.local., PTR _wd-2go._tcp.local. (161)
16:56:16.598602 IP 192.168.86.45.mdns > 224.0.0.251.mdns: 0*- [0q] 1/0/0 PTR _sonos._tcp.local. (66)
16:56:16.629482 IP 192.168.86.42.mdns > 224.0.0.251.mdns: 0*- [0q] 2/0/0 PTR _airplay._tcp.local., PTR _spotify-connect._tcp.local. (99)
16:56:16.644650 IP brother_printer.mdns > 224.0.0.251.mdns: 0*- [0q] 7/0/0 PTR _pdl-datastream._tcp.local., PTR _printer._tcp.local., PTR _ipp._tcp.local., PTR _scanner._tcp.local., PTR _http._tcp.local., PTR _privet._tcp.local., PTR _uscan._tcp.local. (203)
16:56:16.644817 IP6 fe80::dee9:94ff:fe36:92e0.mdns > ff02::fb.mdns: 0*- [0q] 7/0/0 PTR _pdl-datastream._tcp.local., PTR _printer._tcp.local., PTR _ipp._tcp.local., PTR _scanner._tcp.local., PTR _http._tcp.local., PTR _privet._tcp.local., PTR _uscan._tcp.local. (203)
16:56:16.646318 IP 192.168.86.32.mdns > 224.0.0.251.mdns: 0*- [0q] 3/0/0 PTR _ssh._tcp.local., PTR _workstation._tcp.local., PTR _sftp-ssh._tcp.local. (115)
My /etc/hosts has "brother_printer" line:
192.168.86.50 brother_printer
Therefore I know that the printer at 192.168.86.50 is sending a reply to the "avahi-browse", but still, nothing is reported from the "avahi-browse" line above. Totally empty result.
This was working in early October. recently I updated my packages with no incident, and it hasn't worked since then.
running
sudo nmap -sU
on my ip address:
Nmap scan report for ?.?.?.?
Host is up (0.0000090s latency).
Not shown: 996 closed udp ports (port-unreach)
PORT STATE SERVICE
68/udp open|filtered dhcpc
137/udp open netbios-ns
138/udp open|filtered netbios-dgm
5353/udp open zeroconf
Nmap done: 1 IP address (1 host up) scanned in 1.31 seconds
How to debug further?
Last edited by mwigzell (2021-11-04 18:21:15)
Offline
First thing I would take care of
*** WARNING: Detected another IPv4 mDNS stack running on this host
Is systemd-resolved configured for mDNS?
Offline
I don't think so:
systemctl status systemd-resolved
○ systemd-resolved.service - Network Name Resolution
Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-resolved.service(8)
man:org.freedesktop.resolve1(5)
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
How can I find that other mdns stack?
oK, its my browser Vivaldi:
lsof -i -P -n
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mpd 1152 mark 11u IPv6 19829 0t0 TCP *:6600 (LISTEN)
mpd 1152 mark 18u IPv6 36148 0t0 TCP 127.0.0.1:6600->127.0.0.1:41400 (ESTABLISHED)
mpd 1152 mark 19u IPv6 36147 0t0 TCP 127.0.0.1:6600->127.0.0.1:41398 (ESTABLISHED)
vivaldi-b 1319 mark 188u IPv4 1150887 0t0 UDP 224.0.0.251:5353
vivaldi-b 1319 mark 235u IPv4 1150888 0t0 UDP 224.0.0.251:5353
cantata 1320 mark 23u IPv4 33720 0t0 TCP 127.0.0.1:41398->127.0.0.1:6600 (ESTABLISHED)
cantata 1320 mark 31u IPv4 33724 0t0 TCP 127.0.0.1:41400->127.0.0.1:6600 (ESTABLISHED)
panel-27- 1376 mark 10u IPv4 1038687 0t0 TCP 127.0.0.1:41446->127.0.0.1:6600 (CLOSE_WAIT)
vivaldi-b 1549 mark 24u IPv4 1522078 0t0 TCP 10.8.3.8:55722->151.101.41.140:443 (ESTABLISHED)
vivaldi-b 1549 mark 28u IPv4 1522079 0t0 TCP 10.8.3.8:41518->192.0.0.69:443 (ESTABLISHED)
vivaldi-b 1549 mark 37u IPv4 1505163 0t0 UDP 10.8.3.8:57419->142.250.217.106:443
vivaldi-b 1549 mark 43u IPv4 1522080 0t0 TCP 10.8.3.8:41520->192.0.0.69:443 (ESTABLISHED)
vivaldi-b 1549 mark 44u IPv4 1511298 0t0 UDP 10.8.3.8:34636->142.250.217.74:443
vivaldi-b 1549 mark 47u IPv4 1522076 0t0 TCP 10.8.3.8:48550->116.203.93.142:443 (ESTABLISHED)
vivaldi-b 1549 mark 48u IPv4 1525338 0t0 TCP 10.8.3.8:56780->104.198.23.205:443 (ESTABLISHED)
vivaldi-b 1549 mark 57u IPv4 1506203 0t0 UDP 10.8.3.8:48283->74.125.195.189:443
vivaldi-b 1549 mark 60u IPv4 1511279 0t0 TCP 10.8.3.8:36812->54.172.122.55:443 (ESTABLISHED)
vivaldi-b 1549 mark 63u IPv4 348774 0t0 UDP 224.0.0.251:5353
vivaldi-b 1549 mark 69u IPv4 348775 0t0 UDP 224.0.0.251:5353
gvfsd-smb 139214 mark 10u IPv4 1137594 0t0 TCP 127.0.0.1:57626->127.0.0.1:139 (ESTABLISHED)
ok, I turned off the Google DNS checkbox in Vivaldi/Settings/Privacy, (so no DNS leak) and I edited /etc/avahi/avahi-daemon.conf:
disallow-other-stacks=yes
After restarting linux, that warning is gone:
(base) mark@confucius:avahi$ systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2021-11-03 21:43:38 PDT; 7min ago
TriggeredBy: ● avahi-daemon.socket
Main PID: 547 (avahi-daemon)
Status: "avahi-daemon 0.8 starting up."
Tasks: 2 (limit: 38369)
Memory: 1.8M
CPU: 21ms
CGroup: /system.slice/avahi-daemon.service
├─547 "avahi-daemon: running [confucius.local]"
└─562 "avahi-daemon: chroot helper"
Nov 03 21:43:38 confucius avahi-daemon[547]: Registering new address record for ::1 on lo.*.
Nov 03 21:43:38 confucius avahi-daemon[547]: Registering new address record for 127.0.0.1 on lo.IPv4.
Nov 03 21:43:38 confucius systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Nov 03 21:43:39 confucius avahi-daemon[547]: Server startup complete. Host name is confucius.local. Local service cookie is 299382>
Nov 03 21:43:41 confucius avahi-daemon[547]: Registering new address record for fe80::a10d:70e5:6b18:9a6a on enp4s0.*.
Nov 03 21:43:45 confucius avahi-daemon[547]: Joining mDNS multicast group on interface enp4s0.IPv4 with address 192.168.86.43.
Nov 03 21:43:45 confucius avahi-daemon[547]: New relevant interface enp4s0.IPv4 for mDNS.
Nov 03 21:43:45 confucius avahi-daemon[547]: Registering new address record for 192.168.86.43 on enp4s0.IPv4.
Nov 03 21:43:48 confucius avahi-daemon[547]: Withdrawing address record for ::1 on lo.
Nov 03 21:43:48 confucius avahi-daemon[547]: Withdrawing address record for fe80::a10d:70e5:6b18:9a6a on enp4s0.
However, no joy with avahi:
(base) mark@confucius:avahi$ avahi-browse --all --ignore-local --resolve --terminate
(base) mark@confucius:avahi$
Last edited by mwigzell (2021-11-04 04:55:05)
Offline
Do you disable the avahi cache? ("cache-entries-max=0", don't.)
Try to run "avahi-browse --all" (no resolution, no filtering and keep listening) - does that resolve /anything/?
You could try to use mdns4_minimal and also remove/comment the brother_printer from /etc/hosts
reg. the original problem: since you know the printer IP and it announces IPP, you could just add it in cups - mdns or not doesn't matter. In doubt nmap it to check that the port is open.
Offline
I do not disable the cache.
#cache-entries-max=4096
running "avahi-browse --all" doesn't resolve anythying:
(base) mark@confucius:avahi$ avahi-browse --all
+ lo IPv4 Music Player @ confucius[1183] Music Player Daemon local
+ lo IPv4 CONFUCIUS Device Info local
+ lo IPv4 CONFUCIUS Microsoft Windows Network local
Yes, I tried mdns4_minimal, also I added the "brother_printer" AFTER the problem showed up, to make reading my printer easier in the tcpdumps. And yes, I have my printer working because I hard coded the IP in the cups printer. So I can print no problem. It is this lingering problem of not having the ".local" services even though, they were initially working last month. See my "nmap" dump above, the 5353 port is open.
I can't think of any other way to see into the avahi-browse, other than building it locally and running it in the debugger ....
The setup went from working to not working, and in the interim I did update packages cleanly. I was thinking, maybe "nordvpnd" re-writes the routing table or runs its own firewall or something. It does re-write the "/etc/resolv.conf" with its own DNS servers. The port is open, and when nordvpn is up, it has a small firewall. But when I stop nordvpn the firewall goes away. Originally avahi-browse was working with nordvpn up or down, and that has no impact on it now either.
Another thing worth mentioning: I have two Macs on my LAN, and they are able to discover the printer no problem. So its local to my ARCH box.
Last edited by mwigzell (2021-11-04 16:44:59)
Offline
Update: I must have fixed issue when I removed the Vivaldi IPv4 mDNS stack above. Because I had re-enabled firewalld (but had it stopped), when I restarted ARCH the firewall came up again. I noticed this just now, stopped the firewall and now avahi is working again!. User error. Thanks for your help.
(base) mark@confucius:system$ avahi-browse -a
+ enp4s0 IPv4 Brother MFC-L2710DW series _uscan._tcp local
+ enp4s0 IPv4 Brother MFC-L2710DW series _privet._tcp local
+ enp4s0 IPv4 Brother MFC-L2710DW series _scanner._tcp local
+ enp4s0 IPv4 Brother MFC-L2710DW series Internet Printer local
+ enp4s0 IPv4 Brother MFC-L2710DW series UNIX Printer local
+ enp4s0 IPv4 Brother MFC-L2710DW series PDL Printer local
+ enp4s0 IPv4 dp-520202N9 SFTP File Transfer local
+ enp4s0 IPv4 dp-520202N9 SSH Remote Terminal local
+ enp4s0 IPv4 WDMyCloudEX2 _wd-2go._tcp local
+ enp4s0 IPv4 Brother MFC-L2710DW series Web Site local
+ enp4s0 IPv4 WDMyCloudEX2 Web Site local
+ enp4s0 IPv4 WDMyCloudEX2_AFP_TimeMachineBackup Apple TimeMachine local
+ enp4s0 IPv4 WDMyCloudEX2 Apple File Sharing local
+ enp4s0 IPv4 WDMyCloudEX2_AFP_TimeMachineBackup Apple File Sharing local
+ enp4s0 IPv4 dp-520202N9 [00:00:00:00:00:00] Workstation local
+ enp4s0 IPv4 WDMyCloudEX2-3 [00:90:a9:e3:13:3b] Workstation local
+ enp4s0 IPv4 WDMyCloudEX2 iTunes Audio Access local
+ enp4s0 IPv4 WDMyCloudEX2 _rsp._tcp local
+ enp4s0 IPv4 Roku Ultra AirPlay Remote Video local
+ enp4s0 IPv4 CONFUCIUS Microsoft Windows Network local
+ lo IPv4 CONFUCIUS Microsoft Windows Network local
+ enp4s0 IPv4 CONFUCIUS Device Info local
+ lo IPv4 CONFUCIUS Device Info local
+ enp4s0 IPv4 Music Player @ confucius[1183] Music Player Daemon local
+ lo IPv4 Music Player @ confucius[1183] Music Player Daemon local
+ enp4s0 IPv4 Sonos-000E58B283E4 _sonos._tcp local
+ enp4s0 IPv4 Sonos-000E589977A0 _sonos._tcp local
+ enp4s0 IPv4 Sonos-000E58F016D8 _sonos._tcp local
+ enp4s0 IPv4 Sonos-000E58F0B350 _sonos._tcp local
+ enp4s0 IPv4 4de5187a-1def-5cde-9fd0-6b6558b8b95b _spotify-connect._tcp local
+ enp4s0 IPv4 sonos000E583DF6CE _spotify-connect._tcp local
+ enp4s0 IPv4 Sonos-000E583DF6CE _sonos._tcp local
+ enp4s0 IPv4 sonos000E58B283E4 _spotify-connect._tcp local
+ enp4s0 IPv4 sonos000E582DF2E4 _spotify-connect._tcp local
+ enp4s0 IPv4 Sonos-000E582DF2E4 _sonos._tcp local
Offline