Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Samba S6 cannot run as a service (Read 1042 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Samba S6 cannot run as a service

- 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

Re: Samba S6 cannot run as a service

Reply #1
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
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
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
Okay, apparently it gives "Standard input is not a socket, assuming -D option". Very strange.


Re: Samba S6 cannot run as a service

Reply #6
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
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
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.