Samba information messages logged as Errors?

Status
Not open for further replies.

Brentnall

Dabbler
Joined
May 24, 2015
Messages
16
Ever since configuring a syslog server I have seen fair quantity of, what I would consider informational messages, hitting the syslog as ERROR severity.

A few examples:

Code:
16/11/2015 18:38,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49181) closed connection to service s1$
17/11/2015 18:53,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49180) closed connection to service s1$
17/11/2015 16:28,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliver-ubuntu (ipv4:192.168.1.12:39688) closed connection to service ROFLRepo
20/11/2015 18:47,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49178) closed connection to service s3$
21/11/2015 10:05,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49178) closed connection to service s2$
21/11/2015 01:54,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:52149) closed connection to service s4$
22/11/2015 23:19,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49179) closed connection to service s1$
22/11/2015 11:01,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49180) closed connection to service s1$
22/11/2015 09:05,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49184) closed connection to service s1$



Not a high priority issue, I agree, however it irks me greatly when trying to find real errors in my syslogs from multiple different devices.

These are clearly not errors. Shouldn't the these types of messages be communicated at a lower severity level?

I have found a similar discussion regarding this however it didn't seem to go anywhere:
https://forums.freenas.org/index.php?threads/can-it-really-be-considerated-as-an-error.22844/

Should I log a bug report or is this a Samba thing and therefore out of the control of Freenas?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Ever since configuring a syslog server I have seen fair quantity of, what I would consider informational messages, hitting the syslog as ERROR severity.

A few examples:

Code:
16/11/2015 18:38,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49181) closed connection to service s1$
17/11/2015 18:53,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49180) closed connection to service s1$
17/11/2015 16:28,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliver-ubuntu (ipv4:192.168.1.12:39688) closed connection to service ROFLRepo
20/11/2015 18:47,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49178) closed connection to service s3$
21/11/2015 10:05,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49178) closed connection to service s2$
21/11/2015 01:54,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:52149) closed connection to service s4$
22/11/2015 23:19,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49179) closed connection to service s1$
22/11/2015 11:01,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49180) closed connection to service s1$
22/11/2015 09:05,Error,192.168.1.103,STATUS=daemon 'smbd' finished starting up and ready to serve connectionsoliverspc (ipv4:192.168.1.60:49184) closed connection to service s1$



Not a high priority issue, I agree, however it irks me greatly when trying to find real errors in my syslogs from multiple different devices.

These are clearly not errors. Shouldn't the these types of messages be communicated at a lower severity level?

I have found a similar discussion regarding this however it didn't seem to go anywhere:
https://forums.freenas.org/index.php?threads/can-it-really-be-considerated-as-an-error.22844/

Should I log a bug report or is this a Samba thing and therefore out of the control of Freenas?

It's out of the control of FreeNAS. Code snippet from samba's "become_daemon.c"
Code:
_PUBLIC_ void daemon_ready(const char *daemon)
{
    if (daemon == NULL) {
        daemon = "Samba";
    }
#ifdef HAVE_SYSTEMD
    sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", daemon);
#endif
    DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve connections", daemon));

As you can see it's flagged in samba as having a debug level zero, which is hard-coded in samba to map to syslog "LOG_ERR". In principle you can modify the logging level of samba to prevent logging of the "debug class" associated with the message. Unfortunately, I'm not sure what debug class it falls under (and you may potentially exclude useful information with this).

I'd say the best course of action may be to file a bug report. The fix is literally a one character change in the samba source. I know that they made a similar change to reduce samba log spam in the past. I believe changing the last line to
Code:
DEBUG(2, ("STATUS=daemon '%s' finished starting up and ready to serve connections", daemon));
will change it to map to "LOG_NOTICE"

If you decide to make a bug report, post a link to it here.
 
Last edited:

Brentnall

Dabbler
Joined
May 24, 2015
Messages
16
Thanks for the detailed response and confirmation Anodos, I thought that might be the case.
 
Status
Not open for further replies.
Top