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.

log archives mis-named since "rndc" update

Discussion in 'General Discussion' started by eliz_stapel, Sep 5, 2006.

  1. eliz_stapel

    eliz_stapel Member

    Joined:
    Sep 5, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    As has been discussed recently here and elsewhere, the latest back-end cPanel update caused problems on many servers. The problems manifested themselves as failures in "bind" and "named", and were related to the "rndc keys".

    While I was able to fix the "rndc" issue, I have since that time been experiencing a minor, but annoying, problem with my logfiles.

    My site gets enough traffic that we archive and download our logfiles daily, deleting that day's archive from the server. Once my host had done the cPanel update (on 27 August) and I had fixed the "rndc" issue through SSH, I discovered that the daily archives were being mis-named:

    The information within the logs is accurate, but, for instance, the archive created on 29 August (containing the logging data for 28 August) was titled "mydomain.tld-Jul-2006.gz". Naturally, being a file containing data from and having been compiled within August, the archive should have been titled "mydomain.tld-Aug-2006.gz". That is, cPanel should have named the archive in the manner in which it has been naming the logfiles for as many years as I have used cPanel.

    It took the better part of a week to convince Support that this mis-naming was neither helpful nor customary behavior. Support says that it contacted cPanel support, and has twiddled with a subroutine within one script. Support therefore regards the issue as being "fixed", even though the mis-naming continues unaffected. So I'm looking elsewhere for assistance.

    Is anybody else encountering this behavior? Even if not, I would appreciate advice on where to look (for instance, script names and line numbers) for the problem's source. Any relevant URL's would also be appreciated.

    Thank you for your time.

    Eliz.
    ___________________
    Edit: Correcting spelling.
     
    #1 eliz_stapel, Sep 5, 2006
    Last edited: Sep 5, 2006
  2. eliz_stapel

    eliz_stapel Member

    Joined:
    Sep 5, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    FYI: I fixed the "rndc" issue by following the instructions within the following thread:


    Is there anything within those instructions which might have led to the log archive mis-naming problem?

    Thank you.

    Eliz.
     
  3. eliz_stapel

    eliz_stapel Member

    Joined:
    Sep 5, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Another question: Starting in line 69 of the /usr/local/cpanel/cpanelllogd file, I found the following:

    Code:
    my %MoY = ( 'Jan' => 0, 'Feb' => 1, 'Mar' => 2, 'Apr' => 3, 'May' => 4,
                'Jun' => 5, 'Jul' => 6, 'Aug' => 7, 'Sep' => 8, 'Oct' => 9,
                'Nov' => 10, 'Dec' => 11 );
    But elsewhere in the code (for instance, for assigning February an expected length of 28 days unless it's a leap year), it appears that the months are supposed to be numbered in the usual way, with January being month 1, etc.

    Might the mis-naming problem lie in the above snippet?

    Thank you.

    Eliz.
     
  4. eliz_stapel

    eliz_stapel Member

    Joined:
    Sep 5, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I don't know which part of what I did that fixed the problem, but I took the following steps:

    • log into VPS account via SSH
    • open /usr/local/cpanel/cpanellogd in "nano"
    • in lines 69-71, change:
      Code:
      my %MoY = ( 'Jan' => 0, 'Feb' => 1, 'Mar' => 2, 'Apr' => 3, 'May' => 4,
                  'Jun' => 5, 'Jul' => 6, 'Aug' => 7, 'Sep' => 8, 'Oct' => 9,
                  'Nov' => 10, 'Dec' => 11 );
      ...to:
      Code:
      my %MoY = ( 'Jan' => 1, 'Feb' => 2, 'Mar' => 3, 'Apr' => 4, 'May' => 5,
                  'Jun' => 6, 'Jul' => 7, 'Aug' => 8, 'Sep' => 9, 'Oct' => 10,
                  'Nov' => 11, 'Dec' => 12 );
    • in lines 2287 and 2297, change "$lastmonth" to "$txtmonth"

    Then I executed the following commands:

    rm -f ~username/tmp/lastrun

    killall -9 cpanellogd

    /usr/local/cpanel/cpanellogd

    ...where "username" was one of the two accounts on the VPS account.

    I don't know what the first command did, if anything. The second command stopped cpanellogd, I would guess, and the third got it going again, thus forcing cPanel to "see" the changes I'd made.

    The upshot is that now the daily logfile archives have sensible file names.

    Eliz.
     
Loading...

Share This Page