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.

Munin Exim Error has started to occur

Discussion in 'cPanel Developers' started by jdstallings, Jun 19, 2006.

  1. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Exim reporting has stopped working on Munin. I noticed this started on the 17th of June. Here are the logs showing the error that is occuring.

    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    2006/06/17-13:30:02 CONNECT TCP Peer: "127.0.0.1:33041" Local: "127.0.0.1:4949"
    2006/06/17-13:30:04 Plugin "mailman" exited with status 768. ----
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    2006/06/17-13:35:01 CONNECT TCP Peer: "127.0.0.1:33123" Local: "127.0.0.1:4949"
    2006/06/17-13:35:04 Plugin "mailman" exited with status 768. ----
    mysqladmin: connect to server at 'localhost' failed

    Any help would be great! I was not able to find anything on the website for MUNIN.

    Thanks in advance!!!
     
  2. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    In looking MORE it seems I also lost all my information on SQL as well :rolleyes:
     
  3. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    For the plugins that do not work, go to /var/lib/munin/plugin-state/ and empty each non-working plugin state file.

    Code:
    cat /dev/null > appropriate_file
    you may need to do after that:

    Code:
    service munin-node restart
    This fixed the Exim stats for me. Now I also get

    Code:
    Plugin "mailman" exited with status 768
    If I find out how to fix this I will post here
     
  4. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Perfect!

    Thanks a million. That did the trick. If you find out about mailman, please let me know. Mine does not work either :eek:
     
  5. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    Well, to fix mailman, here is what I did:

    edit

    Code:
    /usr/share/munin/plugins/mailman
    At the beginning of the file find

    Code:
    else
    {
        $rotlogfile = $logfile . ".0";
    }
    
    change to

    Code:
    else
    {
        $rotlogfile = $logfile; # . ".0";
    }
    
    Done.


    Now I would really use some advice on what is the use of statistics like

    Code:
    Inode usage (in %)
    VMstat
    Interrupts & context switches
    Individual interrupts
    File table usage
    Inode table usage
    If some of these are not likely to be used, I guess disabling them will lower the load that munin creates on server (the load is equal to a busy website on my servers. but still I believe the rewards from having the graphs are much greater)
     
  6. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Mailman

    LOL... DUH... guess you just need to know where all the files are! It was not working cause it could not find the log file.. I removed the code and BING, I now have the file in /var/lib/munin/plugin-state. Just waiting to see if I see anything now.

    THanks!!

    Jim
     
  7. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Access denied

    Started getting these errors after a cpanel upgrade.. Joys...

    2006/06/22-18:15:01 CONNECT TCP Peer: "127.0.0.1:55145" Local: "127.0.0.1:4949"
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    Anyone have any clues?
     
  8. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    Uninstall munin, remove /var/lib/munin/, remove /var/log/munin, remove /usr/share/munin, install munin again, edit the mailman file again as described above.
     
  9. FvdM

    FvdM Member

    Joined:
    Feb 7, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I also had problems like this. First the exim_mailstats plugin worked perfectly fine and then suddenly for no reason it didn't. After reviewing and testing every part of the script I found out the compression during logratotion was the problem. This causes the rotated log files to end with .gz. Log files can't be parsed when they are archived, so the plugin won't try to find those. I fixed it by stopping the compression when logrotate runs:

    First fix the logrotation:

    Code:
    pico /etc/logrotate.d/exim
    In the editor you should see something like this:

    Code:
    /var/log/exim_mainlog {
        create 0640 mailnull mail
        compress
        postrotate
        /usr/bin/killall -HUP exim
        endscript
    }
    /var/log/exim_paniclog {
        missingok
        create 0640 mailnull mail
        compress
        postrotate
        /usr/bin/killall -HUP exim
        endscript
    }
    /var/log/exim_rejectlog {
        create 0640 mailnull mail
        compress
        postrotate
        /usr/bin/killall -HUP exim
        endscript
    }
    The exim_mailstats plugin only uses /var/log/exim_mainlog, so you don't need to edit the other two.
    Comment out or remove the line that says 'compress'.
    Save and exit.

    Unpack the logfiles:

    Code:
    gunzip /var/log/exim_mainlog*.gz
    Now it should work again :)
    You dont need to restart anything, the stats will be updated if munin-node is running.

    Note: if you have a lot of mailtraffic the exim_mainlog may grow large. The compression of the rotated logs reduced the diskspace, this won't happen anymore as compression has been disabled!
     
  10. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Very nice work!! Now only if we could figure out the SQL without haveing to install! :rolleyes:
     
  11. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Exim_Maillog

    I also noticed that it appears it does not handle rotation of the logs real well. I normally rotate my logs every week at the same time, and minun stops working at that time for Exim. If I do a "service minun-node restart" after the log rotation, it picks up again.

    I also need to go to /var/lib/munin/plugin-state/ and empty the exim non-working plugin state file.

    Hmmmm.... I wonder if not compressing JUST the .1 allows it to roll automatically to newest? I will have to try playing with that.

    Jim
     
  12. t9clkclnr

    t9clkclnr Well-Known Member

    Joined:
    Jun 11, 2004
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Southern California
    that got my installation working.
     

Share This Page