Recently my domains have started showing as numbers, doing some research I found some other forum posts pointing me to the map.dom and map.alias files. I used the php-fpm config to determine the correct ID to domain mapping and fixed map.dom. Rebooting the server has had no effect in resolving the issue, this file seems to not be getting detected.
Upon performing a webmin config backup, I notice that there are a bunch of .acl files missing (relating to the missing domains).
My question, is there any way to easily rebuild all of this without having to recreate these domains?
I’ve asked @Jamie to follow up when he has time. But, I’m pretty confident there is discussion of this problem and ways to fix it in the forums somewhere. It’s come up a few times, though I really thought the bug that leads to it happening was fixed.
Yes, you would just have to recover those Virtualmin domains config files from a back up. Those are just records. If you have no backups the only way is to re-import each domain using Add Servers ⇾ Import Virtual Server page.
The cause could be filesystem corruption that is creating those zero length files? Webmin and Virtualmin themselves have checks that should prevent this from happening, even if the system is out of disk space.
Awesome! Thanks so much, I’ll try reimport tonight. I’ve used virtualmin for years and never encountered this issue, it’s a strange one and came out of nowhere. I’m avoiding the backup restore because they are so old as I didn’t detect the issue for a while so I don’t want to overwrite any DB’s or files.
Merry Christmas!
P.S. Regarding being covered in other topics, unfortunately I searched and only found 2 other articles that were unsolved. There may be others but I could not locate them.
You don’t have to restore the whole backup (and, I wouldn’t in this circumstance). The config files are in the backup, and the backup is just a tarball. You can untar/ungzip the backup file(s) and dig out the domain config files.
But, if your domains weren’t very customized from the defaults you’ve setup, re-importing is also fine.
@Joe What files from the backup do we need to restore to get this back? When I unzip the backup, I don’t see the files that are needed? I’m sorry for being so uninformed when it comes to this, but I don’t want to turn a partially working system into a non-functioning system. Maybe if you could post the steps and files to restore?
Here is what I get for files from the virtualmin backup (both of these are downloaded onto my mac first to look at the files easier):
drwx------@ 26 tage staff 832 Dec 26 12:09 .
drwx------@ 80 tage staff 2560 Dec 26 12:09 ..
-rw-r--r-- 1 tage staff 0 Nov 11 12:07 virtualmin_chroot
-rwx--x--x@ 1 tage staff 8833 Nov 2 13:39 virtualmin_config
-rw-r--r-- 1 tage staff 0 Nov 2 13:08 virtualmin_custom
-rw-r--r-- 1 tage staff 0 Nov 2 13:08 virtualmin_custom_linkcats
-rw-r--r-- 1 tage staff 0 Nov 2 13:08 virtualmin_custom_links
-rw-r--r-- 1 tage staff 0 Nov 11 12:07 virtualmin_custom_shells
-rw-r--r-- 1 tage staff 20480 Nov 11 12:07 virtualmin_email
-rw-r--r-- 1 tage staff 2 Nov 11 12:07 virtualmin_mailserver
-rw-r--r-- 1 tage staff 136 Nov 11 12:07 virtualmin_mailserver_dkim
-rwx------ 1 tage staff 1675 Sep 15 13:21 virtualmin_mailserver_dkimkey
-rw-r--r-- 1 tage staff 20 Nov 11 12:07 virtualmin_mailserver_grey
-rw-r--r-- 1 tage staff 9666 Sep 22 2016 virtualmin_mailserver_greyclients
-rw-r--r-- 1 tage staff 188 Sep 22 2016 virtualmin_mailserver_greyrecipients
-rw-r--r--@ 1 tage staff 28389 Nov 10 21:12 virtualmin_mailserver_maincf
-rw-r--r-- 1 tage staff 6343 Mar 26 2021 virtualmin_mailserver_mastercf
-rw-r--r-- 1 tage staff 20 Nov 11 12:07 virtualmin_mailserver_ratelimit
-rw-r----- 1 tage staff 5755 Aug 28 12:19 virtualmin_mailserver_ratelimitconfig
-rw-r--r-- 1 tage staff 10240 Nov 11 12:07 virtualmin_resellers
-rw-r--r-- 1 tage staff 10240 Nov 11 12:07 virtualmin_scheds
-rw-r--r-- 1 tage staff 10240 Nov 11 12:07 virtualmin_scripts
-rw-r--r--@ 1 tage staff 20480 Nov 11 12:07 virtualmin_templates
-rw-r--r-- 1 tage staff 0 Nov 2 13:08 virtualmin_templates_global
-rw-r--r-- 1 tage staff 10240 Nov 11 12:07 virtualmin_templates_plans
-rw-r--r--@ 1 tage staff 175104000 Nov 11 12:07 virtualmin_templates_skel_0
and here is what I get from a test domain backup unzipped:
drwx------@ 21 tage staff 672 Dec 26 12:08 .
drwx------@ 80 tage staff 2560 Dec 26 12:09 ..
-rw-r--r--@ 1 tage staff 6148 Dec 26 12:08 .DS_Store
-rw-r--r-- 1 tage staff 21 Jun 8 2021 .awstats-htpasswd
drwxrwxrwx 27 tage staff 864 Nov 11 11:41 .backup
-rw-r--r-- 1 tage staff 5 Nov 11 11:41 .backup.lock
-rw-r--r-- 1 tage staff 21 Jun 8 2021 .stats-htpasswd
-rw-r--r-- 1 tage staff 41 Nov 11 11:41 .virtualmin-src
drwxr-xr-x 15 tage staff 480 Nov 11 04:18 awstats
drwxr-x--- 6 tage staff 192 Jun 8 2021 cgi-bin
drwxr-xr-x 6 tage staff 192 Jun 8 2021 etc
drwxr-xr-x 5 tage staff 160 Jun 8 2021 fcgi-bin
drwxr-xr-x 2 tage staff 64 Jun 8 2021 homes
drwxr-x--- 4 tage staff 128 Jun 8 2021 logs
drwxr-x--- 29 tage staff 928 Nov 11 04:12 public_html
-rw-r--r-- 1 tage staff 3749 Oct 24 07:32 ssl.ca
-rwx------ 1 tage staff 1935 Oct 24 07:32 ssl.cert
-rwx------ 1 tage staff 5686 Oct 24 07:32 ssl.combined
-rwx------ 1 tage staff 7391 Oct 24 07:32 ssl.everything
-rwx------ 1 tage staff 1704 Oct 24 07:32 ssl.key
drwxr-x--- 2 tage staff 64 Jun 17 2021 tmp
Any help would be excellent. Thank you for being here and answering questions.
However, the downside is that Virtualmin restore sub-command checks for a virtual server information file which is currently empty, and would fail with the following error:
setquota: Bad inode hardlimit: /: Unknown decimal unit. Valid units are k, m, g, t.
It fails as restore command requires at the moment at least user= and dom= set on Virtualmin domain config file (i.e. a file that is found in /etc/webmin/virtual-server/domains directory).
@Jamie, it makes it impossible to restore domain config in this case scenario. I would suggest, when the local Virtualmin domain config file is corrupt, read and use the one that is on the backup, as it already contains an id=, which we can easily associate with local domain.
@Jamie, I’m starting to think that this issue could be a result of increased buffer size for read/write operations? We have it set for 32 MiB right now. Which is ridiculously large for any regular operations with config files. For uploads/downloads it may even be too small. But for normal config files read/write operations it is certainly too much!
Could we separate those?
@pearing So, you have around 50 domains, right? How much RAM do you have available?