Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    5

    Red face log archives mis-named since "rndc" update

    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.
    Last edited by eliz_stapel; 09-05-2006 at 04:09 PM.

  2. #2
    Member
    Join Date
    Sep 2006
    Posts
    5

    Default

    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. #3
    Member
    Join Date
    Sep 2006
    Posts
    5

    Arrow

    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. #4
    Member
    Join Date
    Sep 2006
    Posts
    5

    Red face

    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.

Similar Threads & Tags
Similar threads

  1. Changed system files - No info in "New" or "Chaneg Log"
    By aquagerbil in forum New User Questions
    Replies: 3
    Last Post: 09-22-2010, 09:50 AM
  2. Named & rndc "FAILED" on startup
    By jap in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-12-2007, 01:03 AM
  3. Replies: 3
    Last Post: 09-10-2004, 09:58 AM
  4. Major update to my WHM "view log files" script
    By PWSowner in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-13-2004, 07:27 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube