(1) Change password SSH, samba, (2) win 10 samba access hangs

Hi,
Using a SSH terminal session from a windows 10 pc I changed the password of the osmc user with “passwd”.
Then I changed smb password with “smbpasswd osmc”.
Both new passwords are identical.
As expected, after completing the password changes, SSH login and samba access are only successful with the new password.
Surprisingly, with the official Kodi remote for iOS (iPad) I have access with both passwords, osmc as password and the new password.
Everything is working fine, but I would like to know and to learn. Is there another password for the same user name osmc for Kodi? How can the same user have different passwords for different applications (actually, it also works with user osmc SSH and samba password different). And is this not leading to unpredictable behavior?
My real problem is that when I access the samba shares from my windows pc (mapping raspberry IP and external disk to a windows drive letter using user osmc and samba password) explorer often hangs and in general, reacts often very slow. If working, transfer speed is normal but browsing and massive opening of small files and parallel down and uploading of files from the different external drives, letting explorer hang after a while. Most of the time after waiting (5-15) minutes explorer coming back or file transfer can re-started. But this is really not efficient working.
This might have nothing to do with the password issue. I had this problem also before with default password(s).
What I checked already:
Before, I was running LibreElec with the same issue. With windows defender and firewall off the same problem. Opening samba ports in windows also wasn’t helping. Enable smb1 in windows not helping.
Settings:
Kodi has max=smb3; windows without smb1 which means smb3 on both sides; samba server off and on not helping…
External drives (NTFS) are mapped by osmc automatic procedures.

I’m happy for any advice or links for further reading.
Best

Raspberry Pi 3 B+ with 2 powered external 6 TB HDD, LAN connected (I’m not sure but I have the feeling with raspberry WiFi connected explorer hanging is less)
osmc updated
Windows 10 Prof, fresh clean install with updates (LAN)
dedicated IP addresses with DHCP on

If log file needed I’m happy to provide

The Webserver doesn’t have a password set by default therefore both work.
Go to settings - services to configure a http password

Thank you, I checked, I should have seen this, web access is mentioned.
How about my samba problems, any ideas?

Not really but as you always had the problem even with other OS I would start with checking the network performance with iperf3.

here my iperf3 output:

osmc@raspberry:~$ iperf3 -R -c 192.168.2.2
Connecting to host 192.168.2.2, port 5201
Reverse mode, remote host 192.168.2.2 is sending
[ 4] local 192.168.2.3 port 52072 connected to 192.168.2.2 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 25.9 MBytes 218 Mbits/sec
[ 4] 1.00-2.00 sec 27.2 MBytes 228 Mbits/sec
[ 4] 2.00-3.00 sec 27.1 MBytes 227 Mbits/sec
[ 4] 3.00-4.00 sec 27.2 MBytes 228 Mbits/sec
[ 4] 4.00-5.00 sec 27.2 MBytes 228 Mbits/sec
[ 4] 5.00-6.00 sec 26.9 MBytes 226 Mbits/sec
[ 4] 6.00-7.00 sec 27.2 MBytes 228 Mbits/sec
[ 4] 7.00-8.00 sec 27.2 MBytes 228 Mbits/sec
[ 4] 8.00-9.00 sec 27.0 MBytes 227 Mbits/sec
[ 4] 9.00-10.00 sec 27.2 MBytes 228 Mbits/sec


