Bug 375249 - "File not found" when trying to open file from nfs
Summary: "File not found" when trying to open file from nfs
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: NFS (show other bugs)
Version: 5.8.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Development Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-18 16:31 UTC by Luca Weiss
Modified: 2021-02-06 15:07 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
mount error (9.77 KB, image/png)
2017-01-18 16:31 UTC, Luca Weiss
Details
after f5 the folders get shown (3.19 KB, image/png)
2017-01-18 16:32 UTC, Luca Weiss
Details
when trying to open a file (26.33 KB, image/png)
2017-01-18 16:32 UTC, Luca Weiss
Details
Workaround patch, not a proposed patch! (497 bytes, patch)
2017-03-02 20:13 UTC, Luca Weiss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Weiss 2017-01-18 16:31:52 UTC
Created attachment 103494 [details]
mount error

When I enter nfs://192.178.0.50 in the path input field, I get pic1. Log:

Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: NFS: kdemain: starting
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: "local:/run/user/1000/klauncherTJ1288.1.slave-socket" "local:/run/user/1000/dolphinHf4254.5.slave-socket"
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs:
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: QUrl("nfs://192.168.0.50")
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: openConnection
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: Trying NFS version 4
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: NFSv4 is not supported at this time
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: Trying NFS version 3
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: NFS3::NFS3
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: "192.168.0.50"
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs:
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs:
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: 0
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: "192.168.0.50"
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs:
Jän 18 17:24:10 g550jk kdeinit5[4285]: kde.kio-nfs: NFS: kdemain: starting
Jän 18 17:24:10 g550jk kdeinit5[4285]: kde.kio-nfs: "local:/run/user/1000/klauncherTJ1288.1.slave-socket" "local:/run/user/1000/dolphinyJ4254.6.slave-socket"
Jän 18 17:24:10 g550jk kdeinit5[4285]: kde.kio-nfs:
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: openConnection succeeded
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: QUrl("nfs://192.168.0.50")
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: isExportedDir "" returning true
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: Listing virtual dir ""
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: Found  "mnt" in exported dir
Jän 18 17:24:10 g550jk kdeinit5[4284]: kf5.kio.core: UDSEntry for '.' not found, creating a default one. Please fix the "" KIO slave
Jän 18 17:24:10 g550jk kdeinit5[4284]: kf5.kio.core: finished() called after error()! Please fix the KIO slave.
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs:
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: QUrl("nfs://192.168.0.50")
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: isExportedDir "" returning true
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs:
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: QUrl("nfs://192.168.0.50")
Jän 18 17:24:10 g550jk kdeinit5[4284]: kde.kio-nfs: isExportedDir "" returning true


When I then press F5 to reload the directory, the content loads (pic2). Log:

Jän 18 17:26:09 g550jk kdeinit5[4284]: kde.kio-nfs: QUrl("nfs://192.168.0.50")
Jän 18 17:26:09 g550jk kdeinit5[4284]: kde.kio-nfs: QUrl("nfs://192.168.0.50")
Jän 18 17:26:09 g550jk kdeinit5[4284]: kde.kio-nfs: isExportedDir "" returning true
Jän 18 17:26:09 g550jk kdeinit5[4284]: kde.kio-nfs: Listing virtual dir ""
Jän 18 17:26:09 g550jk kdeinit5[4284]: kde.kio-nfs: Found  "mnt" in exported dir
Jän 18 17:26:09 g550jk kdeinit5[4284]: kf5.kio.core: UDSEntry for '.' not found, creating a default one. Please fix the "" KIO slave


But when I then open a file, I get pic3. Log:

