The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/scripts/upcp killing dovecot??

Discussion in 'General Discussion' started by CormoranTick, Jan 28, 2011.

  1. CormoranTick

    CormoranTick Registered

    Joined:
    Jan 28, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ontario, Canada
    I recently started getting alert emails from my server at 3am saying that dovecot wasn't running. It restarts the service and all is well, but every day around 3am dovecot kept dying. I checked the log files and /var/log/maillog reports this:

    This confused me because I am not running any type of NTP service on my server and the date shouldn't be spontaneously changing itself. After a little bit more checking I realized that /scripts/upcp was running right around 3am as well and that it's log file includes:

    I can't find anything else that would be running/doing anything at 3am that would cause a time change so my conclusion is that /scripts/upcp is doing it. The way I see it I have three choices:
    1. Do nothing and let dovecot die and restart every day at 3am
    2. Disable /scripts/upcp completely
    3. Stop /scripts/upcp from changing the time

    I don't know which is more ideal, but it would seem easy enough to comment out these lines in /scripts/upcp:

    Code:
    $output .= Cpanel::WHMAPI::setstatus('Setting Clock');
    $output .= Cpanel::WHMAPI::status_cmd( '/usr/bin/rdate', '-s', 'rdate.cpanel.net' );
    $output .= Cpanel::WHMAPI::setstatusdone();
    Has anyone encountered this before or does anyone know what the effects of commenting out these lines will be? Are there any other potential solutions?

    Thanks.
     
  2. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    745
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    The real problem is the server is losing time somewhere. As part of upcp rdate is run each day; as little as 5 seconds can cause dovecot to die. I recommend setting up a postupcp hook to restart dovecot, or simply enable server monitoring to take care of it each night.

    I personally have this problem on my VPS machines and ended up just switching over to courier, as it does not have this problem.

    Thanks!
     
  3. mikelegg

    mikelegg Well-Known Member

    Joined:
    Mar 29, 2005
    Messages:
    330
    Likes Received:
    0
    Trophy Points:
    16
    I recently fixed this problem by ensuring NTP was running properly. (See ntp.org: Home of the Network Time Protocol)

    NTP makes minor adjustments to your clock to slowly bring it into line with the reference clock that you configure.

    This in turn means that when upcp runs the rdate function the resulting time change is smaller and therefore less likely to upset Dovecot. (Dovecot seems to tolerate changes less than 5 seconds)
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page