Bug 414373 - Dolphin can't access my phone's FTP server when discovered through Avahi
Summary: Dolphin can't access my phone's FTP server when discovered through Avahi
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.64.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-21 18:22 UTC by cantabile
Modified: 2020-09-13 18:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cantabile 2019-11-21 18:22:41 UTC
SUMMARY

Dolphin can't access the FTP server on my Android phone (primitive ftpd) if the server is discovered through Avahi.

It's not a network issue because it works fine if I type "ftp://192.168.2.3:12345" in Dolphin's location bar. It asks for a user name and password and then I'm able to browse the files on my phone's SD card.


STEPS TO REPRODUCE
0. Install "primitive ftpd" on a phone :)
1. open Dolphin,
2. click on "Network" on the left,
3. click "Network Services",
4. click "FTP servers",
5. click "primitive ftpd"

OBSERVED RESULT
An error message appears under the location bar: "Unknown host android.local: Host not found"

EXPECTED RESULT
It should probably pop up the FTP authentication dialog, like it does when I type the server's IP address directly.

SOFTWARE/OS VERSIONS
Linux: Arch Linux, just updated
KDE Plasma Version: 5.17.3-1
KDE Frameworks Version: 5.64.0-1
Qt Version: 5.13.2-3
avahi version: 0.7+18+g1b5f401-3

ADDITIONAL INFORMATION

This is the output from "avahi-browse --all --ignore-local --resolve --terminate":

+   wlo1 IPv4 primitive ftpd                                FTP File Transfer    local
=   wlo1 IPv4 primitive ftpd                                FTP File Transfer    local
   hostname = [Android.local]         
   address = [192.168.2.3]                                                       
   port = [12345]                                                                
   txt = []

I noticed that the error message says "android.local" but avahi-browse says "Android.local". Is that important?
Comment 1 cantabile 2020-09-13 18:10:43 UTC
Figured it out with help from #kde-devel. I have to install the nss-mdns package and edit /etc/nsswitch.conf to add "mdns" or "mdns_minimal" to the line that starts with "hosts:". Then it works fine.