Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Anacron job cron.daily

Discussion in 'Database Discussion' started by cgimickalo, Jan 9, 2014.

  1. cgimickalo

    cgimickalo Well-Known Member

    Joined:
    Apr 19, 2013
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    N.W. Iowa
    cPanel Access Level:
    Root Administrator
    I notice I just started getting these notices after the last Cpanel Stable update 11.40.01-9 when the daily cron runs:
    Code:
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    error: error running non-shared postrotate script for /var/lib/mysql/mysql_slowquery.log of '/var/lib/mysql/mysql_slowquery.log '
    
    I don't have any problems connecting at the command line w/mysqladmin and the root my.cnf file is configured properly too. Any suggestion would be appreciated as how to fix this.

    Thanks,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    575
    Likes Received:
    20
    Trophy Points:
    143
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You mentioned it was coming from the daily cron? I would check that first.
    You may have some plugin installed that is calling mysqladmin directly.

    # ls -al /etc/cron.daily
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cgimickalo

    cgimickalo Well-Known Member

    Joined:
    Apr 19, 2013
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    N.W. Iowa
    cPanel Access Level:
    Root Administrator
    no plug-ins installed that I know of. The cron.daily folder has been the same for some time this just started in the last couple of days.

    Mike
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    What specific cron jobs are you running in the /etc/cron.daily directory? Could you provide us with a list?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cgimickalo

    cgimickalo Well-Known Member

    Joined:
    Apr 19, 2013
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    N.W. Iowa
    cPanel Access Level:
    Root Administrator
    these are the files in the /etc/cron.daily folder:
    Code:
    logrotate*
    makewhatis.cron*
    mlocate.cron*
    prelink*
    readahead.cron*
    tmpwatch*
    
    one thing I did notice was the script modsecparse.pl was also in that folder, which it has been for some time and never caused any issues, I removed it and put it back in the /etc/cron.hourly folder. I believe the EasyApache puts it in there when it's run added Mod Security for Apache.

    Mike
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    The error is likely coming from the logrotate cron job based on the error message that you provided. Here is the content of that cron job on a test machine that I setup:

    Code:
    #!/bin/sh
    export TMPDIR=/var/spool/logrotate/tmp
    
    /usr/sbin/logrotate /etc/logrotate.conf >/dev/null 2>&1
    EXITVALUE=$?
    if [ $EXITVALUE != 0 ]; then
        /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    fi
    exit 0
    You may want to review the same file on your system to see if any additional entries are used to connect to MySQL and rotate the MySQL slow query log.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cgimickalo

    cgimickalo Well-Known Member

    Joined:
    Apr 19, 2013
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    N.W. Iowa
    cPanel Access Level:
    Root Administrator
    That was one of the first things I checked before posting, for multiple instances rotating that log file, none was found but I will check again. I don't think that's the problem though.

    That is the same logrotate cron file I have in the /etc/cron.daily folder

    Mike
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice