DNS server of Plesk does not work properly

Follow

Comments

3 comments

  • Avatar
    Detlef Bracker

    The Delete - SQL is wrong, why on many servers the default_dns_zone is not set and then the subquery brings NULL (about empty result) and will an <> operator not work!

    So make it better and check before whats DNS-Zones are not deleted before:

    select id,name from dns_zone where id not in (select dns_zone_id from domains) and id not in (select dns_zone_id from domain_aliases)
    and id not in (select val from misc where param = 'default_dns_zone_id');

    In next step you can delete then the DNS-Zones with:

    delete from dns_zone where id not in (select dns_zone_id from domains) and id not in (select dns_zone_id from domain_aliases)
    and id not in (select val from misc where param = 'default_dns_zone_id');

  • Avatar
    Detlef Bracker

    again must been controlled:

    select id,host from dns_recs where dns_zone_id not in (select dns_zone_id from domains) and dns_zone_id not in (select dns_zone_id from domain_aliases)
    and dns_zone_id not in (select val from misc where param = 'default_dns_zone_id');

    and then deleted:

    delete from dns_recs where dns_zone_id not in (select dns_zone_id from domains) and dns_zone_id not in (select dns_zone_id from domain_aliases)
    and dns_zone_id not in (select val from misc where param = 'default_dns_zone_id');

     

     

  • Avatar
    Robert Asilbekov

    @Detlef Bracker  Thank you for the feedback. The article has been modified. 

Please sign in to leave a comment.

Have more questions? Submit a request