Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3436

Troubleshooting • Samba/smbd Won't start

$
0
0
Good morning and happy holidays everyone. I wish I didn't have to deal with this during the holidays, but I've been working this for 3 days now with no success and hope someone can help me. I've been using a Raspberry PI 4 Model B with 2GB RAM for almost 4 years now. I've got it setup to stream my media using MiniDNLA and have been using Samba/smb to manage transferring files to/from it. I periodically run apt-get update/upgrade manually and I believe I updated/upgraded it last a few months ago. I use the samba daily, sometimes multiple times a day as I also backup my data on Windows PC to my PI 4 to a 4 bay external drive that gets mounted after the reboot via a bash script through cron. It has been running perfect for this whole time, but all of the sudden last Friday morning I noticed I could no longer get to the Samba share. I thought maybe the pi was hung. I tried logging on to it and it was up. The MiniDLNA was also up, but samba was down. Tried to bring it up, but it would not come up and kept telling me:

Code:

Job for smbd.service failed because a fatal signal was delivered causing the control process to dump core.See "systemctl status smbd.service" and "journalctl -xe" for details.
Journal log was full of unrelated error message about MariaDB, which I fixed. One interesting thing in the status of service and the syslog was:

Code:

/usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef record
I did an apt-get update/upgrade and a full-upgrade, but it would not start. Next I did an apt-get purge and then installed smbd again, but it still would not start. According to the man page for apt-get the purge argument "is identical to remove except that packages are removed and purged (any configuration files are deleted too)." I tried it again and noticed that none of the configuration files were removed so I manually removed:

Code:

rm -rf /var/lib/samba/printers/x64rm -rf /var/lib/samba/printers/W32X86rm -rf /var/log/samba/rm /etc/samba/smb.confrm -rf  /etc/samba
After re-installing I noticed that some of the directories did not get created so I removed the package, recreated the directories and made sure the permissions and ownership matches my pi3 that is also running smbd and reinstalled smbd, put old working confiruation file back in and attempted to restart it, but it keeps failig exactly the same as before.
BTW, somewhere along the way I also noticed that nmbd won't start either:

Code:

root@NL-pi4-1:~# systemctl status smbd.service● smbd.service - Samba SMB Daemon   Loaded: loaded (/lib/systemd/system/smbd.service; disabled; vendor preset: enabled)   Active: failed (Result: core-dump) since Sun 2024-12-29 09:51:53 CST; 15min ago     Docs: man:smbd(8)           man:samba(7)           man:smb.conf(5)  Process: 29805 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)  Process: 29806 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=dumped, signal=SEGV) Main PID: 29806 (code=dumped, signal=SEGV)Dec 29 09:51:53 NL-pi4-1 systemd[1]: Starting Samba SMB Daemon...Dec 29 09:51:53 NL-pi4-1 smbd[29806]: /usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordDec 29 09:51:53 NL-pi4-1 systemd[1]: smbd.service: Main process exited, code=dumped, status=11/SEGVDec 29 09:51:53 NL-pi4-1 systemd[1]: smbd.service: Failed with result 'core-dump'.Dec 29 09:51:53 NL-pi4-1 systemd[1]: Failed to start Samba SMB Daemon.

Code:

root@NL-pi4-1:~# systemctl status nmbd.service● nmbd.service - Samba NMB Daemon   Loaded: loaded (/lib/systemd/system/nmbd.service; disabled; vendor preset: enabled)   Active: failed (Result: core-dump) since Sun 2024-12-29 09:57:45 CST; 9min ago     Docs: man:nmbd(8)           man:samba(7)           man:smb.conf(5)  Process: 30432 ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS (code=dumped, signal=SEGV) Main PID: 30432 (code=dumped, signal=SEGV)Dec 29 09:57:45 NL-pi4-1 systemd[1]: Starting Samba NMB Daemon...Dec 29 09:57:45 NL-pi4-1 systemd[1]: nmbd.service: Main process exited, code=dumped, status=11/SEGVDec 29 09:57:45 NL-pi4-1 systemd[1]: nmbd.service: Failed with result 'core-dump'.Dec 29 09:57:45 NL-pi4-1 systemd[1]: Failed to start Samba NMB Daemon.root@NL-pi4-1:~#
I also tried testparm to check the configuration even though it has not changed in a year or so, but it faults and won't finish:

Code:

root@NL-pi4-1:~# testparm -stestparm: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordtestparm: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordtestparm: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordSegmentation faultroot@NL-pi4-1:~#

Code:

root@NL-pi4-1:~# smbd -vsmbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordsmbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordsmbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordSegmentation faultroot@NL-pi4-1:~#
I also checked the last modification date of smbd and the libraries it is complaining about to see if they were recently updated, but they were not:

Code:

root@NL-pi4-1:~# l /usr/sbin/smbd-rwxr-xr-x 1 root root 79340 Sep  4  2019 /usr/sbin/smbdroot@NL-pi4-1:~#

Code:

root@NL-pi4-1:~# l /lib/arm-linux-gnueabihf/libldb.so.1lrwxrwxrwx 1 root root 15 Mar 28  2021 /lib/arm-linux-gnueabihf/libldb.so.1 -> libldb.so.1.4.6root@NL-pi4-1:~# l /lib/arm-linux-gnueabihf/libldb.so.1.4.6-rw-r--r-- 1 root root 173492 Mar 28  2021 /lib/arm-linux-gnueabihf/libldb.so.1.4.6root@NL-pi4-1:~#
syslog shows:

Code:

