Been a while since I’ve posted as I have had a really good run with OSMC (Kudos Sam and the rest of the team).
However, the latest update is giving me issues. It fails to install and seems to indicate samba is the cause. Upon restarting, samba is not working in my original install.
Logs are here (apologies for uploading the lot as I was not sure which would be relevant)
So, I’m not too familiar with samba but it looks like the smbd is not able to create a lock (!!!) file which should reside in /var/cache/samba/lck, could you provide
ls -al / paste-log
ls -al /var | paste-log
ls -al /var/cache | paste-log
ls -al /var/cache/samba | paste-log
ls -al /var/cache/samba/lck | paste -log
to compare it with systems which do not show this issue?
You should be using systemd commands, so that would be sudo systemctl start samba.service. If it still says it’s masked, you can unmask it with sudo systemctl unmask samba.service. (Mask is a stronger form of disable.)
I ended up recovering my last clonezilla image backup of my osmc sdcard from last month. After the clonezilla recovery, I ran the first set of osmc updates. That update goes through fine, and samba works normally. From CLI, I stop kodi, run apt-get update, and then run apt-get dist-upgrade. I’ve tried updating via both the onscreen kodi prompt which stops kodi, and proceeds to update, and via manual CLI, and run into the same exact issue on the second round of updates. Both update methods manually stop samba mid-way through which I assume should happen. During the second round of updates (about 360MB) via CLI I get two blue prompts. One, to stop samba, and the second later in the install prompts either to keep maintainer smb.conf or local version. I selected the option for local version. This time the upgrade finishes without error, but after I reboot, samba does not auto start. Manually trying to start it produces:
See "systemctl status samba.service" and "journalctl -xe" for details.
root@osmc:/etc/samba# journalctl -xe
Jan 20 13:06:16 osmc sudo[1496]: pam_unix(sudo:session): session closed for user root
Jan 20 13:09:21 osmc systemd[1]: Starting Samba Server...
-- Subject: Unit samba.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit samba.service has begun starting up.
Jan 20 13:09:21 osmc systemd[1]: Starting Samba NMB Daemon...
-- Subject: Unit nmbd.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit nmbd.service has begun starting up.
Jan 20 13:09:21 osmc systemd[1]: nmbd.service: Supervising process 1592 which is not our child. We'll most likely not notice when it exits.
Jan 20 13:09:21 osmc nmbd[1592]: [2018/01/20 13:09:21.939413, 0] ../source3/lib/util.c:478(reinit_after_fork)
Jan 20 13:09:21 osmc nmbd[1592]: messaging_reinit() failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
Jan 20 13:09:21 osmc nmbd[1592]: [2018/01/20 13:09:21.940478, 0] ../lib/util/become_daemon.c:111(exit_daemon)
Jan 20 13:09:21 osmc nmbd[1592]: STATUS=daemon failed to start: reinit_after_fork() failed, error code 2
Jan 20 13:09:21 osmc systemd[1]: nmbd.service: Main process exited, code=exited, status=1/FAILURE
Jan 20 13:09:21 osmc systemd[1]: Failed to start Samba NMB Daemon.
-- Subject: Unit nmbd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit nmbd.service has failed.
--
-- The result is failed.
Jan 20 13:09:21 osmc systemd[1]: nmbd.service: Unit entered failed state.
Jan 20 13:09:21 osmc systemd[1]: nmbd.service: Failed with result 'exit-code'.
Jan 20 13:09:21 osmc samba.distributed[1582]: Starting nmbd (via systemctl): nmbd.serviceJob for nmbd.service failed because the control process exited with error code.
Jan 20 13:09:21 osmc samba.distributed[1582]: See "systemctl status nmbd.service" and "journalctl -xe" for details.
Jan 20 13:09:21 osmc samba.distributed[1582]: failed!
Jan 20 13:09:21 osmc systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Jan 20 13:09:21 osmc systemd[1]: Failed to start Samba Server.
-- Subject: Unit samba.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit samba.service has failed.
--
root@osmc:/etc/samba# sudo /usr/sbin/smbd -i -S -d 3
smbd version 4.5.12-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2016
uid=0 gid=0 euid=0 egid=0
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section “[global]”
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section “[/home/osmc]”
Processing section “[32GB]”
Processing section “[Tera]”
adding IPC service
added interface eth0 ip=192.168.2.15 bcast=192.168.2.255 netmask=255.255.255.0
loaded services
INFO: Profiling support unavailable in this build.
messaging_dgm_lockfile_create: open failed: No such file or directory
messaging_dgm_init: messaging_dgm_create_lockfile failed: No such file or directory
messaging_dgm_ref failed: No such file or directory
messaging_reinit() failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
STATUS=daemon failed to start: reinit_after_fork() failed, error code 2
Well, I did the upgrade again. Picked the option for maintainer’s version, and after reboot had the same issue.
I went through your above suggestions, and I’m glad to report that the second set of directions worked (replacing configs, and starting w/ fresh dir’s). Thanks very much!