[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 270 MBytes 227 Mbits/sec sender
[ 4] 0.00-10.00 sec 270 MBytes 227 Mbits/sec receiver

iperf Done.
osmc@raspberry:~$ iperf3 -c 192.168.2.2
Connecting to host 192.168.2.2, port 5201
[ 4] local 192.168.2.3 port 52076 connected to 192.168.2.2 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 37.4 MBytes 314 Mbits/sec 0 210 KBytes
[ 4] 1.00-2.00 sec 37.3 MBytes 313 Mbits/sec 0 210 KBytes
[ 4] 2.00-3.00 sec 37.0 MBytes 310 Mbits/sec 0 210 KBytes
[ 4] 3.00-4.00 sec 37.1 MBytes 311 Mbits/sec 0 210 KBytes
[ 4] 4.00-5.00 sec 37.1 MBytes 311 Mbits/sec 0 210 KBytes
[ 4] 5.00-6.00 sec 37.0 MBytes 311 Mbits/sec 0 210 KBytes
[ 4] 6.00-7.00 sec 37.2 MBytes 312 Mbits/sec 0 210 KBytes
[ 4] 7.00-8.00 sec 37.4 MBytes 314 Mbits/sec 0 210 KBytes
[ 4] 8.00-9.00 sec 36.9 MBytes 309 Mbits/sec 0 210 KBytes
[ 4] 9.00-10.00 sec 37.1 MBytes 311 Mbits/sec 0 210 KBytes


[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 371 MBytes 312 Mbits/sec 0 sender
[ 4] 0.00-10.00 sec 371 MBytes 311 Mbits/sec receiver

iperf Done.

Bandwidth is stable but should be higher.
I also done the other recommended further testing with similar output.

Looks Ok, not sure why you mean it should be higher?

because you stated this in your How To
Wired 1000 Mbit (both sides): upto 940 Mbits/sec

The speeds you are getting are normal for a Pi as the internal ethernet connection is via USB2. You can’t get faster than what you are seeing.

As @bmillham wrote that lower speed is related to the design of the Pi3. I might should write a warning into the iperf how to.
You might want to try to limit the speed to 100Mbit to check if samba more stable

Thank you Brian for clarifying this.

@fzinken:
This might help Noobies like me not to expect too much. After knowing this now I can easily google that a Gb port of a rpi doesn’t deliver Gb :exploding_head:
I will try the limit approach (this might help as I had already the feeling connected on WiFi might slightly more stable) but doing this my transfer speed will be lower.

Is there a way to get a log where I can see what happens in the network when my windows explorer hangs?

I’m trying to reproduce my explorer hanging. It seems to be better now; couldn’t reproduce within 10 minutes like before. The only thing I was doing since it was worse, I setting SSH and Samba password to the same.

But after some time (20 minutes) not touching explorer (but still open; directed to the external drives) I wanted to open a folder on the external drive and then again, explorer immediately hanged (for a few minutes). I still had the SSH session with iperf3 open, run iperf3, results like before, running. After waiting a few minutes (explorer still inactive, a new opened explorer window the same), I opened some folders on the external drives with osmc and when I came back to my pc (in another room) explorer came up again.

What does this mean? LAN connection is alive but Windows samba client can’t find server or experience delays? External HDD may in stand-by not IDLE; sleeping should not be possible, I put on 2 hours with Seagate software.

Sorry for insisting, maybe my issue is a luxury small problem but I like to learn and by the way, you know I’m German and most of them hate if things are not perfectly doing what they should.:sweat_smile:

Thank you for your patience.

This could be a problem of the HDD sleeping. Maybe have a ssh session open and run sudo journalctl -f maybe that gives you some clues what happens on the Pi

Thanks. journalctl all fine.

(1) May this have an impact?

Disk /dev/sda: 5.5 TiB, 6001175125504 bytes, 11721045167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 86A66A63-D5D6-4782-9F52-811117F0E0C0

Device Start End Sectors Size Type
/dev/sda1 34 262177 262144 128M Microsoft reserved
/dev/sda2 264192 11721043967 11720779776 5.5T Microsoft basic data

Partition 1 does not start on physical sector boundary.

(2) I played with WireShark, did not found much, found these 2 things:
Status_Access_Denied
and
TCP Dup ACK

I put the external HDD on standby (spindown) with
sudo hdparm -S 5 /dev/sda
sudo hdparm -S 5 /dev/sdb
waited half minute and browsed the drives with the win client without problem. Seems like this is not the problen.

I installed osmc fesh (NOOBS) on another SD card (SanDisc), updated the system, problem still the same.

In short, I’m describing my samba transfer procedure to invoke my problem:

Transferring in parallel files from/to raspberry (samba server) from/to windows 10 (samba client) (a movie and a folder with music files same time from/to both shares I have), approx. 2 GB in total, transfer speed is good, up to 20 MB/s, but suddenly transfer stops and explorer hangs, sometimes coming up again but transfer has to restart (and will not finish ever most of the time).

  • Wireshark showing Status_Access_Denied for the win client and many TCP Dup ACK
  • Windows event log showing that connection to the samba server was interrupted
  • Ifconfig showing TX errors and drops

Solution or better Workaround

People describing problems with the LAN adapter/kernel software of the Raspberry Pi B 3+ in some environments.

https://www.raspberrypi.org/forums/viewtopic.php?t=214961

https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=208512&start=150#p1324143

https://www.raspberrypi.org/forums/viewtopic.php?t=215262

The proposed workaround did also work for me:

sudo apt-get update

sudo apt-get install ethtool

sudo ethtool --offload eth0 rx off tx off

This switches off the TCP offload engine which is anyway not supported in unix by default (Linux Networking: How to disable/enable offload features, RX/TX checksum, scatter, gather and beyond | #less tar.gz.ro). Ifconfig doesn’t show anymore TX errors and drops. I guess the problem is not solved, to be honest I don’t understand the technical background, but no samba server interruptions in the windows log and no TX errors and drops; it’s just a workaround but browsing the shares is now running smooth (if bandwidth is not filled up with a file transfer) and file transfer don’t get unpredictably interrupted anymore, even when transferring many files the same time.

To confirm the workaround is working, I switched on again:

sudo ethtool --offload eth0 rx on tx on

I opened a new win explorer window and explorer immediately frozen and crashed.

I repeated this 5-10 times over the last 2 days, always the same, with or without reboot of the windows machine or the raspberry. I can now reproduce the error quite stable. I had this problem since spring when I bought my first raspberry 3 B+ (made in China). Later I was thinking windows 1803 upgrade was the reason and I tried many things in windows without any effect (finally had to reinstall windows). I bought a new 3B+ (made in UK), same problem. Used 2 different SD cards, no difference. Fresh installed LibreElec and osmc, no difference.

1 Like

October update (firmware, kernel) solved samba/LAN issue. Workaround not needed any more.

1 Like