Dec 30 07:56:53 NL-pi4-1 systemd[1]: Starting Samba SMB Daemon...Dec 30 07:56:54 NL-pi4-1 smbd[6850]: /usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordDec 30 07:56:54 NL-pi4-1 smbd[6850]: /usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordDec 30 07:56:54 NL-pi4-1 smbd[6850]: /usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordDec 30 07:56:54 NL-pi4-1 systemd[1]: smbd.service: Main process exited, code=dumped, status=11/SEGVDec 30 07:56:54 NL-pi4-1 systemd[1]: smbd.service: Failed with result 'core-dump'.Dec 30 07:56:54 NL-pi4-1 systemd[1]: Failed to start Samba SMB Daemon.Dec 30 07:57:09 NL-pi4-1 systemd[1]: Starting Samba SMB Daemon...Dec 30 07:57:09 NL-pi4-1 smbd[6882]: /usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordDec 30 07:57:09 NL-pi4-1 smbd[6882]: /usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordDec 30 07:57:09 NL-pi4-1 smbd[6882]: /usr/sbin/smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordDec 30 07:57:09 NL-pi4-1 systemd[1]: smbd.service: Main process exited, code=dumped, status=11/SEGVDec 30 07:57:09 NL-pi4-1 systemd[1]: smbd.service: Failed with result 'core-dump'.Dec 30 07:57:09 NL-pi4-1 systemd[1]: Failed to start Samba SMB Daemon.
I looked at the man pages for smbd and tried to run it interactively at the highest debug level, but it won't provide any extra information either and fails the same way:

Code:

root@NL-pi4-1:~# smbd -i -debuglevel=10smbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordsmbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordsmbd: /lib/arm-linux-gnueabihf/libldb.so.1: unsupported version 41 of Verdef recordSegmentation faultroot@NL-pi4-1:~#
Looking at the log files I see there are a lot of "critical medium error" messages related to device sdd, which have been going on for a while:

Code:

root@NL-pi4-1:~# for file in `l -tr /var/log/syslog* |awk '{print $NF}'`; do echo " ${file}: $(cat $file |wc -l)"; done /var/log/syslog.7.gz: 86 /var/log/syslog.6.gz: 71 /var/log/syslog.5.gz: 71 /var/log/syslog.4.gz: 67 /var/log/syslog.3.gz: 1543 /var/log/syslog.2.gz: 2132 /var/log/syslog.1: 3154 /var/log/syslog: 930root@NL-pi4-1:~# grep -ci "critical medium error, dev sdd" /var/log/syslog /var/log/syslog.1;zgrep -ci "critical medium error, dev sdd" /var/log/syslog*.gz/var/log/syslog:87/var/log/syslog.1:95/var/log/syslog.2.gz:95/var/log/syslog.3.gz:97/var/log/syslog.4.gz:94/var/log/syslog.5.gz:83/var/log/syslog.6.gz:114/var/log/syslog.7.gz:108root@NL-pi4-1:~#
I will need to address this later, but I don't believe it is related to samba not starting up. Just to be sure I created a /TestSamba directory on the local drive (not on any external devices attached via USB), but smbd still fails the same way as before. At this point I'm stuck like chuck and have no clue what to do next, other than possibly starting with a fresh SD card and install the OS from scratch along with everything else I need and configure them all, which will take at least 3-5 days. I've also read online from other people that starting from scratch did not always resolve all their problems.
Here's my samba config file:

Code:

root@NL-pi4-1:~# egrep -v "^$|^;|^#" /etc/samba/smb.conf[global]   follow symlinks = yes   wide links = yes   unix extensions = no   workgroup = WORKGROUP   dns proxy = no   log file = /var/log/samba/log.%m   max log size = 1000   syslog = 0   panic action = /usr/share/samba/panic-action %d   encrypt passwords = true   passdb backend = tdbsam   obey pam restrictions = yes   unix password sync = yes   passwd program = /usr/bin/passwd %u   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .   pam password change = yes   map to guest = bad user   usershare allow guests = yes   map acl inherit = yes   workgroup = WORKGROUP   log file = /var/log/samba/log.%m   max log size = 1000   logging = file   panic action = /usr/share/samba/panic-action %d   server role = auto   obey pam restrictions = yes   unix password sync = yes   passwd program = /usr/bin/passwd %u   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .   pam password change = yes   map to guest = bad user   usershare allow guests = yes[homes]   comment = Home Directories   browseable = no   read only = yes   create mask = 0700   directory mask = 0700   valid users = %S[printers]   comment = All Printers   browseable = no   path = /var/spool/samba   printable = yes   guest ok = no   read only = yes   create mask = 0700[print$]   comment = Printer Drivers   path = /var/lib/samba/printers   browseable = yes   read only = yes   guest ok = no[Share]   comment = Share For Pictures, Musics, and Misc With Links To Movies   path = /Share   guest ok = no   read only = no   writeable = Yes   browseable = yes   create mask = 0644   directory mask = 0755root@NL-pi4-1:~#
Here's my OS info:

Code:

root@NL-pi4-1:~# uname -aLinux NL-pi4-1 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linuxroot@NL-pi4-1:~# cat /etc/os-releasePRETTY_NAME="Raspbian GNU/Linux 10 (buster)"NAME="Raspbian GNU/Linux"VERSION_ID="10"VERSION="10 (buster)"VERSION_CODENAME=busterID=raspbianID_LIKE=debianHOME_URL="http://www.raspbian.org/"SUPPORT_URL="http://www.raspbian.org/RaspbianForums"BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"root@NL-pi4-1:~#
If there is anything else you need for me to provide please let me know. Please keep in mind I'm not a rookie, but I'm not an expert either so you may have to spell out exactly what you want me to do. Thank you in advance for your time and help.

Statistics: Posted by nasserl — Mon Dec 30, 2024 3:17 pm — Replies 0 — Views 13



Viewing all articles
Browse latest Browse all 3436

Trending Articles