Good time! After upgrading samba 4.5.10 to 4.9.13, name resolution in AD hangs. # /etc/init.d/samba status ?* status: crashed But the domain itself works, but hangs when resolving user names. What can be done? [2019/10/13 12:24:52.896473, 10, pid=17379, effective(0, 0), real(0, 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) ? ldb: Added timed event "ltdb_callback": 0x55ef42a1daf0 [2019/10/13 12:24:52.896513, 10, pid=17379, effective(0, 0), real(0, 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) ? ldb: Added timed event "ltdb_timeout": 0x55ef41f30560 [2019/10/13 12:24:52.896562, 10, pid=17379, effective(0, 0), real(0, 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) ? ldb: Destroying timer event 0x55ef42a1ca60 "ltdb_timeout" [2019/10/13 12:24:52.896602, 10, pid=17379, effective(0, 0), real(0, 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) ? ldb: Destroying timer event 0x55ef42127450 "ltdb_callback" [2019/10/13 12:24:52.896653, 10, pid=17379, effective(0, 0), real(0, 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) ? ldb: Running timer event 0x55ef42a1daf0 "ltdb_callback" -- Milkin Dmitry
On 13/10/2019 11:31, Dmitry Milkin via samba wrote:> Good time! > > After upgrading samba 4.5.10 to 4.9.13, name resolution in AD hangs. > > # /etc/init.d/samba status > ?* status: crashed > > > But the domain itself works, but hangs when resolving user names. > > What can be done? > > [2019/10/13 12:24:52.896473, 10, pid=17379, effective(0, 0), real(0, > 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) > ? ldb: Added timed event "ltdb_callback": 0x55ef42a1daf0 > > [2019/10/13 12:24:52.896513, 10, pid=17379, effective(0, 0), real(0, > 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) > ? ldb: Added timed event "ltdb_timeout": 0x55ef41f30560 > > [2019/10/13 12:24:52.896562, 10, pid=17379, effective(0, 0), real(0, > 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) > ? ldb: Destroying timer event 0x55ef42a1ca60 "ltdb_timeout" > > [2019/10/13 12:24:52.896602, 10, pid=17379, effective(0, 0), real(0, > 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) > ? ldb: Destroying timer event 0x55ef42127450 "ltdb_callback" > > [2019/10/13 12:24:52.896653, 10, pid=17379, effective(0, 0), real(0, > 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:77(ldb_wrap_debug) > ? ldb: Running timer event 0x55ef42a1daf0 "ltdb_callback" >What OS ? Please post your smb.conf Rowland
On 13/10/2019 12:34, ??????? ??????? wrote:> Calculate Linux gentoo based > > $ cat /etc/samba/smb.conf > # Global parameters > [global] > workgroup = 404 > realm = 404.LOCAL > netbios name = SRV > ntlm auth = yes > server role = active directory domain controller > server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd, ntp_signd, kcc, dnsupdate > idmap_ldb:use rfc2307 = yes > interfaces = 192.168.1.254/24 > > [netlogon] > path = /var/lib/samba/sysvol/404.local/scripts > read only = No > > [sysvol] > path = /var/lib/samba/sysvol > read only = No > > [home] > path = /data/samba/home > read only = No > hide files = /$RECYCLE.BIN/desktop.ini/ > > [public] > path = /data/samba/public > read only = No > hide files = /$RECYCLE.BIN/desktop.ini/ > > [base] > path = /data/samba/base > read only = no > browseable = no > hide files = /$RECYCLE.BIN/desktop.ini/ > > [2gis] > path = /.back/2Gis > read only = No > hide files = /$RECYCLE.BIN/desktop.ini/ > > [Profiles] > path = /data/samba/profiles > read only = No > hide files = /$RECYCLE.BIN/desktop.ini/ > > [Distr] > path = /mnt/public/samba/Distr > read only = no > browseable = no > printable = no > create mask = 0660 > directory mask = 0770 > > [dist] > comment = ???????????? > path = /.back/distr > read only = no > browseable = no > printable = no > create mask = 0660 > directory mask = 0770 > hide files = /$RECYCLE.BIN/desktop.ini/Apart from you using a Samba DC as a fileserver (this isn't recommended), there isn't much wrong there (I would set the share permissions from Windows). You seem to be running '/etc/init.d/samba', now I do not use Gentoo, but are you sure this is the correct start script. I ask this because Debian used to use a similarly named script to start the smbd & nmbd binaries, it now uses separate scripts these and a new one 'samba-ad-dc' to start the 'samba' binary required for an AD DC. Starting the 'samba' binary will then start the smbd and winbind binaries. If this isn't the case, can you raise the logging (add 'log level = 3' to smb.conf for a start) and see what pops out. Rowland
On 13/10/2019 14:13, ??????? ??????? wrote:> cat /etc/conf.d/samba > # Add "winbind" to the daemon_list if you also want winbind to start. > # Replace "smbd nmbd" by "samba4" if you want the active directory > domain controller part or the ntvfs > # file server part or the rpc proxy to start. > # Note that samba4 controls 'smbd' by itself, thus it can't be started > manually. You can, however, > # tweak the behaviour of a samba4-controlled smbd by modifying your > '/etc/samba/smb.conf' file > # accordingly. > daemon_list="samba4" > > #---------------------------------------------------------------------------- > > # Daemons calls: <daemon_name>_<command_option> > #---------------------------------------------------------------------------- > > my_service_name="samba" > my_service_PRE="unset TMP TMPDIR" > my_service_POST="" > > #---------------------------------------------------------------------------- > > # Daemons calls: <daemon_name>_<command_option> > #---------------------------------------------------------------------------- > > smbd_start_options="-D" > smbd_start="start-stop-daemon --start --exec /usr/sbin/smbd -- > ${smbd_start_options}" > smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd" > smbd_reload="killall -HUP smbd" > > nmbd_start_options="-D" > nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- > ${nmbd_start_options}" > nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd" > nmbd_reload="killall -HUP nmbd" > > samba4_start_options="" > samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- > ${samba4_start_options}" > samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba" > samba4_reload="killall -HUP samba" > > winbind_start_options="" > winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- > ${winbind_start_options}" > winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd" > winbind_reload="killall -HUP winbindd"OK, can you post the contents of /etc/init.d/samba ? I think you may be trying to start everything, 'smbd' appears to be starting before the 'samba' deamon and 'samba' should be starting the 'smbd' deamon. Rowland
On 13/10/2019 15:06, ??????? ??????? wrote:> #!/sbin/openrc-runNever used openrc :-(> # Copyright 1999-2018 Gentoo Foundation > # Distributed under the terms of the GNU General Public License, v2 or > later > > extra_started_commands="reload" > [ -z "${piddir}" ] && piddir="/run/samba" > > depend() { > ??????? after slapd > ??????? need net > ??????? use cupsd > } >I take it that 'depend' means the services listed must be running, if so, then there is a problem right there. You cannot run slapd and a Samba AD DC on the same computer (unless slapd is not running on ports 389 and 636)> DAEMONNAME="${SVCNAME##samba.}" > [ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}I 'think' this picks up the 'daemon_list' from '/etc/conf.d/samba' and uses that if it isn't 'samba', problem is that it isn't 'samba' and there isn't a daemon called 'samba4'> > signal_do() { > ??????? local signal="$1" > ??????? [ -z "${signal}" ] && return 0 > > ??????? local result=0 last_result=0 daemon= cmd_exec> ??????? for daemon in ${daemon_list} ; do > ??????????????? eval cmd_exec=\$${daemon}_${signal} > ??????????????? if [ -n "${cmd_exec}" ]; then > ??????????????????????? ebegin "${my_service_name} -> ${signal}: > ${daemon}" > ??????????????????????? #echo ${cmd} '->' ${!cmd} > ??????????????????????? ${cmd_exec} > /dev/null > ??????????????????????? last_result=$? > ??????????????????????? eend ${last_result} > ??????????????? fi > ??????????????? result=$(( ${result} + ${last_result} )) > ??????? done > ??????? return ${result} > } > > start() { > ??????? ${my_service_PRE} > ??????? [ -d "${piddir}" ] || mkdir -p "${piddir}" > ??????? signal_do start && return 0 > > ??????? eerror "Error: starting services (see system logs)" > ??????? signal_do stop > ??????? return 1 > } > stop() { > ??????? ${my_service_PRE} > ??????? if signal_do stop ; then > ??????????????? ${my_service_POST} > ??????????????? return 0 > ??????? fi > } > reload() { > ??????? ${my_service_PRE} > ??????? signal_do reload > } > >All of the above is guess work and could be way off the mark, but I did some googling and came up with this: #!/sbin/openrc-run extra_started_commands="reload" SERVER_ROLE=`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1` if [ "$SERVER_ROLE" != "active directory domain controller" ]; then ??? exit 1 fi depend() { ??????? need net ??????? after firewall } start() { ??????? ebegin "Starting samba" ??????? mkdir -p /var/run/samba ??????? start-stop-daemon --start --quiet --exec /usr/sbin/samba -- ??????? eend $? } stop() { ??????? ebegin "Stopping samba" ??????? start-stop-daemon --stop --quiet --pidfile /var/run/samba/samba.pid ??????? eend $? } reload() { ????????? ebegin "Reloading samba" ????????? killall -HUP samba ????????? eend $? } Can you try this. If it doesn't work, I think you either need an openrc expert or to talk to Gentoo. Rowland