DNS Mirror stopped working: named.conf.local left with only latest zone

Discussion in 'General' started by linus, Oct 23, 2024 at 2:41 PM.

Tags:
  1. linus

    linus Member

    I just noticed a strange problem as the second DNS didn't want to answers domains it was configured to serve.
    I noticed that it was only listening to the last edited zone.
    Then I noticed the named.conf.local only contained the last edited zone (edited in the ISPConfig panel and saved).
    The database seems to contain them.

    I run on server2:
    Code:
    /usr/local/ispconfig/server/server.sh
    Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    23.10.2024-15:09 - DEBUG [modules.inc:177] - Replicated from master: REPLACE INTO `dns_soa` (`id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`origin`,`ns`,`mbox`,`serial`,`refresh`,`retry`,`expire`,`minimum`,`ttl`,`active`,`xfer`,`also_notify`,`update_acl`,`dnssec_initialized`,`dnssec_wanted`,`dnssec_algo`,`dnssec_last_signed`,`dnssec_info`,`rendered_zone`) VALUES ('713','1','219','riud','riud','',11,'domain.com.','ns3.example.com.','admin.example.com.','2024102304','32400','7200','2419200','86400','86400','Y','',NULL,NULL,'N','N','ECDSAP256SHA256','0',NULL,'$TTL        86400\n@       IN      SOA     ns3.example.com. admin.example.com. (\n                        2024102303       ; serial, todays date + todays serial #\n                        32400              ; refresh, seconds\n                        7200              ; retry, seconds\n                        2419200              ; expire, seconds\n                        86400 )            ; minimum, seconds\n;\n\ndomain.com. 3604      A          NS         ns3.example.com.\n_autodiscover._tcp 3600      SRV    0 10 443 discover.ha.example.com.\ndomain.com. 3600      TXT        \"v=spf1 mx a include:_spf.example.com ~all\"\ndefault._domainkey.domain.com. 86400      TXT        \"v=DKIM1; t=s;...DAQAB\"\n_dmarc 3600      TXT        \"v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s; rf=afrf; pct=100; ri=86400\"\n')
    23.10.2024-15:09 - DEBUG [plugins.inc:118] - Calling function 'soa_update' from plugin 'bind_plugin' raised by event 'dns_soa_update'.
    23.10.2024-15:09 - DEBUG [system.inc:2436] - safe_exec cmd: named-checkzone 'domain.com.' '/etc/bind/domain.com' - return code: 0
    23.10.2024-15:09 - DEBUG [bind plugin.inc:369] - Writing BIND domain file: /etc/bind/domain.com
    23.10.2024-15:09 - DEBUG [bind plugin.inc:630] - Writing BIND named.conf.local file: /etc/bind/named.conf.local
    23.10.2024-15:09 - DEBUG [modules.inc:205] - Processed datalog_id 90357
    23.10.2024-15:09 - DEBUG [modules.inc:177] - Replicated from master: REPLACE INTO `dns_rr` (`id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`zone`,`name`,`type`,`data`,`aux`,`ttl`,`active`,`stamp`,`serial`) VALUES ('8507','1','219','riud','riud','',11,'713','domain.com.','A','1.1.191.245','0','3605','Y','2024-10-23 15:09:24','2024102304')
    23.10.2024-15:09 - DEBUG [plugins.inc:118] - Calling function 'rr_update' from plugin 'bind_plugin' raised by event 'dns_rr_update'.
    23.10.2024-15:09 - DEBUG [system.inc:2436] - safe_exec cmd: named-checkzone 'domain.com.' '/etc/bind/domain.com' - return code: 0
    23.10.2024-15:09 - DEBUG [bind plugin.inc:369] - Writing BIND domain file: /etc/bind/domain.com
    23.10.2024-15:09 - DEBUG [bind plugin.inc:630] - Writing BIND named.conf.local file: /etc/bind/named.conf.local
    23.10.2024-15:09 - DEBUG [modules.inc:205] - Processed datalog_id 90359
    23.10.2024-15:09 - DEBUG [services.inc:56] - Calling function 'restartBind' from module 'dns_module'.
    23.10.2024-15:09 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service
    23.10.2024-15:09 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'named' 2>&1 - return code: 0
    23.10.2024-15:09 - DEBUG [server:224] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished server.php.
    on server2 mysql it has soas:
    SELECT * FROM `dns_soa`
    Showing rows 0 - 24 (161 total, Query took 0.0013 seconds.)

    Both servers have the /etc/bind/pri.domain.com
    If I manually copy /etc/bind/named.conf.local from server1 (with all the zones) to server2 and reload bind9 (debian12) it works, until I change a zone, then the file is truncated and left only with the latest edited again.

    I have forced an ISPConfig update but it didn't help.
    Does anyone have any ideas where I'm going wrong?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try Tools > Resync on the dns zones.
     
    ahrasis and linus like this.
  3. linus

    linus Member

    It's still working on it, but the named.conf.local seems to grow steadily. Thank you for your quick help again.
     

Share This Page