Fixing issues after load balancer setup
We had one droplet running Ubuntu 18.04 server previously. Now we created another droplet from the latest snapshot of the previous droplet. And then created a load balancer from these two droplets. After that we are facing two very serious issues :
- Once the older droplet is shutdown, our website can be accessed by the IP of the new droplet and not using domain name which is of no use since users will not access the site using IP. We created two A records, one pointing the domain to the new droplet’s IP and another one pointing the domain to the IP of of the load balancer. But it fails to resolve to the domain name in case the previous droplet is shut down. What else we need to do to fix the issue?
2.We access the previous droplet using ssh based login. Now we created a new public-private key pair and using DigitialOcean’s console, copied the content of the public key to the ~/.ssh/authorized_keys file of the new droplet. Still we cant access the new dropler using ssh. Error is : Permission denied (publickey). Which virtually makes the server inaccessible except login using new droplet’s console. From console we can access new server using username and password of the previous server. How to fix the issue so the we can login to the new droplet from the local machine(s).
Thanks in advance.