Virtualmin no longer creates ZONE files from ver.7.7

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04
Webmin version 2.111
Virtualmin version 7.20.2
Related packages BIND 9.18.28

Starting from ver.7.7, Virtualmin no longer creates ZONE files.
ZONE file is not created even with ver.7.20.2.
It works fine if you downgrade to ver.7.5.

I’ve been using BIND with chroot in Virtualmin for the past 10 years.
This is the first time that the ZONE file is not created.

Virtualmin → Create Virtual Server → Create Server

Adding new DNS zone ..
.. DNS domain failed! : bind8::flush_file_lines failed : Failed to open /var/bind9/chroot/tmp/.webmin/945899_93747_2_domain_setup.cgi for writing : No such file or directory 

(?) web-lib-funcs.pl(line 10455)
(?) web-lib-funcs.pl(line 4223)

The domain is displayed in Existing DNS Zones, but
ZONE file does not exist.

Ubuntu 20.04 and Ubuntu 22.04 also work fine with ver7.5, but
If it is version 7.7 or higher, a ZONE file will not be created.

Just to be sure, I installed Debian 12 on the same VPS and tested it with the same configuration, but
ZONE files were not created in ver.7.7 or higher.

I’ve been waiting for it to recover since June last year.
I am posting this because the problem continues this year.

It worked fine up to ver7.5, but why does this problem occur with ver7.7 or higher with the exact same configuration?

Please tell me where I should fix it.

Beg my pardon, what exactly is the issue? Sorry, couldn’t resist. :wink:

Maybe you find the solution here:

What program is 7.7?

I created a zone no problems and latest software.

Very sorry. Please excuse any unnatural sentences as I am using a translation.

Up to ver.7.5, domains could be added successfully. ZONE files are no longer created from ver.7.7. I am having trouble because this problem continues even with the current version 7.20.2.

I read the topics you suggested, but I didn’t know what to do.

Well ver 7.2 is lower than ver 7.5 or ver 7.7, and if these are virtualmin versions they have not been released yet, where did you get those versions from

Thank you for your reply.

Are you using chroot? In my case, the ZONE file is not created not only with ver.7.7 but also with the latest version.

apt install webmin-virtual-server=7.5.gpl-1

When I run the above, a ZONE file will be created, but
I don’t think it’s a good idea to keep downgrading forever, so I’d like to find a solution.

Thank you for your reply.

It is not ver.7.2. This is ver.7.20.2. I installed and downgraded Virtualuarmin using the following method.

[ver.7.20.2]
wget https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh
chmod +x virtualmin-install.sh
./virtualmin-install.sh

[ver.7.5]
apt install webmin-virtual-server=7.5.gpl-1

[ver.7.7]
apt install webmin-virtual-server=7.7.gpl-1

That still seems to be ignoring the fact “7.5 or 7.7, if these are virtualmin versions they have not been released yet

Or have you taken 7.20 back even further :frowning: (7.05 or 7.07) into the history?

we all need to be careful when giving versions it is so easy to get everyone in a tiz/spin :confused:

They have been released. 7.20.2 is higher than 7.7

(Releases · virtualmin/virtualmin-gpl · GitHub)

Yes but clearly something went wrong with the ability to count version when 6.0x became 7.xx and folk wonder why there is confusion.

Anyway I still do not understand why your problem exists (apparently has existed) from 7.05.x/7.07.x all the way till now on 7.20.x - I would have thought someone also would have spotted the same problem and it would have received urgent attention.

Over that time period I do believe there has been at least an update to BIND (maybe some configuration change?)

7.20.1 is not 7.2. And 7.20.1 is newer than 7.5 and 7.7, which are versions that were released a couple of years ago.

Look up “semantic versioning”.

1 Like

Thank you both for explaining about ‘version’ and ‘release information’.

Now, returning to the main topic: Has anyone been able to generate a ZONE file in an environment that meets the following conditions?

Ubuntu 22.04 - 24.04
BIND 9.16 - 9.18 (Using chroot)
Virtualmin 7.7 - 7.20.2

For the past few days, I have been repeatedly reinstalling and adjusting ownership and permissions, but the ZONE file is not created.

Please advise on where I should make corrections.

(When downgrading Virtualmin to version 7.5, a ZONE file will be created even with the current configuration.)

I tested with a VPS from another company as well. As expected, when using chroot with BIND:

Virtualmin version 7.5 creates zone files correctly.
However, Virtualmin version 7.20.2 does not create zone files.

The error message for version 7.20.2 is as follows:

“Failed to open /var/bind9/chroot/tmp/.webmin/xxxxxx_xxxxx_x_domain_setup.cgi for writing: No such file or directory”

To work around this error, I executed the following commands:

mkdir -p /var/bind9/chroot/tmp/.webmin
chown -R root:bind /var/bind9/chroot/tmp

As a result, the file /var/bind9/chroot/tmp/.webmin/xxxxxx_xxxxx_x_domain_setup.cgi was generated.

Upon checking the content of xxxxxx_xxxxx_x_domain_setup.cgi, I found that it contains a zone file-like entry with two mistakes:

  1. There is no “IN” between “@” and “SOA”.
  2. There are two instances of “minimum TTL and closing parenthesis”.

$ttl 3600
@ SOA ns.example.com. root.ns.example.com. (
2024080100
3600
600
1209600
3600 )
3600 )
[rest omitted]

I suspect that these two incorrect data entries are causing the error and stopping the generation of the zone file.

By the way, is using chroot with BIND in Virtualmin deprecated?

I repeatedly used “Create Virtual Server” and “Delete Virtual Server” while adjusting ownership and permissions (e.g., chown bind:bind, chown root:bind, chmod 777, etc.).

The following two errors appeared in /var/webmin/miniserv.error approximately as often as the test runs:

readline() on closed filehandle $FILE at /usr/share/webmin/bind8/records-lib.pl line 49.
readline() on closed filehandle $FILE at records-lib.pl line 49.

These errors occur with Virtualmin versions 7.7 and 7.20.2, but not with version 7.5.

Could this issue be related to changes made in version 7.6 or 7.7?

Since I lack the technical skills to investigate or adjust the internals of Virtualmin, my options are limited to:

  1. Abandon using chroot with BIND9.
  2. Continue using Virtualmin version 7.5.

I have been using chroot for over 10 years, so the thought of discontinuing it is quite concerning.

Any insights or recommendations would be greatly appreciated.

Thank you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.