When I rename a site using either the rename-domain program or through the web UI under Manage Virtual Server > Change Domain Name, it appears to go through successfully. It displays the correct name in the UI and I can query information about the domain. However, when I check a few minutes later it’s reverted back to the original domain name.
I’m not able to replicate this every time a domain name is changed and haven’t been able to identify any differences in the domains that it happens for. If I try again once or twice most times it will stick.
We have multiple virtualmin servers and it’s happened on at least two of them. Any ideas where to start to look to troubleshoot this?
This is really odd. I’m still not able to consistently replicate this but when it happens the virtual hosts do not get reverted.
Example: I created domainnamechangetest.com then renamed it to testingstuff.com. It appears to go through successfully, but then I reload and virtualmin displays the old name. However, when I look in the httpd.conf I can still see the new testingstuff.com, at this point backups also start to fail because of “no Apache virtual host found”. If I look at the “Webmin Actions Log” I can see the change from domainnamechangetest.com to testingstuff.com but no records of it changing back.
It seems like a cosmetic caching issue. Where do you see it exactly? And does clicking the right side slider, cog icon (bottom right), and clearing the cache from the dropdown fix the issue?
This doesn’t seem to be just a display issue. Scheduled backups are also trying to backup the original domain name “domainnamechangetest.com” but seem to be failing because the virtual host is not found.
Creating backup for virtual server domainnamechangetest.com ..
Copying virtual server configuration ..
.. done
Backing up Cron jobs ..
.. none defined
Saving mail aliases ..
.. done
Saving mail and FTP users ..
.. done
Backing up mail and FTP user Cron jobs ..
.. none to backup
Backing up Dovecot control files ..
.. none found
Copying Apache virtual host configuration ..
.. no Apache virtual host found!
Copying SSL Apache virtual host configuration and certificate ..
.. no Apache virtual host found!
Copying Logrotate configuration ..
.. no log rotation configuration found for
Copying MySQL user details ..
.. done
Dumping MySQL database domainnamechangetest ..
.. done
Backing up Webmin ACL files ..
.. done
Backing up AWStats configuration file ..
.. no configuration file found!
Creating TAR file of home directory ..
.. done
.. completed in 5 seconds
I’m also seeing this issue occur. It appears that sometimes after a domain name change, (done through either remote.cgi or the UI) the “dom=” in the site config in /etc/webmin/virtual-server/ is not being updated with the new domain. Are the files in /etc/webmin/virtual-server/ read during backups? That might explain why backups are failing. This does not happen on every domain change - I’ve yet to find a way to consistently have this fail.
This sounds like a locking bug - if some other Virtualmin cron job or UI action modifies the same domain that’s being renamed, it could cause the domain file to be over-written with old data.