DNS creates zones with .ERR extension after updating.

Discussion in 'Installation/Configuration' started by Entangled, Nov 5, 2015.

  1. Entangled

    Entangled Member

    Hello,

    All was working well until I updated ISPConfig from 3.0.5.4p5 to 3.0.5.4p8. I am running in Multi-server mode with a CP server, DNS servers, Mail servers, mySQL servers and a bunch of Web servers.

    When I add a DNS record after the update, the file gets the .err extension along with this in it:

    $TTL 3600
    @ IN SOA ns1.DNS_DOMAIN. webmaster.WEB_SITE_DOMAIN.com. (
    2015110513 ; serial, todays date + todays serial #
    7200 ; refresh, seconds
    540 ; retry, seconds
    1209600 ; expire, seconds
    7200 ) ; minimum, seconds
    ;

    It also wipes out /etc/named.conf.local. I just got done hand editing /etc/named.conf.local for 107 domains.

    I updated the CP server with 3.0.5.4p8 a couple days ago but none of the other servers. Yesterday, when updating an existing DNS record, is when the .err extension appeared so I updated ISPConfig on the remaining server. I did the update to the .err DNS and it appeared to work fine.

    Today, when add a new DNS record, I got the .err again. This is when I also noticed that /etc/named/conf.local was empty.

    I have no idea why it was working fine under 3.0.5.4p5 and what was in the update to cause these problems.

    I would also like to know to to rebuild the named.conf.local so I do not have to rebuild it by hand ... it's a pain for a 107 domains ... I checked the backup on the DNSs, but, it was empty too.

    Any help getting this resolved would be much appreciated.

    Thank you.
     
  2. webguyz

    webguyz Active Member HowtoForge Supporter

    Did you try logging in as Admin and going to Tools -> Resync and then check DNS records and click start? It should read the info from the master ispconfigdb and recreate the dns records.
     
  3. Entangled

    Entangled Member

    No, I did not try that earlier, but, thanks for letting me know that the function exist.

    However, I just tried Resync and it wiped out /etc/named.conf.local on both DNSs and it created mostly .err zones. Thankfully, I made a copy of both: /var/named and /etc/named.conf.local before running Resync.

    Something definitely got screwed up when I updated to ISPConfig 3.0.5.4p8.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the syslog file, named writes there why it rejects the zone files.
     
  5. Entangled

    Entangled Member

    Yeah, that's another issue, there aren't any error messages to go on in /var/log/messages. As mentioned, it was working fine for months until I updated ISPConfig to P8.

    After running Resync, /etc/named.conf.local had only a single blank line and all zones got the .err extension with only this in them, for example:

    $TTL 3600
    @ IN SOA ns1.entangledweb.net. webmaster.entangledweb.com. (
    2015110501 ; serial, todays date + todays serial #
    7200 ; refresh, seconds
    540 ; retry, seconds
    1209600 ; expire, seconds
    7200 ) ; minimum, seconds
    ;

    So ISPConfig P8 is that least doing something. I am basically using the Default DNS Template (some of the times were changed based on recommends from some DNS check site):

    [ZONE]
    origin={DOMAIN}.
    ns={NS1}.
    mbox={EMAIL}.
    refresh=7200
    retry=540
    expire=1209600
    minimum=7200
    ttl=3600

    [DNS_RECORDS]
    A|{DOMAIN}.|{IP}|0|3600
    A|www|{IP}|0|3600
    A|mail|174.37.93.145|0|3600
    MX|{DOMAIN}.|mail.{DOMAIN}.|10|3600
    NS|{DOMAIN}.|{NS1}.|0|3600
    NS|{DOMAIN}.|{NS2}.|0|3600

    Here's the same zone created by P5, with a few records added manually after the initial Add:

    $TTL 3600
    @ IN SOA ns1.entangledweb.net. webmaster.entangledweb.com. (
    2015042401 ; serial, todays date + todays serial #
    7200 ; refresh, seconds
    540 ; retry, seconds
    1209600 ; expire, seconds
    7200 ) ; minimum, seconds
    ;

    * 86400 A 174.37.93.138
    cp2 86400 A 174.37.93.138
    entangledweb.com. 3600 A 174.37.93.138
    mail 3600 A 174.37.93.145
    www 3600 A 174.37.93.138
    entangledweb.com. 3600 MX 10 mail.entangledweb.com.
    entangledweb.com. 3600 NS ns2.entangledweb.net.
    entangledweb.com. 3600 NS ns1.entangledweb.net.
    entangledweb.com. 86400 TXT "v=spf1 a mx -all"

    I found it interesting that P8 is not sending any of the A, MX and NS records but sending all of the other records.

    And I have no idea what P5 added to /etc/named.conf.local because it was wiped out and I realized I had no backup of it. The daily backup will be resolved after I get it working correctly.

    The CP is running Debian, the DNSs are running on CentOS with BIND 9.4.2-P2

    Again, I appreciate the help.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the same issue, when all zones were rejected by bind then the named.conf.local file has to be empty. The errors are in the syslog file, not messages. If you don't have any errors in both files, then use the named-checkzone script, run it against the .err file to see the exact error message why named refused the file. The fix that error by editing the zone in ispconfig and the zone will appear again as zone file and in named.conf.local.

    If you have a customized zone config template in the conf-custom folder then it might be that your custm template is incompatible with the new ispconfig version. Compare your custom template with the one that ships with ispconfig to make the necessary adjustments to your file.
     
  7. Entangled

    Entangled Member

    The DNSs are on a VPS running CentOS that was provisioned and I haven't changed any of the defaults as set by the NOC ... there is no /var/log/syslog ... there is only /var/log/message and there are named messages in it, for example:

    Nov 6 09:32:16 ns1 named[20540]: zone entangledweb.net/IN: loaded serial 2009071795
    Nov 6 09:32:16 ns1 named[20540]: running

    I did change debug to warning in named.conf but that didn't give any indication of the error either. So I put it back to debug.

    And this was useless:

    named-checkzone entangledweb.com pri.entangledweb.com.err
    zone entangledweb.com/IN: has no NS records

    I already knew this.

    I do not remember changing any of the Templates when I installed ISPConfig, but, I will check it now.
    It does not appear I have any customs:

    ls -ogal server/conf-custom/
    total 28
    drwxr-x--- 6 4096 Mar 1 2015 .
    drwxr-x--- 13 4096 Mar 1 2015 ..
    -rwxr-x--- 1 45 Nov 4 11:21 empty.dir
    drwxr-x--- 2 4096 Mar 1 2015 error
    drwxr-x--- 2 4096 Mar 1 2015 index
    drwxr-x--- 2 4096 Mar 1 2015 install
    drwxr-x--- 2 4096 Mar 1 2015 mail

    And each of those directories only have that empty.dir file in them ...
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so you know the reason why the zones did not get saved. Fix the error by adding the NS records and the zones will start working again.
     
  9. Entangled

    Entangled Member

    Yeah, I wish it was that simple. Again, everything was working fine until I updated ISPConfig from P5 to P8. I have 107 zones in ISPConfig that use the Default DNS-Zone Template. Looking at the DNS-Zone Default Template in ISPConfig, it appears as:

    [ZONE]
    origin={DOMAIN}.
    ns={NS1}.
    mbox={EMAIL}.
    refresh=7200
    retry=540
    expire=1209600
    minimum=7200
    ttl=3600

    [DNS_RECORDS]
    A|{DOMAIN}.|{IP}|0|3600
    A|www|{IP}|0|3600
    A|mail|174.37.93.145|0|3600
    MX|{DOMAIN}.|mail.{DOMAIN}.|10|3600
    NS|{DOMAIN}.|{NS1}.|0|3600
    NS|{DOMAIN}.|{NS2}.|0|3600

    Do you see any wrong with this DNS-Zone Default Template?

    When I Add a new DNS-Zone using the Wizard or run the Resync, the resulting Zone is named .err and the Zone file only has:

    $TTL 3600
    @ IN SOA ns1.entangledweb.net. webmaster.entangledweb.com. (
    2015110501 ; serial, todays date + todays serial #
    7200 ; refresh, seconds
    540 ; retry, seconds
    1209600 ; expire, seconds
    7200 ) ; minimum, seconds
    ;

    So for some reason ISPConfig P8 is not sending any of the DNS_RECORDS to the DNSs servers.

    How do I determine/see what the CP server is sending to the DNS server?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The zone template is not used to send any data to a server, the template is only used to create a new zone when you add it the first time. If you want to know what is part of a dns zone then dont look at the template, what matters is the dns zone itself that you can see in the dns zone list in ispconfig, click on a zone and then go to the dns records tab of that zone to see all records.
     
  11. Entangled

    Entangled Member

    OK, thanks. Don't understand why is worked in P5 and now it doesn't work in P8. Here's the Zone's Records in ISPConfig:

    A * 174.37.93.138 0 86400
    A cp2 174.37.93.138 0 86400
    A entangledweb.com. 174.37.93.138 0 3600
    A mail 174.37.93.145 0 3600
    A www 174.37.93.138 0 3600
    MX entangledweb.com. mail.entangledweb.com. 10 3600
    NS entangledweb.com. ns1.entangledweb.net. 0 3600
    NS entangledweb.com. ns2.entangledweb.net. 0 3600
    TXT entangledweb.com. v=spf1 a mx -all 0 86400

    I don't see anything wrong with these records.

    I just creating a new zone using the Wizard. It wiped out the /etc/named.config.local and it created .err file with:

    $TTL 3600
    @ IN SOA ns1.entangledweb.net. webmaster.craig-test.com. (
    2015110601 ; serial, todays date + todays serial #
    7200 ; refresh, seconds
    540 ; retry, seconds
    1209600 ; expire, seconds
    7200 ) ; minimum, seconds
    ;

    Again, none of the Zones Records are being sent and I don't know enough about ISPConfig to understand why only the DNS Zone "page" is being sent and nothing from the Record "page" is being sent.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you choose yes when the updater asked you to reconfigure services?
     
  13. Entangled

    Entangled Member

    On what server?

    Since I do not have any customs anywhere, I took it to just hit enter on all the questions ... so I guess that means I took the default answers to all the questions.
     
  14. Entangled

    Entangled Member

    This is a little confusing ... on what slave?

    The update script will then start to install incremental database updates for ISPConfig, if required.
    Reconfigure Permissions in master database? (yes,no) [no]:
    If this is a slave server in a multiserver setup, then choose "yes" here on at least one of the slave servers.

    I have a stand-alone CP server, I have multi-mySQL servers, multi-DNS servers, multi-mail servers and multi-web servers ... are the servers other than the CP server considered the "slave" ... if so, on what "slave" do I answer "yes" to this question on?

    Then you were asked if the services shall be reconfigured:
    Reconfigure Services? (yes,no) [yes]:
    You should choose "yes" here, only if you modified your system configuration manually, it might be better to choose no.

    Again, I took the default "yes".

    Say I screwed up the update, how do I fix my mistake?
     
  15. Entangled

    Entangled Member

    Oh, to be clear ... the stand-alone CP server is also a web server hosting my sites :)80) along with the CP :)8080).
     
  16. Entangled

    Entangled Member

    Fixed ... and I am embarrassed about what the fix is too.

    The mySQL service was not running on the DNS servers.

    When adding a Zone, only the DNS Zone "tab" was used to create the Zone, however, none of the Records "tab" was getting being used. The DNS Zone "tab" is in the dns_soa table, whereas, the Records "tab" is in the dns_rr table.

    Why only the DNS Zone "tab" gets used without needing mySQL services running on the DNS servers, I do not know and it makes no sense either.

    Lesson learned: so the Records tab gets used along with creating /etc/named.conf.local, mySQL has to be running on the DNS servers.
     

Share This Page