Skip to main content

License using wrong ip

Comments

13 comments

  • cPRex Jurassic Moderator

    Hey there!  Can you try the details outlined here?

    https://support.cpanel.net/hc/en-us/articles/360052582833-How-to-change-the-primary-IP-of-a-cPanel-server

    cPanel will always use the main IP in the networking interface to make the license request, so adjusting that should take care of the issue.

    0
  • rhm.geerts

    Hello.

    Well.. unfortuntaly if I do that, exactly that is what makes things wrong.

    I do have the main ip in the basic webhost manager setup.

    When running the /scripts/mainipcheck things go definately wrong:

    [root@srv: /]# /scripts/mainipcheck
    info [mainipcheck] The Server's main IP address has changed from 1xx.xx.xx.19 to 1xx.xx.xx.15.
    The “/usr/local/cpanel/cpkeyclt” command (process 8395) reported error number 1 when it ended. at /scripts/mainipcheck line 210.
    info [mainipcheck] Scheduled SPF record update

    So that thing is even crippling the system more than doing any good.

    0
  • rhm.geerts

    And now I can't login anymore because it's the wrong license IP. ;)

    Ran the script again, and got correct main ip again, but I don't see my additional ip anymore. when I do an ip a or ifconfig.

    0
  • cPRex Jurassic Moderator

    Can you message cs@cpanel.net and say "license activation issues" in the subject so we can help?

    0
  • rhm.geerts

    Sure, will do.

    0
  • rhm.geerts

    Message send.

    0
  • cPRex Jurassic Moderator

    I've given that request a bit of priority on our side so you'll be hearing from someone soon.

    1
  • rhm.geerts

    That's great, thank you very much!

    0
  • cPRex Jurassic Moderator

    Sure thing!

    0
  • rhm.geerts

    Update!

    The cPanel tech guys (thank you!!) have checked around the server and discovered the issue is caused by some setting from the Hetzner datacenter.

    Specifically the prefix setting in the network configuration file.

    cPs# grep PREFIX /etc/sysconfig/network-scripts/ifcfg-eno1
    PREFIX=32

    This -can- cause any secondary ip added to act like primary ip, causing the issue mentioned.

    At this point it made our server even unreachable due to the fact the license has been activated too many times on different machines. Logical with the ip change every time.

    I'm sure that will be fixed as change also happened during ticket support so cPanel knows I'm not messing with licenses.

    However at least we have a root cause and now I'm having a conversation with Hetzner as to how we can solve this issue.

    Maybe some other Hetzner customer can tell us what the solution was, or otherwise I will update my post as soon as I get the solution from Hetzner myself.

    0
  • rhm.geerts

    I got an answer from Hetzner and for anybody encountering the same issue, this is the solution.

    In the ifcfg/eno1 (or whatever your nic is called) you have to change:

    PREFIX=21
    to
    NETMASK=255.255.255.255

    and then restart your network. Any additional ip you can then add either with 255.255.255.255 (advised by the network engineer) or the netmask given in the email.

    Be aware to also check your /etc/ips file, because that most likely at that point will containt a 255.255.255.192 netmask for the primary ip, which is in fact nowhere on the server.

    Change the 192 to 255 too and restart cpanel and network (or vps/server) and all should now work fine again without another ip broadcasting as main ip.

    This is specific to Hetzner servers, I can't guarantee it will also work on servers of other datacenters.

     

    0
  • cPRex Jurassic Moderator

    Interesting - I wonder why it wouldn't have been that way from the start, but I'm glad things are working well now!

    0
  • rhm.geerts

    Well wasn't working that way from the start because of the PREFIX=32 in the eno1 (eth0) file in the OS, according to cPanel techs.

    0

Please sign in to leave a comment.