Transfer tool, websites not loading and EC2 (AWS)

jacksmith

Registered
Apr 9, 2020
2
1
3
UK
cPanel Access Level
Root Administrator
Hi All,

Firstly apologies if I am posting to the wrong group. I searched all the existing articles I could find, but no luck on an answer.

We have an existing EC2 server with WHM/cPanel on AWS. This has worked fine for many years, but we needed to upgrade the O/S, PHP versions etc and after some provisional work on a copy of live, it was decided a clean installation + transfer tool was the safest way to go. The goal was to set up the new server then move the existing elastic IP - job done.

Original server public IP x.x.x.{original} and internal IP 10.0.0.{original}. The public IP is an elastic IP.
New server public IP x.x.x.{new} and internal IP 10.0.0.{new}. The public IP is an elastic IP.

Following these instructions How to Move All cPanel Accounts from One Server to Another | cPanel & WHM Documentation

I spun up a new EC2 instance, updated, installed WHM/cPanel on AWS and transferred everything using the transfer tool (except for bandwidth data). Custom nameservers were set up pointing to public IP x.x.x.{original}. Everything went fine.

The one mistake I made was using public IP x.x.x.{new} in the basic setup so all DNS entires had public IP x.x.x.{new}. I changed this to public IP x.x.x.{original} and then transferred everything again. That again went fine. DNS entries correctly showed public IP x.x.x.{original}

Now the problem:

The cpanel docs imply that on the new server the internal IP 10.0.0.{new} should be changed to the old internal IP 10.0.0.{original}, from what I can see this is not possible/allowable with AWS. I also didn't think this would be an issue because cpanel cleverly remaps the internal IP and public IP via NAT, and worst case its a license transfer with cpanel (I'm still on the grace period).

Changing the elastic public IP x.x.x.{original} to the new server, internal IP 10.0.0.{new} resulted in all domain names failing to resolve. My assumption (clearly incorrect) was that if the new server had the same DNS entries as the old server and everything had been transferred across, it was effectively a copy of the old server, with upgraded O/S, PHP etc -- transferring the elastic IP should work smoothly (yes there might be some PHP errors, but they could be resolved ... I also installed the old PHP version on the new server in case it was needed)

The only obvious issues I could think of was:
  1. My original mistake setting the wrong public IP (x.x.x.{new} instead of x.x.x.{original}) might have written something somewhere I don't know about
  2. The apache settings were different, but according to the documentation the transfer tool should have taken care of that.
Is anyone able to provide any advice on what to check/correct to get this working?

Many thanks in advance,
Jack
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,254
313
Houston
The cpanel docs imply that on the new server the internal IP 10.0.0.{new} should be changed to the old internal IP 10.0.0.{original}, from what I can see this is not possible/allowable with AWS. I also didn't think this would be an issue because cpanel cleverly remaps the internal IP and public IP via NAT, and worst case its a license transfer with cpanel (I'm still on the grace period).
THat's totally fine the docs assume you're doing an IP Swap and you're going to proceed with the old IP address. It shouldn't be an issue as you'll just need to update your license for the new license. This is noted near the top of the documentation:
Note:
This procedure assumes that your server’s IP addresses are portable, and that you can migrate them from the old server to the new server. If you use a third-party data center or hosting provider for your cPanel & WHM server, contact them to confirm that you can migrate your IP addresses.
The apache settings were different, but according to the documentation the transfer tool should have taken care of that.
The documentation doesn't note that the Apache configuration will be transferred. It notes the following:

Make certain that you copy your cPanel accounts’ Apache configuration to the new server. To do so, follow the steps in our Customize Your Installation documentation.
Also:

Important:
As of cPanel & WHM version 56, WHM’s Transfer Tool interface (WHM >> Home >> Transfers >> Transfer Tool) allows you to transfer the following service configurations:
  • Backups
  • cPanel & WHM (whmconf)
  • EasyApache
  • Exim
  • MySQL and PostgreSQL databases
  • User interface themes
Make certain that you transfer each account’s EasyApache configurations, or your websites may experience issues.
Now, without information on why the sites aren't loading, I can't tell you if performing any of these actions will resolve the issue, do you have errors that may indicate whet the specific issue is?

None of these are the Apache settings though, I completely understand how misleading this is and I'm requesting that the documentation be updated. If you want to transfer configurations that weren't moved by the transfer tool like the apache configuration settings themselves you can use the following: The cpconftool Script | cPanel & WHM Documentation
 

jacksmith

Registered
Apr 9, 2020
2
1
3
UK
cPanel Access Level
Root Administrator
Hi,

Thanks for the reply. I ultimately got it sorted with help from cpanel technical support. For reference the solution was:

1. Ensure that NEW server has SAME IP ADDRESS SPECIFIED in basic setup as ORIGINAL server (x.x.x.{original}
2. Run transfer tool to import all accounts (this imports the DNS zones with the x.x.x.{original} IP address)
3. Run IP Migration tool PART-WAY ONLY (otherwise it will change DNS zones to the x.x.x.{new} elastic IP), specify the INTERNAL IP of NEW SERVER (eg. 10.0.0.{new}) - run up to and including continue on the "modify your servers’ configuration files" page. *** DO NOT RUN FURTHER *** (if you do you need to delete the accounts and reimport with the transfer tool)
4. Next run /scripts/rebuildhttpdconf
5. Next, delete the following files (ignore any 'does not exist's):
/var/cpanel/ipmigrate
/var/cpanel/useripmigratemap
/var/cpanel/ipmigscript
/var/cpanel/ipmigratelock
/var/cpanel/postipmigrate

This leaves the server as x.x.x.{original} and 10.0.0.{new}

From here the x.x.x.{original} elastic IP can be moved across, most sites should not be interrupted but give it about a day for the cpanel license to automatically update.

Thanks again for the reply!
 
  • Like
Reactions: cPanelLauren