Cannot establish database conenction after renaming a droplet

February 16, 2015 617 views

I have just renamed a droplet from 'domain' to '' and after that neither the web app nor roun cube's webmail would connect to the database.

What could be wrong?

Current kernel is: Ubuntu 14.04 x64 vmlinuz-3.13.0-43-generic
And it runs Vesta CP.

2 Answers

Depending on how its been renamed and what has changed, Its possible that you now have some form of name lookup issue.

Renaming the server can mean that the /etc/hosts file may of been updated with a loopback address in the domain for your site.

This can mean that the server rather than going to DNS for an IP address, its coming back with your loopback address based on the hosts file entry.

I have no idea if this makes sense to you, but if your scripts or server code or whatever has your domain name hardcoded and wanted to do a lookup, its possible that the loopback address is causing issues...

  • Thanks a lot.

    I have updated /etc/hosts and /etc/hostname files, accordingly:

    /etc/hosts: localhost


    hosts file has a comment on top the the system has configured 'manageetchosts' as True...

    What happens now is that after reboot the server, I have a full access to the website and mail server, but after one minute I once again lose access to the database.

Have another answer? Share your knowledge.