[PATCH] enable logging for early startup failures

Stefan Metzmacher metze at samba.org
Wed Apr 17 12:53:49 UTC 2019

Am 17.04.19 um 14:21 schrieb Ralph Wuerthner via samba-technical:
> On 17.04.19 12:51, Ralph Wuerthner via samba-technical wrote:
>> On 16.04.19 14:20, Stefan Metzmacher wrote:
>>> Hi Ralph,
>>>> Please see attached patch to enable logging in smbd & winbindd for
>>>> early
>>>> startup failures. This is quite useful for example when running a
>>>> clustered Samba and smbd/winbindd are failing because a connection to
>>>> CTDB cannot be established. Currently smbd/winbindd are just failing
>>>> without any error messages. With the patch applied such errors will be
>>>> logged via syslog:
>>>> winbindd[27916]: [2019/04/04 14:31:10.240311,  0]
>>>> ../../source3/winbindd/winbindd.c:1773(main)
>>>> winbindd[27916]:   winbindd version 4.11.0pre1-DEVELOPERBUILD started.
>>>> winbindd[27916]:   Copyright Andrew Tridgell and the Samba Team
>>>> 1992-2019
>>>> winbindd[27916]: [2019/04/04 14:31:10.240641,  0]
>>>> ../../source3/lib/ctdbd_conn.c:532(ctdbd_init_connection)
>>>> winbindd[27916]:   ctdbd_init_connection:
>>>> ctdbd_init_connection_internal
>>>> failed (No such file or directory)
>>>> winbindd[27916]: [2019/04/04 14:31:10.240758,  0]
>>>> ../../source3/lib/util_cluster.c:34(cluster_probe_ok)
>>>> winbindd[27916]:   clustering=yes but ctdbd connect failed: No such
>>>> file
>>>> or directory
>>>> In addition the version and copyright information for winbindd are now
>>>> captured - previously this message was lost.
>>> Do you know with what change this got lost?
>>> This used to appear in the log files and recently noticed that this
>>> information isn't available anymore (at least in 4.7), but it was
>>> there before (at least in 3.6)
>>> For 'samba' it's still here, but smbd and winbind (and I guess nmbd)
>>> don't print it into the log file anymore.
>>> I think we should fix that and restore what we had before.
>>> Always using syslog (even if it's not configured) seems wrong to me.
>>> metze
>> I did some research and the the patch set dee2b95..72f1a2a changed the
>> behavior. More precisely c89a33a07a 'debug: Use backends instead of
>> explicitly logging to syslog or file' disabled the startup messages.
>> To restore the original behavior it should be enough to call
>> debug_set_settings() with "file" as value for parameter
>> "logging_param". Please see attached patch set with this change in
>> patch #3.
> One more thing: to completely restore the old behavior we probably have
> to set the default value for "logging" to "file". Currently the default
> value is empty.

Can you specify what the original behavior was?

Was it logging to a file only? If I look at the code in 4.1 it seems to
me that we logged to syslog (if compiled with syslog support) and also
to the file (unless syslog only was configured).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190417/5b6b476a/signature.sig>

More information about the samba-technical mailing list