Failed to start BIND after cloning a virtual server

Hi,

Have seen discussions on similar, but not exactly the same situation, so creating new one. I have tried several times to clone a virtual server with the same error. The cloning process accomplishes smoothly with no issues, however every time it gives the same error:

Failed to start service : Failed to start BIND : Starting named: Error in named configuration:

zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 zone 0.in-addr.arpa/IN: loaded serial 0
zone mydomain.com/IN: mydomain.com/MXmail.mydomain.com’ has no address records (A or AAAA)
zone mydomain.com/IN: loaded serial 1348072730
zone clone.mydomain.com/IN: has no NS records
zone clone.mydomain.com/IN: not loaded due to errors. _default/clone.mydomain.com/IN: bad zone [FAILED]

The original virtual server had no Mail service from the very beginning and I don’t know why the error message has reference to mail.mydomain.com at all.

Could anyone elaborate on this please? Thanks.

Howdy,

I’m passing this along to Jamie, as it sounds like there’s a bug involved… but I wanted to clarify one thing first. This error was in the above output:

zone mydomain.com/IN: mydomain.com/MX 'mail.mydomain.com' has no address records (A or AAAA)

Is that correct – is that actually occurring in the original mydomain.com domain? Or is that just a typo, and it’s occurring in the new “clone.mydomain.com” domain?

Thanks!

-Eric

Hi Eric,

That message is outputted as a result of cloning process, so it is about “clone.mydomain.com”. I tried to enable and disable Mail again for the original virtual server prior cloning, but unfortunately it doesn’t help - I have the same error message every time and it is not possible to restart Bind anymore until I delete the clone server.

I had to compress the files and dump the database, extract them back into sub-server manually, so I am fine for now. However, I’d love if the issue was addressed and we could start using Virtualmin’s cloning feature.

Thanks again!

Could you post the contents of the BIND zone file for the new clone?

I’d be interested to see what records it contains…

Hi Jamie,

In order to be able to post DIND zone file for the new clone, I have repeated the whole process. So I cloned the default virtual server, let’s call it mydomain.com. The result is as follows:

Clone Virtual Server In domain mydomain.com Cloning virtual server mydomain.com to clone.mydomain.com with username clone .. Creating new virtual server settings .. .. done Checking for clashes and dependency problems .. .. done

Creating new virtual server …
Creating administration group clone …
… done
Creating administration user clone …
… done

Creating aliases for administration user …
… done

Adding administration user to groups …
… done

Creating home directory …
… done

Creating mailbox for administration user …
… done

Adding new DNS zone …
… done

Adding new virtual website …
… done

Adding webserver user apache to server’s group …
… done

Performing other Apache configuration …
… done

Setting up log file rotation …
… done

Creating MySQL login …
… done

Re-starting DNS server …
… done

Applying web server configuration …
… done

Saving server details …
… done

… done
Copying cron jobs and resource limits …
… done

Copying home directory contents …
… copy failed : tar: ./public_html/sites/default/files/tmp: implausibly old time stamp 1969-12-31 16:00:00 tar: ./public_html/sites/default/files/photos: implausibly old time stamp 1969-12-31 16:00:00

Copying DNS records …
… done

Copying Apache directives …
… done

Copying logrotate options …
… done

Re-creating MySQL databases …
… created 1 databases

Copying contents of MySQL databases …
… done

Re-starting DNS server …
… failed : Failed to start BIND : Starting named: Error in named configuration: zone localhost.localdomain/IN: loaded serial 0 zone localhost/IN: loaded serial 0 zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0 zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 zone 0.in-addr.arpa/IN: loaded serial 0 zone mydomain.com/IN: mydomain.com/MXmail.mydomain.com’ has no address records (A or AAAA) zone mydomain.com/IN: loaded serial 1348072732 zone clone.mydomain.com/IN: has no NS records zone clone.mydomain.com/IN: not loaded due to errors. _default/clone.mydomain.com/IN: bad zone [FAILED]

Applying web server configuration …
… done

… done

Now, if I go to System Information and click on Start Bind button, I get:

Error Failed to start service : Failed to start BIND : Starting named: Error in named configuration: zone localhost.localdomain/IN: loaded serial 0 zone localhost/IN: loaded serial 0 zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0 zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 zone 0.in-addr.arpa/IN: loaded serial 0 zone mydomain.com/IN: mydomain.com/MX 'mail.mydomain.com' has no address records (A or AAAA) zone mydomain.com/IN: loaded serial 1348072732 zone clone.mydomain.com/IN: has no NS records zone clone.mydomain.com/IN: not loaded due to errors. _default/clone.mydomain.com/IN: bad zone [FAILED]

Now if I go to /var/named and use ‘cat clone.mydomain.com.hosts’ I see:

root@orion:/var/named# cat clone.mydomain.com.hosts $ttl 38400 @ IN SOA old.host.com. root.old.host.com. ( 1348072733 10800 3600 604800 38400 )

which is strange, since the hostname for the system had been changed from ‘old.host.com’ to ‘orion.mydomain.com’ quite long time ago, which is confirmed by running:

root@orion:/var/named#
hostname
orion.mydomain.com

I am afraid that somewhere else ‘old.host.com’ needs to be found and be replaced. Moreover, clone.nanawall.com.hosts doesn’t contain any DNS-records.

For some reason, enabling and disabling Mail for the main virtual server ‘mydomain.com’ did not clear mail-related records in its DNS-zone. So after manually deleting them I tried to restart BIND and got different error complaining ‘clone.mydomain.com’ didn’t have any DNS-records and then after adding A-records again about absence of nameserver records. So after adding two records:

clone.mydomain.com. IN A xx.xx.xx.xxx
@ IN NS orion.mydomain.com.

BIND finally restarted successfully. Now I am going to delete and try to re-create the clone subdomain. (BTW, cloning always creates Top-level server and not Sub-server, even-though in my case I am using a subdomain).

Creating clone again gives:

Re-starting DNS server .. .. failed : Failed to start BIND : Starting named: Error in named configuration: zone localhost.localdomain/IN: loaded serial 0 zone localhost/IN: loaded serial 0 zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0 zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 zone 0.in-addr.arpa/IN: loaded serial 0 zone mydomain.com/IN: loaded serial 1348072734 zone clone.mydomain.com/IN: has no NS records zone clone.mydomain.com/IN: not loaded due to errors. _default/clone.mydomain.com/IN: bad zone [FAILED]

Again adding two following records ensures successful restarting BIND:

@ IN NS orion.mydomain.com. @ IN A xx.xx.xx.xxx

I have checked and made sure that “Add nameserver record for this system” in the templates is checked and “Master DNS server hostname” is set to “Automatic (from system’s hostname)”. But I am not sure if there is separate settings page for cloned virtual servers.

If you open the zone file for the original domain, does it contain all the expected records?

Also, if you perform validation on the original at Limits and Validation -> Validate Virtual Servers, does it report any errors?