Bug on Bind (named) when restoring an account
Hi, I encountered a bug while restoring an account. I'm using Bind9 as DNS server. Latest version of cPanel.
I had an account "example.com" and I removed it. After a few weeks, I restored it from tar.gz (last backup). Everything was ok.
Now, I registered a new account "example.net". No error reported. I couldn't activate (not responding) in DNS. So I restarted Bind (service named restart) and it failed with error:
Jan 14 09:13:45 server bash[1333766]: /etc/named.conf:1113: zone 'example.com': previous definition already exists: /etc/named.conf:213
Jan 14 09:13:45 server bash[1333766]: /etc/named.conf:2180: zone 'example.com': previous definition already exists: /etc/named.conf:1280
Jan 14 09:14:16 server bash[1333897]: /etc/named.conf:2174: zone 'example.com': previous definition already exists: /etc/named.conf:1274
I edited /etc/named.conf and removed the duplicate entries (two), even though I had restored "example.com" once.
So either Restore is not checking if the entry was already created *or* Terminate Account is not removing the entry, or something else.
Note: this happened twice. A month ago, the same issue happened, but it was on a Sunday, so I just removed it and forgot about it.
Can you test? Thank you.
-
Hey there! This is related to a known issue our team is working on under case ZC-12388, where the DNS data gets out of sync. We have a fix in place, and it's going through final testing now so it will be included in all versions of 126 and it's scheduled to get backported to 124.
In the mean time, you can run this command to clean up the DNS on the server:
/scripts/cleandns -v -r
1 -
Hi cPRex, glad to know that will be a fix soon.
Thank you!
0 -
You're welcome!
0 -
cPRex just one question: it's safe to run
/scripts/cleandns -v -r
anytime? It will recreate the named.conf file with the actual zones? I have >150 in production.
I ran "named-checkconf -z" today and realized some entries removed several months ago. It just alerts "zone not found" (.db file) but does not impact. I removed them manually.
0 -
As with any change, it's best to run it during non-peak hours just in case, but I wouldn't expect this to cause any issues. Yes, this will recreate named.conf, although so does adding or deleting any record, in theory.
You can take a backup of /etc/named.conf first just in case as well.
0 -
Ok, sure, non-peak hours. I'll take a copy of named.conf before.
Thanks.
0 -
You're very welcome!
0
Please sign in to leave a comment.
Comments
7 comments