[SOLVED] Samba S6 cannot run as a service 01 September 2020, 01:37:35 - Samba shares not working when samba is run as a service. running smbd/nmdb as as service causes it to fail. console shows this(see samba_console_output-scaled screenshot)using either s6-rc -u or s6-rc-bundle(-update) does the same error. samba's log folder are empty (/var/log/samba/cores/{nmbd,smbd})- running smbd/nmbd manually works. and so is samba services on runit and openrc. attached is screenshot of services ran manually Last Edit: 03 September 2020, 05:09:34 by negative
Re: Samba S6 cannot run as a service Reply #1 – 01 September 2020, 05:13:09 I can confirm. Too bad the error code is not helpful at all. My guess is that this needs some kind of environment variable or something defined since running the run script directly from shell with execline works as expected.
Re: Samba S6 cannot run as a service Reply #2 – 02 September 2020, 03:31:19 some strange things happening here.by default, s6 runs smbd nmbd with -F -S. tried to change it to use something else (like increase log level with -d <level>) and even if console shows that error, looking at htop, you can see s6-supervise smbd/nmbd still tries running with -F -S
Re: Samba S6 cannot run as a service Reply #3 – 02 September 2020, 04:25:49 You need to recompile and update the s6-rc database for that to work. It does work with -i although that seems to limit you to one connection. I'll need to try increasing the log level and see if there's anything useful when I get a chance.
Re: Samba S6 cannot run as a service Reply #4 – 02 September 2020, 05:06:37 Okay, apparently it gives "Standard input is not a socket, assuming -D option". Very strange. 1 Likes
Re: Samba S6 cannot run as a service Reply #5 – 02 September 2020, 05:29:32 Quote from: Dudemanguy – on 02 September 2020, 05:06:37Okay, apparently it gives "Standard input is not a socket, assuming -D option". Very strange.im not on my pc now. can you try removing "exec" and add --no-process-group
Re: Samba S6 cannot run as a service Reply #6 – 02 September 2020, 14:45:27 Thanks, it looks like just adding --no-process-group works. I'll push an update soon.
Re: Samba S6 cannot run as a service Reply #7 – 03 September 2020, 05:11:27 works great. thanks for fix and adding logs as well.btw, how do you "recompile" after making changes to services?
Re: [SOLVED] Samba S6 cannot run as a service Reply #8 – 03 September 2020, 14:52:28 Well all of the steps are a little complicated but you can always just directly execute libalpm script to do it (sh /usr/share/libalpm/scripts/s6-rc-db-update-hook). It compiles a new databases, updates you to that new database, and also recreates any old bundles you made.