avahi-browse -av is empty, mdns not working in arduino ide

Bug #1874021 reported by Jeroenst
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Expired
Low
Unassigned

Bug Description

When I started the arduino IDE my port list is empty. This list relies on multicast DNS which is served by avahi.

When running the avahi-browse -av command on ubuntu 18.04 I get a list of al mdns devices. On ubuntu 20.04 the're no mdns devices reported.

The avahi-daemon is running. And when executing netstat -nlp | grep 5353 I see avahi-daemon is listening. When also running tcpdump port 5353 I see mdns packages arriving. But still avahi-browse -av is empty.

iptables -A shows no rules and policies are accept
ufw is disabled

I also removed apparmor but also that didn't make any difference.

On both ubuntu 18.04 and 20.04 the avahi version is 0.7.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-04-08 (13 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200402)
Package: avahi-daemon 0.7-4ubuntu7
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.4.0-25.29-generic 5.4.30
Tags: focal
Uname: Linux 5.4.0-25-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dialout dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True

Jeroenst (h-maik-m)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:

  apport-collect 1874021

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in avahi (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you also add the 'journalctl -b 0' log from a session having the issue

Revision history for this message
Jeroenst (h-maik-m) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Jeroenst (h-maik-m) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Jeroenst (h-maik-m) wrote : ProcEnviron.txt

apport information

Revision history for this message
Jeroenst (h-maik-m) wrote : modified.conffile..etc.avahi.avahi-daemon.conf.txt

apport information

Revision history for this message
Jeroenst (h-maik-m) wrote : Dependencies.txt

apport information

description: updated
Revision history for this message
Jeroenst (h-maik-m) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Jeroenst (h-maik-m) wrote : ProcEnviron.txt

apport information

description: updated
Revision history for this message
Jeroenst (h-maik-m) wrote :

journalctl

Revision history for this message
Trent Lloyd (lathiat) wrote :

Looking at jctl.txt things look normal, the server starts up, gets server startup complete and then adds the appropriate IP for wlan0. Config file looks normal.

Can you please try the following to collect extra debug info

(1) Start a tcpdump and leaving it running - tcpdump --no-promiscuous-mode -w lp1874021.pcap -i wlp1s0 port 5353 and udp
(2) Restart avahi; sudo systemctl restart avahi-daemon
(3) Wait 10 seconds, then try run "avahi-browse -av | tee -a lp1874021-browse.txt"
(4) Wait another 10 seconds
(5) Run: sudo killall -USR1 avahi-daemon # this dumps the avahi cache into the journal
(6) Quit avahi-browse
(7) Quit tcpdump
(8) Please then upload the lp1874021-browse.txt (copied output from avahi-browse), lp1874021.pcap (raw packet capture of mdns packets) and a copy of the output of "journalctl -u avahi-daemon"

As an extra test, after having done the above, you can try put the interface in promiscous mode and see if that fixes the problem. This can make Avahi work on bad network (usually wifi) drivers that do not correctly implement multicast.

(9) sudo tcpdump -w lp1874021-promisc.pcap -i wlp1s0 port 5353 and udp
(10) sudo systemctl restart avahi-daemon
(11) avahi-browse -av
(12) If the service still hasn't shown up, consider also then restarting whatever device is advertising the service you want to connect to. And note if it then appears after doing that.
(13) If you have the option, try to then plug in either or both devices via ethernet instead of WiFi.

If the services do start appearing at some point be sure to note which step you were at when that happened.

Please note that all of these files will contain information about mDNS services on your local network, typically this information is relatively OK to be public since it would be broadcast if you were on a public WiFi network - it can include names, mac addresses, etc. If that is a concern to you in terms of privacy then feel free to consider either attempting to sanitize the data (though that is difficult for the pcap file) or setting the bug to private although we much prefer not to set bugs to private if possible.

Revision history for this message
Jeroenst (h-maik-m) wrote :
Revision history for this message
Jeroenst (h-maik-m) wrote :
Revision history for this message
Jeroenst (h-maik-m) wrote :

lp1874021-browse.txt is empty

Revision history for this message
Jeroenst (h-maik-m) wrote :

Ok, promicious mode doesn't change anything, but using the wired connection makes avahi-browse -av show all multicast devices.

Revision history for this message
Jeroenst (h-maik-m) wrote :
Revision history for this message
Trent Lloyd (lathiat) wrote :

OK thanks for the updates. So I can see a lot of mDNS packets in the lp1874021.pcap capture from various sources. I can see some printers, google cast, sonoff, etc. Curiously though when you do the avahi cache dump it isn't seeing any of these.

Wireshark is showing malformed packets for many of the responses strangely, the IP and UDP headers indicate a different length to that of the actual dta. Not sure if this is an issue with wireshark, the wireless driver or whatever mDNS implementations are replying. May need further looking at.

But it's curious though that avahi is showing absoultely no cached services, and that it works on ethernet, given that the lp1874021.pcap seems to show plenty of actual mDNS packets coming and going.

Could you try start Avahi (on wireless) using --debug

(1) override the systemd config with this command:
systemctl edit avahi-daemon.service

Once the editor opens, add the following 3 lines then save and squit:

[Service]
ExecStart=
ExecStart=/usr/sbin/avahi-daemon -s --debug

Then restart avahi-daemon: sudo systemctl restart avahi-daemon.service

Lastly run "avahi-browse -av", wait a minute or two, then upload a copy of the "journalctl -u avahi-daemon" again?

Revision history for this message
Jeroenst (h-maik-m) wrote :

Here is the avahi log you requested.

I also want to make my complements to the excellent support you're supplying to me.

Revision history for this message
Jeroenst (h-maik-m) wrote :

Did you find any information in the journalctl which points to this problem?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for avahi (Ubuntu) because there has been no activity for 60 days.]

Changed in avahi (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.