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.

MRTG errors after upcp

Discussion in 'General Discussion' started by sneader, Mar 21, 2013.

  1. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    After last night's upcp, some of our servers are sending error emails every 5 minutes, for example:

    In looking at the upcp logs, I see these interesting lines

    Spent some time Googling, consulting with others, and haven't got very far. Just curious if someone else out there has already seen and fixed this, before I beat myself up too hard.

    As a data point, MRTG does seem to still be functioning... just concerned about the errors every 5 minutes.

    - Scott
     
  2. PenguinInternet

    PenguinInternet Well-Known Member
    PartnerNOC

    Joined:
    Jun 20, 2007
    Messages:
    149
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Cardiff, UK
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    At a guess I'd say that you've got mrtg running as a daemon and the upgrade to the mrtg RPM has added the mrtg cron process in to run every 5 minutes, hence the warning that it is already running - we've seen this pretty often on various servers. Just remove /etc/cron.d/mrtg if you do run mrtg as a daemon
     
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Thanks for the reply... I forgot to update this thread after finally figuring things out. Indeed you were correct, we had to remove /etc/cron.d/mrtg and restart mrtg. However, that did not stop all the other errors.

    I wound up upgrading to MRTG 2.17, which was a project in itself that I will outline below. That STILL didn't eliminate all the errors, but some Google-foo led me to a website that outlined some minor code changes to a couple MRTG perl files, and that finally made MRTG happy.

    Upgrading to MRTG 2.17 didn't work by just simply doing a "yum update mrtg", even after removing the * after perl from /etc/yum.conf. I wound up getting it via RepoForge, as follows:

    1. Make a backup copy of /etc/mrtg/mrtg.cfg
    2. Set up the RepoForge repository to get the more up-to-date package.
      Instructions for installing it are at Using RepoForge . Once it is installed, edit /etc/yum.repos.d/rpmforge.repo, and change any line that says "enabled = 1" to "enabled = 0" to make sure that the new repositories will never be used accidentally in situations where the regular repositories should be used.
    3. Remove the existing mrtg-libs package (this is necessary before installing the new mrtg package, because the libraries are built into the 2.17 package rather than being a separate package). "rpm -e mrtg-libs --nodeps" will do this.
    4. Install mrtg 2.17 with the following command "yum --enablerepo=rpmforge-extras update mrtg"
    5. Restore the backup of your mrtg.cfg file (if needed)

    After upgrading MRTG, I still needed to do some search/replace code changes as outlined at: https://odesk.by/archives/1169

    The "before" code didn't always match what we had, but I still went with the "after" code and it resolved the errors.

    Lastly, I had to remove /etc/cron.d/mrtg and restart mrtg with "service mrtg restart" No errors!

    - Scott
     
  4. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    After rebooting one of the servers that I made these changes to, MRTG would not start. Error message:

    After much Google-foo, I stumbled upon this 4 year old thread:

    #45 ([patch] ERROR Subroutine SNMPv1_Session::AF_INET6)

    I made changes to my config as shown under "comment4" and restarted MRTG and it worked! Basically I did this:

    1) Found 2 instances of "Socket6->import(qw(inet_pton getaddrinfo));"
    2) Changed them to: "Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));"

    MRTG is happy again.

    - Scott
     
  5. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Looks like the article I linked to is no longer visible. The edits I mention need to be done to /usr/lib64/mrtg2/SNMP_Session.pm

    - Scott
     
Loading...

Share This Page