Error in primary / secondary DNS installation
Hello to everyone,
We are currently working with this guide: https://www.howtoforge.com/how-to-r...and-secondary-with-ispconfig-3-debian-squeeze
The thing is...when we connect both servers, everything works perfect But in the moment that i modify the "Server config" option of ns1 or ns2 (dont matter wich server), everything in server2 starts failing...I let you know or scenario:
SERVER 1: hostname: ns1.domain.com in /etc/hosts: 1.1.1.1 ns1.domain.com ns1 1.1.1.2 ns2.domain.com ns2
- This server has 1 IP address, lets say 1.1.1.1
SERVER 2: hostname: ns2.domain.com in /etc/hosts: 1.1.1.2 ns2.domain.com ns2 1.1.1.1 ns1.domain.com ns1
- This server has 2 IP addreses: eth0 --> 2.2.2.2 eth1 --> 1.1.1.2
These machines are connected each other tought VLAN, and are separated in two datacenters, but ns1 can ping ns2 without any problem.
When i edit the "Server Config" of ns1 or ns2, the cron task starts running in server1 and what does in server2 is modify the /etc/hosts as following:
1.1.1.2 ns2.domain.com ns2 1.1.1.1 ns2.domain.com ns1
If i check the ispconfig.log of server2, it prints this error constantly:
Fri Mar 3 17:25:07 CET 2017 PHP Warning: mysqli_connect(): (HY000/2005): Unknown MySQL server host 'ns1.domain.com' (110) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 79
Effectively, ns1.domain.com doesnt exists becase it was replaced in /etc/hosts, so the DNS replica doesnt work anymore...i need to modify this entry manually and everything works perfect again...
Kind regards.