Jän 18 17:26:57 g550jk dolphin[4254]: QLayout: Attempting to add QLayout "" to PhononWidget "", which already has a layout
Jän 18 17:26:57 g550jk kuiserver5[1771]: kuiserver: adding job contact for address:  ":1.22"  objectPath:  "/DataEngine/applicationjobs/JobView_39"
Jän 18 17:26:57 g550jk kdeinit5[4284]: kde.kio-nfs:
Jän 18 17:26:57 g550jk kdeinit5[4284]: kde.kio-nfs: QUrl("nfs://192.168.0.50/mnt/data/media/Music/Alan Walker - Faded.mp3")
Jän 18 17:26:57 g550jk kdeinit5[4284]: kde.kio-nfs: "/mnt/data/media/Music/Alan Walker - Faded.mp3"
Jän 18 17:26:57 g550jk kuiserver5[1771]: kuiserver: making async call of terminate for:  "/DataEngine/applicationjobs/JobView_39"
Jän 18 17:26:57 g550jk kuiserver5[1771]: kuiserver: removing jobview from list, it finished
Jän 18 17:26:57 g550jk kwin_x11[1329]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 12399, resource id: 83886080, major code: 18 (ChangeProperty), minor code: 0
Jän 18 17:26:57 g550jk kwin_x11[1329]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 12405, resource id: 83886081, major code: 18 (ChangeProperty), minor code: 0
Jän 18 17:26:57 g550jk kioexec[4421]: QCommandLineParser: option not defined: "suggestedfilename"
Jän 18 17:26:57 g550jk kioexec[4421]: command= "mpv --player-operation-mode=pseudo-gui -- %U" args= ("mpv --player-operation-mode=pseudo-gui -- %U", "nfs://192.168.0.50/mnt/data/media/Music/Alan Walker - Faded.mp3")
Jän 18 17:26:57 g550jk kuiserver5[1771]: kuiserver: adding job contact for address:  ":1.22"  objectPath:  "/DataEngine/applicationjobs/JobView_40"
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: NFS: kdemain: starting
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: "local:/run/user/1000/klauncherTJ1288.1.slave-socket" "local:/run/user/1000/kioexecTJ4421.1.slave-socket"
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs:
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs:
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: openConnection
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: Trying NFS version 4
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: NFSv4 is not supported at this time
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: Trying NFS version 3
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: NFS3::NFS3
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: "192.168.0.50"
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs:
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs:
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: 0
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: "192.168.0.50"
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs:
Jän 18 17:26:57 g550jk kuiserver5[1771]: kuiserver: making async call of terminate for:  "/DataEngine/applicationjobs/JobView_40"
Jän 18 17:26:57 g550jk kuiserver5[1771]: kuiserver: removing jobview from list, it finished
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: openConnection succeeded
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: QUrl("nfs://192.168.0.50/mnt/data/media/Music/Alan Walker - Faded.mp3")
Jän 18 17:26:57 g550jk kdeinit5[4424]: kde.kio-nfs: "/mnt/data/media/Music/Alan Walker - Faded.mp3"


$ showmount -e 192.168.0.50
Export list for 192.168.0.50:
/mnt/data/libvirt 192.168.0.21
/mnt/data/media   (everyone)

Mounting the nfs share manually (and opening files then) with "mount 192.168.0.50:/mnt/data/media /mnt/" works without problems.
Comment 1 Luca Weiss 2017-01-18 16:32:26 UTC
Created attachment 103496 [details]
after f5 the folders get shown
Comment 2 Luca Weiss 2017-01-18 16:32:44 UTC
Created attachment 103497 [details]
when trying to open a file
Comment 3 Luca Weiss 2017-03-02 20:12:42 UTC
So after quite a bit of debugging I have found out that apparently the problem is that my NFS server has a share that's not available for my IP address (only for another one) and fhStatus.fhs_status (in nfsv3.cpp->openConnection()) gets set to 13 and if checks if the status is zero and otherwise throws an error (not right away but later). I have managed to work around this problem by putting a 

else if(fhStatus.fhs_status == 13) {
    continue; // skip mounts with no permission
}

there and I can now browse my NFS share again.

luca@g550jk ~> showmount -e 192.168.0.50
Export list for 192.168.0.50:
/mnt/data/libvirt 192.168.0.21
/mnt/data/media   (everyone)

Sample patch that *works around the problem* is attached. Note, that I have little experience in NFS and have no idea what the "13" actually means.
Comment 4 Luca Weiss 2017-03-02 20:13:46 UTC
Created attachment 104327 [details]
Workaround patch, not a proposed patch!
Comment 5 Jonathan Marten 2021-02-06 15:07:40 UTC
The NFS ioslave has been updated to handle mount permissions problems and report the error correctly when a file needs to be accessed.  It will also ignore mounts which cannot be accessed and still allow access to those that can.  Please test with a current build if possible, and reopen if there is still a problem.