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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Show/Edit Reserved IPs Page Error

Discussion in 'User Experience' started by PeteS, Sep 2, 2017.

Tags:
  1. PeteS

    PeteS Active Member

    Joined:
    Jun 8, 2017
    Messages:
    31
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    WHM 66.0.17

    When clicking on Home »IP Functions »Show/Edit Reserved IPs I get six warnings or "A warning occurred while processing this directive. [show] [close]"

    Clicking show reveals the following (only the "line 8" line numbers differ between the 6 warnings):

    Use of uninitialized value $ip in hash element at /usr/local/cpanel/Cpanel/Ips.pm line 145, <$fh> line 8.
    at /usr/local/cpanel/Cpanel/Ips.pm line 145, <$fh> line 8.
    Cpanel::Ips::load_reserved_ip_reasons() called at whostmgr/bin/whostmgr.pl line 1212
    main::reservedip() called at whostmgr/bin/whostmgr.pl line 849

    This is new after some updates to WHM, but I can't say whether it was there prior to 66 or not, but I know it wasn't there in earlier 64 versions. (It's been a while since I used this area.)
     
  2. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    96
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Have you tried forcing an update through WHM > cPanel > Upgrade to Latest Version? Make sure "Force a reinstall even if the system is up to date" is checked.
     
  3. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    301
    Likes Received:
    88
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I am seeing exactly the same error as described above (repeated 4 times).

    Additionally, not all the IP's that I have on the box are being shown after I close the 4 warnings - I can see all the IP's fine in Show or Delete Current IP Addresses and in Show IP Address Usage

    Further tests also showed issues with the Change Sites IP Address that do not show any of the 5 available IPs on the drop-down.

    My system is completely up-to date to 66.0.17, and yes, I have tried an upcp using the force option which completed with no errors.....and yes, I have Rebuilt the IP Address Pool which returned 0 (zero) free IPs even though I have 5 free IPs on the box which can be seen in Show IP Address Usage and in Show or Delete Current IP Addresses

    Bug reported Request ID is: 8836207
     
    #3 rpvw, Sep 2, 2017
    Last edited: Sep 2, 2017
  4. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    301
    Likes Received:
    88
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    cPanel support found blank entries in the reserved IP's reason config file:

    /etc/reservedipreasons

    Removing the blank lines eliminated the warnings.

    The other errors I was seeing are unrelated.
     
    cPanelMichael likes this.
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,372
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I can reproduce this issue by adding a blank line to the /etc/reservedipreasons file, however I'm unable to reproduce a scenario where any cPanel/WHM actions result in that blank line. Do you happen to know if that file was manually edited at some point on the system, or if any third-party applications are installed that would modify that file?

    Thank you.
     
  6. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    301
    Likes Received:
    88
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    The /etc/reservedipreasons was never manually edited, nor is there any 3rd party software installed (as far as I am aware) that would change the file - we only run cloudlinux with CageFS, Softaculous, csf and cmc

    Now it is entirely possible that the file has had the spaces in from when the server was migrated (July 2015) following a raid disk failure that obliged us to commission a new server and migrate to it before all data got corrupted.

    As far as I can remember, and I probably have not looked at the reserved IP's UI since we configured this server to migrate to, it was only this thread, and the fact that I had so recently upgraded to v66 that prompted me to go and look, there never used to be any problems with it, but it is always possible one or other upgrade provoked the warnings we saw - I just have no idea which upgrade might be the culprit :(

    Sorry I can't be more specific in helping to pin this down. Perhaps PeteS can contribute more specific data.
     
    #6 rpvw, Sep 6, 2017
    Last edited: Sep 6, 2017
  7. PeteS

    PeteS Active Member

    Joined:
    Jun 8, 2017
    Messages:
    31
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    Sorry to be away for so long!

    Thank you rpvw for all the input and help! The blank lines are the problem. I checked /etc/reservedipreasons and there were 8 lines, 6 were blank. Line 1 and 5 had the data for the 2 reserves reasons I had placed there previously, and lines 2, 3, 4, 6, 7, and 8 were blank (those line numbers corresponding to the line numbers in the 6 error messages I was getting. See my solution below.

    Our findings are identical except for the issue you reported of showing zero available IPs. I have 5, use/reserve 3, it shows 2 available.

    My case is the same as rpvw. No manually editing, nor by other plugins, etc. Everything done through WHM. This problem showed sometime between 64 ans 66, as I stated initially. I'm sorry I don't know more precisely when/which update caused this.

    My solution, rather than manually edit the file was to close the errors (so I could scroll down the page) remove the 2 reasons and save. (I wish now I had first tried to edit one of them, to see what that would do.) The error were gone. Then I replaced the 2 reserve comments, identically, and saved. Still no errors, and of course, no blank lines in the file.
     
  8. PeteS

    PeteS Active Member

    Joined:
    Jun 8, 2017
    Messages:
    31
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    cPanelMichael? Any comment or followup on the cause of this?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,372
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm not able to reproduce a scenario where blank lines are populated in the /etc/reservedipreasons file through any actions in cPanel & WHM. It's possible this relates to behavior that no longer occurs in newer versions of cPanel. Removing the blank lines in this file will solve the issue, however feel free to let us know if you can reproduce this, or if you notice blank lines continue to populate this file going forward.

    Thank you.
     
  10. PeteS

    PeteS Active Member

    Joined:
    Jun 8, 2017
    Messages:
    31
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    Will do. I must have been a bug in a previous version.

    I can tell you with certainty that the file was never manually modified, and that the error must have induced into the file by some action unrelated to this function since I set my reserves up a few months ago without issue, and have not returned to this function since then.

    Thanks.
     
Loading...

Share This Page