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.

Bandwidth always '0'

Discussion in 'General Discussion' started by htremblay, Aug 14, 2005.

  1. htremblay

    htremblay Member

    Joined:
    Aug 27, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Since my last update of cpanel (to version 10.2.0-S83), the bandwidth usage is always : Bandwidth usage 0.00.

    But in WHM, I can see the real (and right) usage.

    Any ideas how to correct this problem?

    Regards.
     
  2. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Seeing the same thing on R82.
     
  3. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    We isolated the problem on the two particular servers for which we had the issue (not sure why only two of them had the issue). For some reason the /var/cpanel/bandwidth/ directory was missing execute privileges. If yours is as well, simply chmod 711 that directory (returns it back to the defaults it should have [based on our other servers at least]). We also found that the group ownership on our other server was the wheel group but on these two server it was root, so we went ahead and set the group ownership over to wheel as well. Once we made those changes, the user's cPanel interface started showing the bandwidth number properly.
     
    #3 jsteel, Aug 15, 2005
    Last edited: Aug 15, 2005
  4. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    We'll scrap that.

    cPanel staff: Pay attention to this... it's a problem!

    Something keeps resetting it back to 640 now!! right back to where we started.

    Interesting thing is these two servers are also the two that seem to keep having their license files expire, even though they aren't (something that we've had a ticket opened on for ages). Something certainly seems to be amiss on these two servers.
     
  5. htremblay

    htremblay Member

    Joined:
    Aug 27, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    The chmod works fine fine for me. Thanks for the help.
     
  6. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Just wait until cpanellogd runs again. We think we've found the cause; waiting to confirm.
     
  7. htremblay

    htremblay Member

    Joined:
    Aug 27, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    ... cpanellogd reset them to 0.
    :eek:
     
  8. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    I'm assuming the problem goes away with EDGE or CURRENT?
     
  9. bbailey

    bbailey Registered

    Joined:
    Aug 10, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Atlanta, GA
    This problem seems to happen on our servers if there are any users in /etc/passwd with a UID over 99 and a home directory of just "/". If there is such a user, cpanellogd will create files such as /var/cpanel/bandwidth/-all.rrd and /var/cpanel/bandwidth/-ftp.rrd. Eventually it does a "chmod 640 /var/cpanel/bandwidth//", which is what breaks the bandwidth stats for customers. The problem can be confirmed by checking /usr/local/cpanel/logs/stats_log, which will have errors such as "Unable to get uid/gid" and "Processing exim stats for /....cannot get file lock on /var/cpanel/bandwidth//".

    In our case, changing the user's home directory from / to a subdirectory of /home has resolved the issue. Whether the directory exists or not does not matter. We had a monitoring package that runs as an unprivileged user, and for whatever reason, the RPM set up that user with a different homedir on two machines than it did on all our others; at any rate, that isn't cpanel's problem, but it shouldn't break cpanel, either.

    Running CURRENT or EDGE is not an option for us, so I can't tell you if you've fixed it yet, but the problem in the script itself is in the foreach block that starts on line 385 in the scanlogs sub definition. As the loop iterates through values of %LOGUSERS, it looks like $user ends up alternating between representing usernames and homedirs, and when it hits a user with a homedir of /, the checks to see if there's a corresponding file in /var/cpanel/users erroneously returns true, since /var/cpanel/users// does exist.
     
  10. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    Should be fixed in latest Edge and Current builds.
     
Loading...

Share This Page