this post was submitted on 20 Jul 2025
20 points (100.0% liked)

Linux Questions

2414 readers
20 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 2 years ago
MODERATORS
 

Every now and then my Samba share stops working.

$ smbclient -U sambauser '\\192.168.12.11\Apartment'
do_connect: Connection to 192.168.12.11 failed (Error NT_STATUS_CONNECTION_REFUSED)

This is incredibly annoying, since it happens somewhat frequently too. I restart the container, with no fix. It might be client-side, but I'm boggled by how that could even occur. There are no logs in systemd for smbd. The firewall is disabled.

/etc/samba/smb.conf: https://pastebin.com/HNgw8YcV

you are viewing a single comment's thread
view the rest of the comments
[โ€“] phanto@lemmy.ca 11 points 3 weeks ago (1 children)

This is kind of embarrassing, but I had a bunch of samba issues that went away when I made a "touch heartbeat.txt" on the mount every three minutes in my crontab. It was timing out and not re-establishing the connection reliably, so screw it. Never stops sending a miniscule bit of data every few minutes. Solved. Been running that way for like five years!

I also "fixed" a slow memory leak on a process by restarting the process every night at 1am in my crontab too! I'm the worst kind of admin.

[โ€“] hodgepodgin@lemmy.zip 5 points 3 weeks ago

I think it has something to do with KDE not killing smbnotifier processes. If I kill the Samba daemon, I notice a ton of TCP traffic as the processes try to reset connections, then eventually terminating. If I then start the daemon again, those processes disappear and I can access the share through Dolphin.