Samba on 5.0.176 stops after a few days

SMB, NFS, AFP, FTP, web file manager and Rsync server.
Locked
User avatar
freman
Posts: 27
Joined: 30 Nov 2021, 11:26

Samba on 5.0.176 stops after a few days

Post by freman »

Hi

Samba stops working after a few days on 5.0.176, can't connect to it from my desktop or my phone.
I log in via ssh and try to restart it

Code: Select all

[SuperUser@Store ~]# /etc/init.d/samba restart
script samba get lock
Restart samba: Unable to initialize messaging context!
Unable to initialize messaging context!
Can't find include file
Can't find include file
Failed to find entry for user guest.
0
0
OK
But that isn't helping, if I reboot the TNAS it starts working again for a while, then results in the same situation.
User avatar
TWlhq
TerraMaster Team
Posts: 29
Joined: 29 Jun 2022, 18:12

Re: Samba on 5.0.176 stops after a few days

Post by TWlhq »

{L_BUTTON_AT}freman

When this problem occurs, use the terminal to connect to ssh, and try to connect to smb locally.
User avatar
freman
Posts: 27
Joined: 30 Nov 2021, 11:26

Re: Samba on 5.0.176 stops after a few days

Post by freman »

@TWihq I don't think that'll work... Considering this is in the smb log

Code: Select all

  messaging_dgm_lockfile_create: write failed: No space left on device
[2022/12/17 19:17:42.536320,  1] ../../lib/messaging/messages_dgm.c:1045(messaging_dgm_init)
  messaging_dgm_init: messaging_dgm_create_lockfile failed: No space left on device
[2022/12/17 19:17:42.536364,  2] ../../source3/lib/messages.c:673(messaging_reinit)
  messaging_dgm_ref failed: No space left on device
[2022/12/17 19:17:42.536443,  0] ../../source3/lib/util.c:483(reinit_after_fork)
  messaging_reinit() failed: NT_STATUS_DISK_FULL
[2022/12/17 19:17:42.536871,  1] ../../source3/lib/messages.c:1442(mess_parent_dgm_cleanup_done)
  messaging dgm cleanup job ended with NT_STATUS_OK
[2022/12/17 19:17:42.539203,  2] ../../source3/smbd/server.c:816(remove_child_pid)
  Could not find child 29317 -- ignoring
[2022/12/17 19:23:37.692307,  1] ../../lib/messaging/messages_dgm.c:957(messaging_dgm_lockfile_create)
  messaging_dgm_lockfile_create: write failed: No space left on device
[2022/12/17 19:23:37.692531,  1] ../../lib/messaging/messages_dgm.c:1045(messaging_dgm_init)
  messaging_dgm_init: messaging_dgm_create_lockfile failed: No space left on device
[2022/12/17 19:23:37.692576,  2] ../../source3/lib/messages.c:673(messaging_reinit)
  messaging_dgm_ref failed: No space left on device
[2022/12/17 19:23:37.692612,  0] ../../source3/lib/util.c:483(reinit_after_fork)
  messaging_reinit() failed: NT_STATUS_DISK_FULL
[2022/12/17 19:23:37.692883,  0] ../../source3/smbd/server.c:1018(smbd_accept_connection)
  reinit_after_fork() failed
[2022/12/17 19:23:37.692975,  0] ../../lib/util/fault.c:172(smb_panic_log)
It looks like tmpfs for /opt/var is undersized or there's missing cleanup

Code: Select all

[SuperUser@Store samba]# df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/md9             1.9G  1.1G  662M  63% /
devtmpfs             3.9G     0  3.9G   0% /dev
tmpfs                3.9G  140K  3.9G   1% /dev/shm
tmpfs                3.9G   96M  3.8G   3% /tmp
tmpfs                3.9G  392K  3.9G   1% /run
tmpfs                3.9G  3.9G     0 100% /opt/var
/dev/mapper/vg0-lv0   37T   23T   14T  64% /Volume1
/dev/mapper/vg0-lv0   37T   23T   14T  64% /home
cgroup               3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/vg0-lv0   37T   23T   14T  64% /Volume1/DockerData/btrfs

Code: Select all

[SuperUser@Store var]# du -sh *
0	api
76K	base
28K	cache
0	console
0	db
0	empty
0	httpd
8.0K	index.html
0	krb5kdc
2.6M	lib
2.2M	lock
3.9G	log
16K	logs
8.0K	nas
8.0K	net-snmp
8.0K	netatalk
4.0K	openldap-data
0	run
20K	spool
0	state
0	tmp
0	www

Code: Select all

[SuperUser@Store log]# du -sh *
0	ResourceCollection
0	ResourceCollection.log
0	ScheduledTask
344K	TOSDaemon.log
4.0K	TerraPhotos.log
4.0K	auth.log
0	cron
104K	crond.log
0	docker.log
48K	dovecot-info.log
20K	dovecot.log
36K	faceDetection.log
4.0K	faceDetectionProcess.txt
8.0K	httpd
0	inadyn
204K	iniparse.log
0	maillog
4.0K	media.log
4.0K	mediadb
488K	messages
4.0K	minidlna.log
4.0K	mntfc.log
44K	msgcenter.log
8.0K	mt-daapd.log
112K	nginx
4.0K	noip2
4.0K	pgsql
4.0K	phddns
4.0K	php-fpm
4.0K	portainer.log
4.0K	redis
4.0K	regcloud.log
4.0K	resolv.conf
4.0K	restart_service.log
3.9G	rsyslog
432K	samba
8.0K	scripts.log
60K	secure
0	session
0	sshd
0	sssd
4.0K	start.log
0	subsys
4.0K	tallylog
136K	tos
4.0K	upnp.xml
0	usbtool.log
4.0K	user.log
0	vg_monitor
0	zlog

Code: Select all

[SuperUser@Store rsyslog]# du -sh
3.9G	.
Soo it looks like my samba problems are caused by LogCenter

I have LogCenter configured to use Volume1/private with a 1gb max space
logbug.jpg
yet rsyslog is full of logs for remote hosts, is not in Volume1/private and is 3.9 gig.
User avatar
freman
Posts: 27
Joined: 30 Nov 2021, 11:26

Re: Samba on 5.0.176 stops after a few days

Post by freman »

Yep, can confirm, all my Samba problems appear to be caused by "Log Center" storing logs in /opt/var/log/rsyslog instead of /Volume1/private/ as I configured it to be.

I've temporarily disabled Log Center but that needs a fix.
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: Samba on 5.0.176 stops after a few days

Post by TMSupport »

Thanks for your report, and We will verify it soon.
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
freman
Posts: 27
Joined: 30 Nov 2021, 11:26

Re: Samba on 5.0.176 stops after a few days

Post by freman »

This is still an issue in 5.1.13
User avatar
FlyinLion
Posts: 1
Joined: 26 Apr 2023, 22:42

Re: Samba on 5.0.176 stops after a few days

Post by FlyinLion »

I don't know if this will help anyone, but when I plug in my 1tb ssd into the f4-421's USB port, I lose SMB connection. It doesn't show under file manager when I plug it in. It does show in the top right where I can safely eject. Once I plug it in, smb access immediately stops. Could this be a log center issue as well? I use to have to reset my pc every week or so because it would just lock out the nas. After a reset it would work okay for a few days but then inevitably, it would lock me out. As long as I don't plug that usb drive in, connectivity is fine.
F4-421 5 bay mod
4-18tb Exos Raid 5 w/ 1TB hypercache R/W
Windows 10
Plex Super User
Locked