Bug 391150 - Network (domain) scan
Summary: Network (domain) scan
Status: RESOLVED FIXED
Alias: None
Product: Smb4k
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Reinholdt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-27 08:30 UTC by t.gruner
Modified: 2018-04-01 12:34 UTC (History)
0 users

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 t.gruner 2018-02-27 08:30:52 UTC
I get the following message when I try to scan networks (domains) with the button and during start of smb4k.
nmblookup seems to fail.

Das Abfragen der Liste verfügbarer Domänen ist fehlgeschlagen:Usage: [-?fMRSTrAV] [-?|--help] [--usage] [-B|--broadcast=BROADCAST-ADDRESS]
[-f|--flags] [-U|--unicast=STRING] [-M|--master-browser]
[-R|--recursion] [-S|--status] [-T|--translate] [-r|--root-port]
[-A|--lookup-by-ip] [-d|--debuglevel=DEBUGLEVEL]
[-s|--configfile=CONFIGFILE] [-l|--log-basename=LOGFILEBASE]
[-V|--version] [--option=name=value]
[-O|--socket-options=SOCKETOPTIONS] [-n|--netbiosname=NETBIOSNAME]
[-W|--workgroup=WORKGROUP] [-i|--scope=SCOPE] ...
Comment 1 Alexander Reinholdt 2018-03-05 14:55:59 UTC
Thank you for reporting this issue.

Can you please run the following command in a terminal and past the output here (remove all IP addresses, etc., if you wish):

$ nmblookup -M -- - 

I think the error message is caused by an empty list of master browsers that is then piped to another nmblookup command, but I need confirmation.
Comment 2 t.gruner 2018-03-05 15:27:38 UTC
$ nmblookup -M -- - 
name_query failed to find name __MSBROWSE__#01

$ nmblookup -V
Version 4.6.9-git.59.c2cff9cea4c9.1-SUSE-SLE_12-x86_64


My server without KDE responds this
192.168.2.1 __MSBROWSE__<01>
Comment 3 Alexander Reinholdt 2018-03-07 19:42:48 UTC
Git commit 7b182ca1654fd177438306d1ca1f1011bbefdd9c by Alexander Reinholdt.
Committed on 07/03/2018 at 19:42.
Pushed by areinholdt into branch 'master'.

Do not pass empty strings to the second process when looking up domains.

M  +39   -3    core/smb4kscanner_p.cpp

https://commits.kde.org/smb4k/7b182ca1654fd177438306d1ca1f1011bbefdd9c
Comment 4 Alexander Reinholdt 2018-03-07 19:43:57 UTC
Git commit df659b2b197e2e46b46d8acef4726f2de404e3a9 by Alexander Reinholdt.
Committed on 07/03/2018 at 19:43.
Pushed by areinholdt into branch '2.1'.

Do not pass empty strings to the second process when looking up domains.
(cherry picked from commit 7b182ca1654fd177438306d1ca1f1011bbefdd9c)

M  +39   -3    core/smb4kscanner_p.cpp

https://commits.kde.org/smb4k/df659b2b197e2e46b46d8acef4726f2de404e3a9
Comment 5 t.gruner 2018-03-09 07:51:17 UTC
With this patch the error message is still available. When I start smb4k from command line I get this:
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
Neither size nor group specified!
Neither size nor group specified!

The main problem seems to be the smb configuration from my openSUSE installation.
Comment 6 Alexander Reinholdt 2018-03-11 05:41:36 UTC
It's strange that the error message is still there. With my setup, I'm not able to compile a 'nmblookup -A' command that fails when the output of the first process is not empty ... 

Anyway, do you have a special Samba setup? Or is a firewall running and blocking all communication of the Samba programs?
Comment 7 t.gruner 2018-03-19 14:30:14 UTC
Usually the SMB daemon is not running after the system startup. After I start and stop the service all errors are gone. Sometimes after a restart the smbd.service nmblookup fails for 10 seconds. 
I think it is not a problem from smb4k.
Thank you for your support.
Comment 8 Alexander Reinholdt 2018-04-01 12:27:18 UTC
Git commit bb659ab21744ea241ddc28be2fc8b1148a6bf76d by Alexander Reinholdt.
Committed on 01/04/2018 at 12:24.
Pushed by areinholdt into branch 'master'.

Check the network connection before the network scan is started. This finally seems to have fixed bug 391150.

M  +38   -18   core/smb4kscanner.cpp
M  +5    -0    core/smb4kscanner.h

https://commits.kde.org/smb4k/bb659ab21744ea241ddc28be2fc8b1148a6bf76d
Comment 9 Alexander Reinholdt 2018-04-01 12:34:58 UTC
Git commit fc8eece7fd1f4202113e83d9ed6a6d2321bb98f3 by Alexander Reinholdt.
Committed on 01/04/2018 at 12:33.
Pushed by areinholdt into branch '2.1'.

Check the network connection before the network scan is started. This finally seems to have fixed bug 391150.
(cherry picked from commit bb659ab21744ea241ddc28be2fc8b1148a6bf76d)

M  +38   -18   core/smb4kscanner.cpp
M  +5    -0    core/smb4kscanner.h

https://commits.kde.org/smb4k/fc8eece7fd1f4202113e83d9ed6a6d2321bb98f3