Skip to main content

Cloning to new AWS Instance - IP Problem...

Comments

14 comments

  • ffeingol
    Did you change the IP at the OS level? Did you run the WHM IP Migration Wizard after changing the IP?
    0
  • JohnnyBgood
    Hi, i did the following: 1. Home " IP Functions " IP Migration Wizard 2. Home " Server Configuration " Basic WebHost Manager 3. Home " DNS Functions " DNS Zone Manager 4. ifconfig -a (Result is fine - it was updated by aws i asume) In my whm - everything looks fine, i cannot see any reference to the old IP, the cpanel licence is valid. The issue is when I go to the
    0
  • ffeingol
    Everything you described sounds like the correct steps. I'd suggest just opening a cPanel support ticket. That will more than likely be a lot quicker resolution than we we can offer here.
    0
  • cPRex Jurassic Moderator
    For these issues it is often best to open a ticket as seeing the network configuration in real-time often gives us the details we need to help much faster than trying to work through a forums thread.
    0
  • JohnnyBgood
    Thanks for the help - I"ve put in a support ticket.
    0
  • cPRex Jurassic Moderator
    If you have the ticket number I'd be happy to follow along if you could post that.
    0
  • JohnnyBgood
    Thanks! The ticket number was #94104525 and Anthony managed to resolved the issue for me. He couldn"t find the reason for the problem, but he did give me the steps he took to fix the issue. For anyone else that may have this issue in the future, these are the steps: What I did is run the following steps to re-migrate the internal IP and make sure that it was configured properly.
    • Run IP Migration Wizard
    • Use the internal IP in the "new IPs" box
    • Click Continue
    • Confirm that "Old IP" is the incorrect external IP that Apache is configured for, and that "New IP" is the correct internal one it should be using
    • Click Continue
    • Click Continue on the "modify your servers" configuration files" page
    • The wizard should now have output that the Apache and cPanel config files were updated correctly, however DO NOT click continue on this page as it will modify the DNS if you do.
    • Since the cPanel configuration is now correct, we can rebuild Apache with /scripts/rebuildhttpdconf to use the internal IP in Apache
    • Now we need to abort the IP Migration Wizard as it will otherwise try to continue from where you left off
    • To fully abort, ensure the following files are removed from the system:
    • /var/cpanel/ipmigrate
    • /var/cpanel/useripmigratemap
    • /var/cpanel/ipmigscrip
    • /var/cpanel/ipmigratelock
    • /var/cpanel/postipmigrate
    Completely beyond what I would have ever thought to try! I"ve got to try and repeat the process now to setup our 3rd instance for our 3 servers to use aws elastic load balancing.
    0
  • cPRex Jurassic Moderator
    Those are the steps we use when the NAT configuration is broken on the system, as that avoids getting the private IP written to all the DNS zones on the system. I'm glad that's all it took!
    0
  • ffeingol
    And now that you have given all the details, it makes more sense. I've only dealt with LightSail instances (but I assume all of Amazon is like this) and the VPS's appeared to only have private IP's with some sort of NAT or firewall in front of them.
    0
  • jaxtheking
    I just followed the procedure here and I can confirm it worked perfectly. Upon inspection, I did find the old private IP still showed in the following files:
    • etc/hosts
    • etc/ips.dnsmaster
    • var/cpanel/cpnat (the IP was also incorrect in the 'Show or Delete Current IP Addresses' table in WHM)
    I believe ips.dnsmaster is no longer being used. I run /scripts/build_cpnat to correct the cpnat file and manually edited the hosts file. Was this necessary? Everything seemed to work already, but I'd appreciate your advice.
    0
  • cPRex Jurassic Moderator
    @jaxtheking - that sounds right to me!
    0
  • jaxtheking
    If I may make one remark... with the rise in popularity of hosting cPanel on Amazon Lightsail, I'm ready to bet quite a lot of people is or has struggled with this task. Never mind adding a feature to WHM which handles this task but at least it'd be great to see an article on the cPanel Support microsite which quickly details the steps to fix the internal IP after cloning an AWS instance.
    0
  • cPRex Jurassic Moderator
    The problem with that is that we don't have control over the AWS side of things, so we wouldn't get a notification if the process changes, nor do we have a way to confirm the process would work for all users and environments.
    0
  • Cityhues
    Thanks! The ticket number was #94104525 and Anthony managed to resolved the issue for me. He couldn"t find the reason for the problem, but he did give me the steps he took to fix the issue. For anyone else that may have this issue in the future, these are the steps: What I did is run the following steps to re-migrate the internal IP and make sure that it was configured properly.
    • Run IP Migration Wizard
    • Use the internal IP in the "new IPs" box
    • Click Continue
    • Confirm that "Old IP" is the incorrect external IP that Apache is configured for, and that "New IP" is the correct internal one it should be using
    • Click Continue
    • Click Continue on the "modify your servers" configuration files" page
    • The wizard should now have output that the Apache and cPanel config files were updated correctly, however DO NOT click continue on this page as it will modify the DNS if you do.
    • Since the cPanel configuration is now correct, we can rebuild Apache with /scripts/rebuildhttpdconf to use the internal IP in Apache
    • Now we need to abort the IP Migration Wizard as it will otherwise try to continue from where you left off
    • To fully abort, ensure the following files are removed from the system:
    • /var/cpanel/ipmigrate
    • /var/cpanel/useripmigratemap
    • /var/cpanel/ipmigscrip
    • /var/cpanel/ipmigratelock
    • /var/cpanel/postipmigrate
    Completely beyond what I would have ever thought to try! I"ve got to try and repeat the process now to setup our 3rd instance for our 3 servers to use aws elastic load balancing.

    Well .. after about 6 hours messing with the exact same issue, as I tried to upgrade a Lightsail instance .. this procedures resolved my problem. I wish the resolution had been easier to find - it would have saved me a bunch of time.
    0

Please sign in to leave a comment.