Bug 415436 - map ECONNABORTED to pretty string
Summary: map ECONNABORTED to pretty string
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Samba (show other bugs)
Version: unspecified
Platform: Manjaro Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 420527 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-21 20:04 UTC by Michel Zedler
Modified: 2020-04-27 09:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.12.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Zedler 2019-12-21 20:04:42 UTC
SUMMARY

Dolphin does not detect min/max SMB protocol mismatch


STEPS TO REPRODUCE

on samba server (host "janeiro" in the following), set:
    maximum SMB protocol: SMB1
    minimum SMB protocol: SMB1

on client, in /etc/samba/smb.conf, set:
    client min protocol = SMB2

on client, open dolphin and access smb://janeiro/


OBSERVED RESULT

dolphin error message:
    Internal Error
    Please send a full bug report at https://bugs.kde.org
    Unknown error condition in stat: Software caused connection abort


EXPECTED RESULT

dolphin error message:
    Protocol negotiation failed


SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
Kernel Version: 5.4.2-1-MANJARO
OS Type: 64-bit

Packages:
    samba-4.10.10-2 is up to date
    kdenetwork-filesharing-19.08.3-1 is up to date
    manjaro-settings-samba-20191208-1 is up to date
    gvfs-smb-1.42.2-1 is up to date
    libsmbios-2.4.2-2 is up to date
    smbclient-4.10.10-2 is up to date
    kio-5.64.0-1 is up to date


ADDITIONAL INFORMATION

in the error event, journalctl logs:
    kio_smb: open  "smb://janeiro/"   2   -1
    kio_smb: errNum 103
Comment 1 Harald Sitter 2020-02-05 11:50:25 UTC
That expected result cannot be implemented. You'll need to file a bug with samba. libsmbclient provides no information about protocol negotiation errors so there is nothing KIO can report by extension. (in fact, given the configuration you outline I am not sure how you expect this to work at all. the server is speaking exclusively NT1 the client is not allowed to speak NT1, so how would the client even know the server speaks NT1 when it is not allowed to talk NT1 to anyone). 

Specifically, the error you got in the logs is about the connection having been aborted. So the best error we can produce here is "Connection aborted".
Comment 2 Harald Sitter 2020-02-14 16:03:11 UTC
Git commit 2075e76389ccd914fdbf86ebe83c4ba01367e915 by Harald Sitter.
Committed on 14/02/2020 at 14:57.
Pushed by sitter into branch 'master'.

smb: map ECONNABORTED to ERR_CONNECTION_BROKEN

Summary:
seems the most reasonable candidate given the pretty strings in
KIO::buildErrorString and the detailed causes in the detail function.

this does not really improve the error message, but should dolphin
ever learn to pick up details from detailedErrorStrings it would make
diagnosing easier.

ECONNABORTED can mean any number of things, so I guess a signle line
error will always be incredibly vague.
FIXED-IN: 19.12.3

Test Plan: hoping for the best!

Reviewers: ngraham

Reviewed By: ngraham

Subscribers: kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Differential Revision: https://phabricator.kde.org/D27377

M  +2    -0    smb/kio_smb_browse.cpp

https://commits.kde.org/kio-extras/2075e76389ccd914fdbf86ebe83c4ba01367e915
Comment 3 Harald Sitter 2020-04-27 09:40:57 UTC
*** Bug 420527 has been marked as a duplicate of this bug. ***