Re: [Pdns-users] Master slave replication
Hi Donald! This is how it works on my setup. I run MariaDB as Generic-MySQL mode "gmysql" in PowerDNS. In pdns.conf should add: launch=gmysql gmysql-host=localhost gmysql-dbname=powerdns gmysql-user=powerdns_user gmysql-password=powerdns_password gmysql-dnssec=yes Now go to MySQL settings on MASTER 192.168.0.1 (where slave will be 192.168.0.2): #Binlog should be in ROW or MIXED format. # Login to MySQL and set in mysql line: mysql -u root -p mysql> SET GLOBAL binlog_format = 'ROW'; # OR mysql> SET GLOBAL binlog_format = 'MIXED' mysql>quit # # Edit your /etc/mysql/my.cnf file nano /etc/mysql/my.cnf # [mariadb] log-bin = mysql-bin bind-address=0.0.0.0 /this allows to listen from any IP, ETH ports and Loopback server_id=1 log-basename=master1 skip-networking=0 # at mysql prompt enter: mysql> GRANT REPLICATION SLAVE ON *.* TO 'replication_user'@'slave_host' IDENTIFIED BY 'password'; FLUSH PRIVILEGES; # # or enter alternative commands GRANT REPLICATION SLAVE ON *.* TO replication_user; GRANT ALL PRIVILEGES ON *.* TO 'replication_user'@'192.168.0.2' IDENTIFIED BY 'password' WITH GRANT OPTION; # #To check replication status: SHOW SLAVE STATUS \G # ### Now, allow 127.0.0.1, and slave SQL 192.168.0.2 ### iptables -A INPUT -p tcp -s 127.0.0.1 --dport 3306 -j ACCEPT iptables -A INPUT -p tcp -s 192.168.0.2 --dport 3306 -j ACCEPT ## Block all other connections to 3306 ## iptables -A INPUT -p tcp --dport 3306 -j DROP #Save iptables sudo iptables-save > /etc/iptables/rules.v4 # service mysql restart ###The Slave settings 192.168.0.2 where maters is 192.168.0.1 # #Now we head over to the Slave. Open the /etc/mysql/my.cnf file and add the following at the bottom: [mariadb] server-id = 2 bind-address=0.0.0.0 #issue sql restart service mysql restart # # Login MySQL mysql -u root -p mysql > CHANGE MASTER TO master_host="192.168.0.1", master_user="replication_user", master_password="password" master_use_gtid=slave_pos; #Start slave replication: START SLAVE; #To check replication status: SHOW SLAVE STATUS; # alternatively you can start replication with the following command from client (192.168.0.2) to connect to 192.168.0.1:3306, enter: >mysql -u replication_user -h 192.168.0.1 -P 3306 -p pasword # Regards Alex. From: Pdns-users [mailto:pdns-users-boun...@mailman.powerdns.com] On Behalf Of Donald Jayawardena Sent: Monday, December 18, 2017 8:52 AM To: pdns-users@mailman.powerdns.com Subject: [Pdns-users] Master slave replication Hi, I have an issue replicating data through powerdns on two mysql databases. I could replicate data when I update data manually on the master. But data does not get thorugh to slave if I use powerdns (using curl) to update slave data records from the master. The error says: Could not execute Delete_rows event on table powerdns.records; Can't find record in 'records', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.01, end_log_pos 1655 Please let me know if any solution for this. Donald Jayawardena ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
[Pdns-users] Master slave replication
Hi, I have an issue replicating data through powerdns on two mysql databases. I could replicate data when I update data manually on the master. But data does not get thorugh to slave if I use powerdns (using curl) to update slave data records from the master. The error says: Could not execute Delete_rows event on table powerdns.records; Can't find record in 'records', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.01, end_log_pos 1655 Please let me know if any solution for this. Donald Jayawardena ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] master slave replication for reverse dns zone
Le 2017-07-06 14:56, Michaël a écrit : Hi, i have install powerdns 4.0.4. I try to have a master and a slave. It works great for standard zone, but the reverse zone don't synchronise. i have to log on my second server and do a 'pdns_control retrieve 0.22.172.in-addr.arpa' to have all the records synchronise Someone as the same issue and perhaps a solution ? Regards ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users just had to add also-notify= in pdns.conf and it works ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
[Pdns-users] master slave replication for reverse dns zone
Hi, i have install powerdns 4.0.4. I try to have a master and a slave. It works great for standard zone, but the reverse zone don't synchronise. i have to log on my second server and do a 'pdns_control retrieve 0.22.172.in-addr.arpa' to have all the records synchronise Someone as the same issue and perhaps a solution ? Regards ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] master slave replication not working, sqlite backend
Hubert-- Try with the IP of your master server in the domain record instead of the domain name: 2|my.domain.com|192.168.123.112||MASTER||foobar I recall having trouble with that at one point, although cannot remember the exact error I had. --t On Oct 5, 2009, at 10:25 AM, Hubert Krause wrote: the database has read write permissons by pdns user and group. Name resolutions works very well. A typical entry into the domain-table looks like: 2|my.domain.com|master.domain.com||MASTER||foobar and an example for an SOA record is: 115|2|my.domain.com|SOA|master.domain.com hostmas...@other- domain.com 0 10800 3600 604800 3600|86400||20091002 Any hints, any ideas? ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
[Pdns-users] master slave replication not working, sqlite backend
Hello to all... Ive got a Problem with to servers with powerdns, one is the master, one the slave both use a sqlite backend. Master Slave is not working. If I do for example on the slave: dig @master axfr my.domin.com I will get: ; DiG 9.3.4-P1 @master axfr my.domain.com ; (1 server found) ;; global options: printcmd my.domain.com. 86400 IN SOA master.domain.com. hostmaster.other-domain.com. 0 10800 3600 604800 3600 ;; Query time: 4 msec ;; SERVER: 192.168.123.45#53(192.168.123.45) ;; WHEN: Mon Oct 5 17:16:36 2009 ;; XFR size: 1 records (messages 1) But no A records and other stuff I would expect from axfr. There are always two different erromessages, if I do the command above the following appears in the logfile: Oct 5 17:36:56 master pdns[5909]: AXFR of domain 'my.domain.com' initiated by 192.168.123.113 Oct 5 17:36:56 master pdns[5909]: TCP server is without backend connections in doAXFR, launching Oct 5 17:36:56 master pdns[5909]: gsqlite3: connection to '/var/db/pdns/pdns.sqlite3' succesful Oct 5 17:36:56 master pdns[5909]: gsqlite3: connection to '/var/db/pdns/pdns.sqlite3' succesful Oct 5 17:36:56 master pdns[5909]: AXFR of domain 'my.domain.com' to 192.168.123.113 finished Oct 5 17:36:56 master pdns[5909]: TCP nameserver had error, cycling backend: Reading data: Connection reset by peer or: Oct 5 17:37:21 master pdns[5909]: AXFR of domain 'my.domain.com' initiated by 192.168.123.113 Oct 5 17:37:21 master pdns[5909]: TCP server is without backend connections in doAXFR, launching Oct 5 17:37:21 master pdns[5909]: gsqlite3: connection to '/var/db/pdns/pdns.sqlite3' succesful Oct 5 17:37:21 master pdns[5909]: gsqlite3: connection to '/var/db/pdns/pdns.sqlite3' succesful Oct 5 17:37:21 master pdns[5909]: AXFR of domain 'my.domain.com' to 192.168.123.113 finished Oct 5 17:37:21 master pdns[5909]: Received question from socket which had no remote address, dropping (Transport endpoint is not connected) The configuration of the master is: allow-axfr-ips=192.168.12.0/24,192.168.123.0/24,10.0.0.0/24 allow-recursion=192.168.12.0/24,192.168.123.0/24,10.0.0.0/24 allow-recursion-override=yes disable-axfr=no launch=gsqlite3 gsqlite3-database=/var/db/pdns/pdns.sqlite3 local-address=192.168.123.112,192.168.12.112,10.0.0.112 log-dns-details=yes log-failed-updates=yes master=yes recursor=172.16.51.19 setgid=pdns setuid=pdns slave=no The configuration of the slave is: allow-recursion=192.168.12.0/24,192.168.123.0/24,10.0.0.0/24 allow-recursion-override=yes launch=gsqlite3 gsqlite3-database=/var/db/pdns/pdns.sqlite3 local-address=192.168.123.113,192.168.12.113 recursor=172.16.51.19 setgid=pdns setuid=pdns slave=yes the database has read write permissons by pdns user and group. Name resolutions works very well. A typical entry into the domain-table looks like: 2|my.domain.com|master.domain.com||MASTER||foobar and an example for an SOA record is: 115|2|my.domain.com|SOA|master.domain.com hostmas...@other-domain.com 0 10800 3600 604800 3600|86400||20091002 Any hints, any ideas? Best regards, Hubert -- Hubert Krause Risk Fraud Division INFORM GmbH, Pascalstraße 23, 52076 Aachen, Germany Phone: +49 24 08 - 94 56 188 E-Mail: hubert.kra...@inform-ac.com, Web: http://www.inform-ac.com INFORM Institut fuer Operations Research und Management GmbH Registered AmtsG Aachen HRB1144 Gfhr. Adrian Weiler ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
[Pdns-users] Master/Slave replication
I'm a newb, but found PowerDNS and Poweradmin very nice. I'm having a problem with my Master not updating my slave. I'm on Ubuntu 9.04 pdns was installed via apt, pa was installed via tar, latest version available on the site. Any help would be graciously accepted. Michael ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users