Forums

Resolved
0 votes
Hi,

i have the Problem, that clearsync restarts smb once in a while, but the conf files are not changed. This is very annoing, because some programs lose connection and data.

In var/log/secure i find corresponding to the entry in smb.log's smb-start entry something like:

hinsys sudo: clearsync : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/service smb condrestart 


is there a logfile for clearsync?


Hope someone can help me,

Arne


... i just found out, that a file in var/log was changed by one of my scripts just seconds beforethe smb restart happens. maybe this is a problem. I will remove that and see what happens.
Tuesday, February 18 2014, 06:30 PM
Share this post:
Responses (9)
  • Accepted Answer

    Wednesday, February 19 2014, 08:47 PM - #Permalink
    Resolved
    0 votes
    Arne Hinniger wrote:
    changing the action to

     /sbin/service samba reload 


    seems to fix the problem

    That's good to know... thanks! We'll certainly make that change too.

    PS: Back in the good old times, ther was no need to restart Samba in order to see new printers, that happened every 5 or somethin minutes. Did that change?

    That 5 minutes might still be the case, but that's 4 minutes and 59 seconds too long. Inevitably, an end user will add a printer and immediately check network. If the printer is not there, the end user gets ... unhappy, confused, etc.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 19 2014, 12:59 PM - #Permalink
    Resolved
    0 votes
    Hi,

    changing the action to

     /sbin/service samba reload 


    seems to fix the problem

    the connection is not deactivated. :cheer:

    Yours Arne


    PS: Back in the good old times, ther was no need to restart Samba in order to see new printers, that happened every 5 or somethin minutes. Did that change?
    The reply is currently minimized Show
  • Accepted Answer

    georger
    georger
    Offline
    Wednesday, February 19 2014, 01:59 AM - #Permalink
    Resolved
    0 votes
    Peter Baldwin wrote:
    Hi Arne,

    When the /etc/cups/printers.conf file is changed, that too triggers a Samba restart. Without a restart, new printers configured via the CUPS interface won't appear in the Samba shares system. Is the printers.conf file changing!?

    Hi Peter,
    It is enough to reload Samba when a printer is added in CUPS. There is no need to restart it.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 18 2014, 08:54 PM - #Permalink
    Resolved
    0 votes
    Hi Peter,

    thanks for your help, i followed your advice ;).

    I wasn't aware the printer.conf was changed, but now was able to reproduce it... Maybe there is some configuration in cupsd.conf possible.

    Arne
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 18 2014, 08:20 PM - #Permalink
    Resolved
    0 votes
    Thanks for the details. I have added another tracker item for this issue. Instead of disabling clearsync, it would be better to move the "/etc/clearsync.d/filewatch-samba-printing.conf" out of the way. Clearsync provides an event system for ClearOS and it's a requirement for some apps. For example:

    - When a new network card is added, it triggers a "network configuration" event. Apps like Samba, Intrusion Detection, and others are notified of the change.

    Some of these events are quite important so clearsync shouldn't be disabled.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 18 2014, 08:06 PM - #Permalink
    Resolved
    0 votes
    Hi Arne,

    When the /etc/cups/printers.conf file is changed, that too triggers a Samba restart. Without a restart, new printers configured via the CUPS interface won't appear in the Samba shares system. Is the printers.conf file changing!?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 18 2014, 08:05 PM - #Permalink
    Resolved
    0 votes
    Hi Peter,

    ... it seems that the /etc/cups/printers.conf is changed every time i print.. And afterwars the clearsync filewatch-samba-printing.conf finds it an restarts samba...

    At least the
    StateTime

    and
    Attribute marker-change-time


    are changed every time i print...

    I'll keep the clearsync service stopped until there is a solution.

    Thanks for your help...

    Arne
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 18 2014, 07:42 PM - #Permalink
    Resolved
    0 votes
    Hi Peter,

    As i now encountered the problem closes down. It happens when a pdf-file is send via cups to the printer or cservice cups is restarted..

    Does clearsync resstart smb when cups printig or restarted with a changed configuration?


    Yours Arne

    ... I'll try to modify the clearsync samba-file to the diles you pointed aut, but none of the files in /etc/samba are changed...
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 18 2014, 07:00 PM - #Permalink
    Resolved
    0 votes
    Hello Arne,

    The Samba app will restart when it detects a change in a /etc/samba configuration file. That's actually a bit heavy handed - Samba should only restart when it detects a change in the /etc/samba/smb.ldap.conf or /etc/samba/smb.winbind.conf files. These two Samba "configlet" files contain the LDAP settings that very rarely change. In fact, the only time it changes is when the LDAP directory base domain is changed.

    I have added this as a cleanup item in the tracker!
    The reply is currently minimized Show
Your Reply