Secondary DNS not syncing

Discussion in 'Installation/Configuration' started by alleyoopster, May 26, 2018.

  1. alleyoopster

    alleyoopster New Member

    I have a standard new install and recently updated ispconfig running Debian 9 and have setup a secondary DNS server using parts from the ispconfig manual and parts from https://www.howtoforge.com/tutorial/perfect-server-debian-9-nginx-bind-dovecot-ispconfig-3.1/
    All seemed ok on install of secondary. I tried Tools, Sync DNS which found a number of records and no errors.
    Errors I'm getting from ispconfig secondary
    From /var/log/syslog
    Code:
    May 26 10:56:05 dns02-lon-vmh named[499]: client 74.125.73.69#38451 (web01-lon-vul.hostchestnut.com): query (cache) 'web01-lon-vul.hostchestnut.com/AAAA/IN' denied
    Primary dig
    Code:
    [email protected]:~# dig @localhost www.wildcroft.co.za
    
    ; <<>> DiG 9.10.3-P4-Debian <<>> @localhost www.wildcroft.co.za
    ; (2 servers found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31065
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;www.wildcroft.co.za.        IN    A
    
    ;; ANSWER SECTION:
    www.wildcroft.co.za.    3600    IN    A    45.63.101.25
    
    ;; AUTHORITY SECTION:
    wildcroft.co.za.    3600    IN    NS    ns1.hostchestnut.net.
    wildcroft.co.za.    3600    IN    NS    ns2.hostchestnut.net.
    
    ;; Query time: 0 msec
    ;; SERVER: ::1#53(::1)
    ;; WHEN: Sat May 26 11:03:13 SAST 2018
    ;; MSG SIZE  rcvd: 116
     
    Secondary dig
    Code:
     [email protected]:~# dig @localhost www.wildcroft.co.za
    
    ; <<>> DiG 9.10.3-P4-Debian <<>> @localhost www.wildcroft.co.za
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 34680
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;www.wildcroft.co.za.        IN    A
    
    ;; Query time: 195 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Sat May 26 11:02:57 SAST 2018
    ;; MSG SIZE  rcvd: 48
    
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. alleyoopster

    alleyoopster New Member

    Oops, looks like I missed the last bit of the read before posting. Following up on that first I ran debug mode and also ran server.sh manually which seems to give some details. I'm also seeing a lot of .ispconfig_lock messages.


    Code:
    27.05.2018-15:27 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 79
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!PHP Warning:  mysqli_connect(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 79
    PHP Warning:  mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No address associated with hostname in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 79
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    PHP Warning:  mysqli_ping() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 198
    PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 200
    
    I did have some problems with DB connection so I deleted the users on the master relating to this slave and recreated. The DB now connects, but the error messages as above persist.
     
    Last edited: May 27, 2018
  4. Chris_UK

    Chris_UK Member

    As stupid as this may sound, I believe you have a DNS issue. check that your secondary dns server actually knows where to find the primary dns and/or master server to copy data from. This is coming from seeing the php warning generated on line 79
    It is telling you it cannot find the database. have you added the ipaddress if your primary dns to the hosts file on your secondary dns server?
     
  5. alleyoopster

    alleyoopster New Member

    :D

    I did have an issue as cloud config was removing my entries, but I spotted that earlier.
    The error still persists after fixing the hosts file and rebooting, but the error:
    Code:
    ugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!PHP Warning:  mysqli_connect(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 79
    has gone now EDIT: Not gone, still having same errors.
    I am running primary dns, email and web server on the web01

    /etc/hosts
    Code:
    # Your system has configured 'manage_etc_hosts' as True.
    # As a result, if you wish for changes to this file to persist
    # then you will need to either
    # a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
    # b.) change or remove the value of 'manage_etc_hosts' in
    #     /etc/cloud/cloud.cfg or cloud-config from user-data
    #
    127.0.1.1 dns02-lon-vha.hostchestnut.com dns02-lon-vha
    127.0.0.1 localhost
    45.63.101.25   web01-lon-vul.hostchestnut.com   web01-lon-vul
    103.105.50.242   dns02-lon-vmh.hostchestnut.com   dns02-lon-vmh
    45.63.101.25   ns1.hostchestnut.net   ns1
    103.105.50.242   ns2.hostchestnut.net   ns2
    
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
     
    Last edited: May 28, 2018
  6. alleyoopster

    alleyoopster New Member

    It seems that the hosts file is working (as above) and I can connect to the master database (as below)
    Any more suggestions or maybe I'll reinstall. It is a new install anyway, but would be nice to know what went wrong.
    thanks for your suggestions so far.
    Code:
    MariaDB [(none)]> status
    --------------
    mysql  Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
    
    Connection id:       412
    Current database:   
    Current user:       [email protected]
    SSL:           Not in use
    Current pager:       stdout
    Using outfile:       ''
    Using delimiter:   ;
    Server:           MariaDB
    Server version:       10.1.26-MariaDB-0+deb9u1 Debian 9.1
    Protocol version:   10
    Connection:       web01-lon-vul.hostchestnut.com via TCP/IP
    Server characterset:   utf8mb4
    Db     characterset:   utf8mb4
    Client characterset:   utf8mb4
    Conn.  characterset:   utf8mb4
    TCP port:       3306
    Uptime:           1 hour 44 min 57 sec
    
    Threads: 2  Questions: 15112  Slow queries: 0  Opens: 63  Flush tables: 1  Open tables: 57  Queries per second avg: 2.399
    
     

Share This Page