On 05/11/2024 18:16, Michael Tokarev wrote:> If smbclient were just to run usleep() function, it will > show exactly the same behavior. > > What's happening here, most likely, is that smbclient is > making some network calls and is waiting for the reply. > > It might be a DNS problem or samba (configuration) problem, > depending on where and what it is waiting for. > > And yes, this will be visible in the strace output. > >> FWIW, there's no delay after I run it once? but only for a couple of >> minutes. > > This suggests it might be a name resolution issue.What files could help find the source of the problem? Here's the smb.conf: ==========[global] workgroup = WORKGROUP netbios name = SHEEVAPLUG security = user ;added, but makes no difference server role = standalone server map to guest = Bad User guest account = www-data log level = 2 disable netbios = yes client min protocol = SMB2_02 server min protocol = SMB2_02 smb ports = 445 printcap name = /dev/null load printers = no printing = bsd [nginx] path = /usr/share/nginx ;comment = No need for Unix/Samba passwords guest ok = yes writeable=yes browseable=yes create mode = 0644 [sdcard] path = /mnt/sdcard guest ok = yes writeable=yes browseable=yes ;don't work with vfat fs ;create mode = 0644 ; still -rw-r-xr-x ===========
On 06/11/2024 06:59, Gilles via samba wrote:> What files could help find the source of the problem?FWIW, it makes no difference: ~# smbclient -NL 127.0.0.1
Michael Tokarev
2024-Nov-06 07:04 UTC
[Samba] Slow reply to "smbclient -NL localhost" : strace
06.11.2024 08:59, Gilles via samba wrote:>>> FWIW, there's no delay after I run it once? but only for a couple of minutes. >> >> This suggests it might be a name resolution issue. > > What files could help find the source of the problem?That's a strange question. Without understanding what the actual problem is, it's hardly possible to point to the solution. Take a closer look at strace. You've already noticed the recv() call takes a noticeable time, - find all of them. BTW, in your strace output you omitted some important pieces, for example, it isn't visible what FD#5 corresponds to, since you omitted its creation/open. The prob might not be the (host) name resolution of smbclient, but on the receiving side too. Or might be something else entirely. /mjt