Re: [Pdns-users] Master server not notifying slave (syslog included)
Bert, you were spot on. One of the NS hostnames wasn't resolving properly and that got it fixed. The only thing that was a bit surprising is that the log was in both cases telling me that the binlog_format was set to statement and had issues with it. I fixed that by permanently setting binlog_format = mixed in the MySQL config (my.cnf). 2015-03-07 19:37 GMT+01:00 bert hubert bert.hub...@powerdns.com: On Sat, Mar 07, 2015 at 06:52:00PM +0100, Melvin Mughal wrote: I fixed the binary log warning by setting the variable to mixed (SET SESSION binlog_format = 'ROW';). Now the syslog is just saying no valid nameservers. Which config part did I make a mistake? We can't sell w/o seeing what is in your database. Can you check al the entries for test2.com from the records table? Especially check if there are NS records, and if they have names that can either be resolved on the internet, or from the database. Bert Mar 7 12:47:54 ns3 pdns[2478]: Using 64-bits mode. Built on 20150302135812 by r...@autotest.powerdns.com, gcc 4.7.2. Mar 7 12:47:54 ns3 pdns[2478]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2. Mar 7 12:47:54 ns3 pdns[2478]: Polled security status of version 3.4.3 at startup, no known issues reported: OK Mar 7 12:47:54 ns3 pdns[2478]: Listening for HTTP requests on 178.62.193.234:8081 Mar 7 12:47:54 ns3 pdns[2478]: Creating backend connection for TCP Mar 7 12:47:54 ns3 pdns[2478]: Master/slave communicator launching Mar 7 12:47:54 ns3 pdns[2478]: No new unfresh slave domains, 0 queued for AXFR already Mar 7 12:47:54 ns3 pdns[2478]: No master domains need notifications Mar 7 12:47:54 ns3 pdns[2478]: About to create 3 backend threads for UDP Mar 7 12:47:54 ns3 pdns[2478]: Done launching threads, ready to distribute questions Mar 7 12:48:54 ns3 pdns[2478]: 1 domain for which we are master needs notifications Mar 7 12:48:54 ns3 pdns[2478]: Request to queue notification for domain ' test2.com' was processed, but no valid nameservers or ALSO-NOTIFYs found. Not notifying! Mar 7 12:49:54 ns3 pdns[2478]: No master domains need notifications 2015-03-07 18:36 GMT+01:00 Melvin Mughal mel...@mughal.nu: Having an issue with master-slave configuration. I've used to setup both following the official installation guide ( https://doc.powerdns.com/md/authoritative/installation/). The both work with the standard config and also the API is working. The problem: the master can't seem to notify the slave. The syslog is displaying some issue with a query. What piece of my database/config could be causing this? The settings I changed on both: on the master (in pdns.conf): *allow-axfr-ips=178.62.95.98 (this is the slave server ip)disable-axfr=nomaster=yes* on the slave: *slave=yes* *set the supermaster to the master server ip.* Here is the syslog of the master server. The slave is ok and reporting no errors in the syslog (= Done launching threads, ready to distribute questions): *Mar 7 12:19:50 ns3 pdns[27026]: Reading random entropy from '/dev/urandom'* *Mar 7 12:19:50 ns3 pdns[27026]: This is a guarded instance of pdns* *Mar 7 12:19:50 ns3 pdns[27026]: UDP server bound to 178.62.193.233:53 http://178.62.193.233:53* *Mar 7 12:19:50 ns3 pdns[27026]: TCP server bound to 178.62.193.233:53 http://178.62.193.233:53* *Mar 7 12:19:50 ns3 pdns[27026]: PowerDNS Authoritative Server 3.4.3 (jenk...@autotest.powerdns.com jenk...@autotest.powerdns.com) (C) 2001-2015 PowerDNS.COM BV* *Mar 7 12:19:50 ns3 pdns[27026]: Using 64-bits mode. Built on 20150302135812 by r...@autotest.powerdns.com r...@autotest.powerdns.com, gcc 4.7.2.* *Mar 7 12:19:50 ns3 pdns[27026]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.* *Mar 7 12:19:50 ns3 pdns[27026]: Polled security status of version 3.4.3 at startup, no known issues reported: OK* *Mar 7 12:19:50 ns3 pdns[27026]: Listening for HTTP requests on 178.62.193.233:8081 http://178.62.193.233:8081* *Mar 7 12:19:50 ns3 pdns[27026]: Creating backend connection for TCP* *Mar 7 12:19:50 ns3 pdns[27026]: Master/slave communicator launching* *Mar 7 12:19:50 ns3 pdns[27026]: No new unfresh slave domains, 0 queued for AXFR already* *Mar 7 12:19:50 ns3 pdns[27026]: 1 domain for which we are master needs notifications* *Mar 7 12:19:50 ns3 pdns[27026]: Request to queue notification for domain 'test.com http://test.com' was processed, but no valid nameservers or ALSO-NOTIFYs found. Not notifying!* *Mar 7 12:19:50 ns3 pdns[27026]: Exiting because communicator
[Pdns-users] Master server not notifying slave (syslog included)
Having an issue with master-slave configuration. I've used to setup both following the official installation guide ( https://doc.powerdns.com/md/authoritative/installation/). The both work with the standard config and also the API is working. The problem: the master can't seem to notify the slave. The syslog is displaying some issue with a query. What piece of my database/config could be causing this? The settings I changed on both: on the master (in pdns.conf): *allow-axfr-ips=178.62.95.98 (this is the slave server ip)disable-axfr=nomaster=yes* on the slave: *slave=yes* *set the supermaster to the master server ip.* Here is the syslog of the master server. The slave is ok and reporting no errors in the syslog (= Done launching threads, ready to distribute questions): *Mar 7 12:19:50 ns3 pdns[27026]: Reading random entropy from '/dev/urandom'* *Mar 7 12:19:50 ns3 pdns[27026]: This is a guarded instance of pdns* *Mar 7 12:19:50 ns3 pdns[27026]: UDP server bound to 178.62.193.233:53 http://178.62.193.233:53* *Mar 7 12:19:50 ns3 pdns[27026]: TCP server bound to 178.62.193.233:53 http://178.62.193.233:53* *Mar 7 12:19:50 ns3 pdns[27026]: PowerDNS Authoritative Server 3.4.3 (jenk...@autotest.powerdns.com jenk...@autotest.powerdns.com) (C) 2001-2015 PowerDNS.COM BV* *Mar 7 12:19:50 ns3 pdns[27026]: Using 64-bits mode. Built on 20150302135812 by r...@autotest.powerdns.com r...@autotest.powerdns.com, gcc 4.7.2.* *Mar 7 12:19:50 ns3 pdns[27026]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.* *Mar 7 12:19:50 ns3 pdns[27026]: Polled security status of version 3.4.3 at startup, no known issues reported: OK* *Mar 7 12:19:50 ns3 pdns[27026]: Listening for HTTP requests on 178.62.193.233:8081 http://178.62.193.233:8081* *Mar 7 12:19:50 ns3 pdns[27026]: Creating backend connection for TCP* *Mar 7 12:19:50 ns3 pdns[27026]: Master/slave communicator launching* *Mar 7 12:19:50 ns3 pdns[27026]: No new unfresh slave domains, 0 queued for AXFR already* *Mar 7 12:19:50 ns3 pdns[27026]: 1 domain for which we are master needs notifications* *Mar 7 12:19:50 ns3 pdns[27026]: Request to queue notification for domain 'test.com http://test.com' was processed, but no valid nameservers or ALSO-NOTIFYs found. Not notifying!* *Mar 7 12:19:50 ns3 pdns[27026]: Exiting because communicator thread died with error: GSQLBackend unable to refresh domain_id 6: Failed to execute mysql_query, perhaps connection died? Err=1: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.* *Mar 7 12:19:50 ns3 pdns[27026]: About to create 3 backend threads for UDP* *Mar 7 12:19:50 ns3 pdns[27026]: Done launching threads, ready to distribute questions* *Mar 7 12:19:51 ns3 mysqld: 150307 12:19:51 [Warning] Aborted connection 2396 to db: 'powerdns' user: 'powerdns_user' host: 'localhost' (Unknown error)* *Mar 7 12:19:51 ns3 mysqld: 150307 12:19:51 [Warning] Aborted connection 2398 to db: 'powerdns' user: 'powerdns_user' host: 'localhost' (Unknown error)* *Mar 7 12:19:51 ns3 mysqld: 150307 12:19:51 [Warning] Aborted connection 2399 to db: 'powerdns' user: 'powerdns_user' host: 'localhost' (Unknown error)* *Mar 7 12:19:51 ns3 mysqld: 150307 12:19:51 [Warning] Aborted connection 2400 to db: 'powerdns' user: 'powerdns_user' host: 'localhost' (Unknown error)* *Mar 7 12:19:52 ns3 pdns[25864]: Our pdns instance exited with code 0* Mar 7 12:19:52 ns3 pdns[25864]: Respawning ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] Master server not notifying slave (syslog included)
I fixed the binary log warning by setting the variable to mixed (SET SESSION binlog_format = 'ROW';). Now the syslog is just saying no valid nameservers. Which config part did I make a mistake? Mar 7 12:47:54 ns3 pdns[2478]: Using 64-bits mode. Built on 20150302135812 by r...@autotest.powerdns.com, gcc 4.7.2. Mar 7 12:47:54 ns3 pdns[2478]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2. Mar 7 12:47:54 ns3 pdns[2478]: Polled security status of version 3.4.3 at startup, no known issues reported: OK Mar 7 12:47:54 ns3 pdns[2478]: Listening for HTTP requests on 178.62.193.234:8081 Mar 7 12:47:54 ns3 pdns[2478]: Creating backend connection for TCP Mar 7 12:47:54 ns3 pdns[2478]: Master/slave communicator launching Mar 7 12:47:54 ns3 pdns[2478]: No new unfresh slave domains, 0 queued for AXFR already Mar 7 12:47:54 ns3 pdns[2478]: No master domains need notifications Mar 7 12:47:54 ns3 pdns[2478]: About to create 3 backend threads for UDP Mar 7 12:47:54 ns3 pdns[2478]: Done launching threads, ready to distribute questions Mar 7 12:48:54 ns3 pdns[2478]: 1 domain for which we are master needs notifications Mar 7 12:48:54 ns3 pdns[2478]: Request to queue notification for domain ' test2.com' was processed, but no valid nameservers or ALSO-NOTIFYs found. Not notifying! Mar 7 12:49:54 ns3 pdns[2478]: No master domains need notifications 2015-03-07 18:36 GMT+01:00 Melvin Mughal mel...@mughal.nu: Having an issue with master-slave configuration. I've used to setup both following the official installation guide ( https://doc.powerdns.com/md/authoritative/installation/). The both work with the standard config and also the API is working. The problem: the master can't seem to notify the slave. The syslog is displaying some issue with a query. What piece of my database/config could be causing this? The settings I changed on both: on the master (in pdns.conf): *allow-axfr-ips=178.62.95.98 (this is the slave server ip)disable-axfr=nomaster=yes* on the slave: *slave=yes* *set the supermaster to the master server ip.* Here is the syslog of the master server. The slave is ok and reporting no errors in the syslog (= Done launching threads, ready to distribute questions): *Mar 7 12:19:50 ns3 pdns[27026]: Reading random entropy from '/dev/urandom'* *Mar 7 12:19:50 ns3 pdns[27026]: This is a guarded instance of pdns* *Mar 7 12:19:50 ns3 pdns[27026]: UDP server bound to 178.62.193.233:53 http://178.62.193.233:53* *Mar 7 12:19:50 ns3 pdns[27026]: TCP server bound to 178.62.193.233:53 http://178.62.193.233:53* *Mar 7 12:19:50 ns3 pdns[27026]: PowerDNS Authoritative Server 3.4.3 (jenk...@autotest.powerdns.com jenk...@autotest.powerdns.com) (C) 2001-2015 PowerDNS.COM BV* *Mar 7 12:19:50 ns3 pdns[27026]: Using 64-bits mode. Built on 20150302135812 by r...@autotest.powerdns.com r...@autotest.powerdns.com, gcc 4.7.2.* *Mar 7 12:19:50 ns3 pdns[27026]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.* *Mar 7 12:19:50 ns3 pdns[27026]: Polled security status of version 3.4.3 at startup, no known issues reported: OK* *Mar 7 12:19:50 ns3 pdns[27026]: Listening for HTTP requests on 178.62.193.233:8081 http://178.62.193.233:8081* *Mar 7 12:19:50 ns3 pdns[27026]: Creating backend connection for TCP* *Mar 7 12:19:50 ns3 pdns[27026]: Master/slave communicator launching* *Mar 7 12:19:50 ns3 pdns[27026]: No new unfresh slave domains, 0 queued for AXFR already* *Mar 7 12:19:50 ns3 pdns[27026]: 1 domain for which we are master needs notifications* *Mar 7 12:19:50 ns3 pdns[27026]: Request to queue notification for domain 'test.com http://test.com' was processed, but no valid nameservers or ALSO-NOTIFYs found. Not notifying!* *Mar 7 12:19:50 ns3 pdns[27026]: Exiting because communicator thread died with error: GSQLBackend unable to refresh domain_id 6: Failed to execute mysql_query, perhaps connection died? Err=1: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.* *Mar 7 12:19:50 ns3 pdns[27026]: About to create 3 backend threads for UDP* *Mar 7 12:19:50 ns3 pdns[27026]: Done launching threads, ready to distribute questions* *Mar 7 12:19:51 ns3 mysqld: 150307 12:19:51 [Warning] Aborted connection 2396 to db: 'powerdns' user: 'powerdns_user' host: 'localhost' (Unknown error)* *Mar 7 12:19:51 ns3 mysqld: 150307 12:19:51 [Warning] Aborted connection 2398 to db: 'powerdns' user: 'powerdns_user' host: 'localhost' (Unknown error)* *Mar 7 12:19:51 ns3 mysqld: 150307 12:19:51 [Warning] Aborted connection
Re: [Pdns-users] API issue
Ok, I'm an idiot. Found the problem. I did apt-get the package to install and assumed it was the latest and greatest. The dump/monitor doesn't show version when it has an error. After I deleted all the API lines, the server started. When I dumped the log it showed the version.. PowerDNS version 3.3.1...which has no API support. Eventually, Koko was right ;) I tried the newest version 3.4.3 through instructions ( https://doc.powerdns.com/md/authoritative/installation/) via dpkg install. But when I try to install the pdns-backend-mysql package it won't install, saying it needs pdns 3.3.1. I tried to first install pdns 3.3.1 and get rid off it via dpkg replacing it with pdns 3.4.3. But that doesn't work. Is there a newer version I need to get? 2015-03-05 12:30 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: *Mar 05 06:04:28 Fatal error: Trying to set unexisting parameter 'webserver-allow-from'* IIRC (I don't feel like going back to study all this) you've been telling us all the time that all was fine... Before bothering with the API, make sure your PowerDNS server starts without errors. Check the documentation. If you've built this yourself, make sure you build with the necessary options to enable the features you need. Otherwise grab a built package from the PowerDNS downloads page as these include what you're probably missing. When that's done, step by step, go on to the next step. -JP ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
Ok, did a fresh install. Now it's listening on 8081, pdns monitor seems to say everything is oke, but curl still goes bad: /etc/powerdns# service pdns monitor Mar 05 12:36:05 Reading random entropy from '/dev/urandom' Mar 05 12:36:05 This is a standalone pdns Mar 05 12:36:05 UDP server bound to 178.62.251.135:53 Mar 05 12:36:05 TCP server bound to 178.62.251.135:53 Mar 05 12:36:05 PowerDNS Authoritative Server 3.4.3 ( jenk...@autotest.powerdns.com) (C) 2001-2015 PowerDNS.COM BV Mar 05 12:36:05 Using 64-bits mode. Built on 20150302135812 by r...@autotest.powerdns.com, gcc 4.7.2. Mar 05 12:36:05 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2. Mar 05 12:36:05 Polled security status of version 3.4.3 at startup, no known issues reported: OK Mar 05 12:36:05 Creating backend connection for TCP % Mar 05 12:36:05 gmysql Connection successful. Connected to database 'powerdns' on 'localhost'. Mar 05 12:36:05 About to create 3 backend threads for UDP Mar 05 12:36:05 gmysql Connection successful. Connected to database 'powerdns' on 'localhost'. Mar 05 12:36:05 gmysql Connection successful. Connected to database 'powerdns' on 'localhost'. Mar 05 12:36:05 gmysql Connection successful. Connected to database 'powerdns' on 'localhost'. Mar 05 12:36:05 Done launching threads, ready to distribute questions ^C root@8:/etc/powerdns# service pdns start Starting PowerDNS authoritative nameserver: started root@8:/etc/powerdns# service pdns status 686: Child running on pid 688 root@8:/etc/powerdns# lsof -i -P | grep -i 8081 pdns_serv 688 root6u IPv4 35710 0t0 TCP 178.62.251.135:8081 (LISTEN) *Here is the curl (with webserver-allow-from=0.0.0.0):* curl --local-port 8081 -H 'X-API-Key: otto' http://178.62.251.135:8081/servers/localhost/zones curl: (56) Recv failure: Connection reset by peer *Here is the curl with (with webserver-allow-from=my own connection ip, where the curl is coming from)* curl --local-port 8081 -H 'X-API-Key: otto' http://178.62.251.135:8081/servers/localhost/zones Internal Server Error 2015-03-05 17:52 GMT+01:00 Aki Tuomi cmo...@youzen.ext.b2.fi: On Thu, Mar 05, 2015 at 05:43:36PM +0100, Melvin Mughal wrote: Ok, I'm an idiot. Found the problem. I did apt-get the package to install and assumed it was the latest and greatest. The dump/monitor doesn't show version when it has an error. After I deleted all the API lines, the server started. When I dumped the log it showed the version.. PowerDNS version 3.3.1...which has no API support. Eventually, Koko was right ;) I tried the newest version 3.4.3 through instructions ( https://doc.powerdns.com/md/authoritative/installation/) via dpkg install. But when I try to install the pdns-backend-mysql package it won't install, saying it needs pdns 3.3.1. I tried to first install pdns 3.3.1 and get rid off it via dpkg replacing it with pdns 3.4.3. But that doesn't work. Is there a newer version I need to get? Hi, the static debian package provided by PowerDNS contains most backends. Aki ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
I actually just copied/adjusted your config and run the same curl commands. So my config in the pdns.conf for the API: *webserver-address=ip address of the server* *webserver-allow-from=0.0.0.0, ::/0* *webserver-port=8081* *webserver=yes* *experimental-api-key=otto* *experimental-json-interface=yes* The curl commands I run form my own system to the server: *curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost http://xxx.xx.xx.xx:8081/servers/localhost* curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost/zones And it just returns nothing. So the crud in the API key wasn't an issue I guess. No errors and also no result. But there is a zone file in there, so it should be returning something. I restarted pdns a million times and still no 8081 port listening with this config. 2015-03-05 7:34 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: This version of PowerDNS we use is PowerDNS Authoritative Server 3.4.2. This is the entire pdns.conf file in /etc/powerdns: http://pastebin.com/14LqMbLp Line 623 has crud behind it; that better not be in the configuration. Also show us the *exact* curl command you're using from the command-line, and the API key (if you're using line 623) better be protected from the shell. :) -JP ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
I actually did respond to that Jan-Piet, almost right away with the info he asked for. The problems have finally been solved. The syslog gave a warning one where clause was failing. One field in a table seemed to be wrong and corrected it. Now the curl comes back. Many thanks to all for all the help! 2015-03-05 19:46 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: Actually, why do you insist on not providing the information that is asked of you. People here are doing their best to help; at the very least it would be polite to respond with the information requested. Christian wrote: Start curl with -v and report back both the exact, unmodified curl command line and the complete output curl produced. You do not need to mask your IP addresses, nobody’s going to bother, esp. if those are in an RFC1918 range anyway This is my last message on this thread. -JP ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
Sorry about being unspecific. This is the uncut version: curl -v 'X-API-Key: otto' http://188.226.135.47:8081/servers/localhost/zones * Rebuilt URL to: X-API-Key: otto/ * Hostname was NOT found in DNS cache * Could not resolve host: X-API-Key * Closing connection 0 curl: (6) Could not resolve host: X-API-Key * Hostname was NOT found in DNS cache * Trying 188.226.135.47... * connect to 188.226.135.47 port 8081 failed: Connection refused * Failed to connect to 188.226.135.47 port 8081: Connection refused * Closing connection 1 curl: (7) Failed to connect to 188.226.135.47 port 8081: Connection refused The main problem is that nothing is listening on 8081, but it's in the config. The firewall (Iptables) is not blocking anything at te moment. So it refuses because nothing is on the port. To be specific: I check the port with the command 'lsof -i -P | grep -i 8081'. 2015-03-05 11:20 GMT+01:00 Christian Hofstaedtler christian.hofstaedt...@deduktiva.com: Hi, On 05 Mar 2015, at 10:57, Melvin Mughal mel...@mughal.nu wrote: The curl commands I run form my own system to the server: curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost/zones And it just returns nothing. So the crud in the API key wasn't an issue I guess. No errors and also no result. But there is a zone file in there, so it should be returning something. I restarted pdns a million times and still no 8081 port listening with this config. You need to stop being unspecific, and you need to stop using “-s” for curl — “nothing” is not a helpful description of an outcome. Start curl with -v and report back both the exact, unmodified curl command line and the complete output curl produced. You do not need to mask your IP addresses, nobody’s going to bother, esp. if those are in an RFC1918 range anyway. 2015-03-05 7:34 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: Also show us the *exact* curl command you're using from the command-line, and the API key (if you're using line 623) better be protected from the shell. :) -- Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien) www.deduktiva.com / +43 1 353 1707 ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
*sudo /etc/init.d/pdns monitor* *Mar 05 06:04:28 Reading random entropy from '/dev/urandom'* *Mar 05 06:04:28 This is module gmysqlbackend.so reporting* *Mar 05 06:04:28 This is a standalone pdns* *Mar 05 06:04:28 Fatal error: Trying to set unexisting parameter 'webserver-allow-from'* I've tried every example like: webserver-allow-from=127.0.0.0/8,172.16.153.0/24 webserver-allow-from=0.0.0.0, ::/0 (default according to documentation) Get the same fatal error on every try. 2015-03-05 11:49 GMT+01:00 Keresztes Péter-Zoltán z...@z0z0.tk: Try restarting the powerdns or maybe start it in debug mode so that you can see why is not listening. On Mar 5, 2015, at 12:42 PM, Melvin Mughal mel...@mughal.nu wrote: Sorry about being unspecific. This is the uncut version: curl -v 'X-API-Key: otto' http://188.226.135.47:8081/servers/localhost/zones * Rebuilt URL to: X-API-Key: otto/ * Hostname was NOT found in DNS cache * Could not resolve host: X-API-Key * Closing connection 0 curl: (6) Could not resolve host: X-API-Key * Hostname was NOT found in DNS cache * Trying 188.226.135.47... * connect to 188.226.135.47 port 8081 failed: Connection refused * Failed to connect to 188.226.135.47 port 8081: Connection refused * Closing connection 1 curl: (7) Failed to connect to 188.226.135.47 port 8081: Connection refused The main problem is that nothing is listening on 8081, but it's in the config. The firewall (Iptables) is not blocking anything at te moment. So it refuses because nothing is on the port. To be specific: I check the port with the command 'lsof -i -P | grep -i 8081'. 2015-03-05 11:20 GMT+01:00 Christian Hofstaedtler christian.hofstaedt...@deduktiva.com: Hi, On 05 Mar 2015, at 10:57, Melvin Mughal mel...@mughal.nu wrote: The curl commands I run form my own system to the server: curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost/zones And it just returns nothing. So the crud in the API key wasn't an issue I guess. No errors and also no result. But there is a zone file in there, so it should be returning something. I restarted pdns a million times and still no 8081 port listening with this config. You need to stop being unspecific, and you need to stop using “-s” for curl — “nothing” is not a helpful description of an outcome. Start curl with -v and report back both the exact, unmodified curl command line and the complete output curl produced. You do not need to mask your IP addresses, nobody’s going to bother, esp. if those are in an RFC1918 range anyway. 2015-03-05 7:34 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: Also show us the *exact* curl command you're using from the command-line, and the API key (if you're using line 623) better be protected from the shell. :) -- Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien) www.deduktiva.com / +43 1 353 1707 ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
Running PowerDNS Authoritative Server 3.4.2. 2015-03-05 12:20 GMT+01:00 Keresztes Péter-Zoltán z...@z0z0.tk: What is the version of pdns you are running? On Mar 5, 2015, at 1:11 PM, Melvin Mughal mel...@mughal.nu wrote: *sudo /etc/init.d/pdns monitor* *Mar 05 06:04:28 Reading random entropy from '/dev/urandom'* *Mar 05 06:04:28 This is module gmysqlbackend.so reporting* *Mar 05 06:04:28 This is a standalone pdns* *Mar 05 06:04:28 Fatal error: Trying to set unexisting parameter 'webserver-allow-from'* I've tried every example like: webserver-allow-from=127.0.0.0/8,172.16.153.0/24 webserver-allow-from=0.0.0.0, ::/0 (default according to documentation) Get the same fatal error on every try. 2015-03-05 11:49 GMT+01:00 Keresztes Péter-Zoltán z...@z0z0.tk: Try restarting the powerdns or maybe start it in debug mode so that you can see why is not listening. On Mar 5, 2015, at 12:42 PM, Melvin Mughal mel...@mughal.nu wrote: Sorry about being unspecific. This is the uncut version: curl -v 'X-API-Key: otto' http://188.226.135.47:8081/servers/localhost/zones * Rebuilt URL to: X-API-Key: otto/ * Hostname was NOT found in DNS cache * Could not resolve host: X-API-Key * Closing connection 0 curl: (6) Could not resolve host: X-API-Key * Hostname was NOT found in DNS cache * Trying 188.226.135.47... * connect to 188.226.135.47 port 8081 failed: Connection refused * Failed to connect to 188.226.135.47 port 8081: Connection refused * Closing connection 1 curl: (7) Failed to connect to 188.226.135.47 port 8081: Connection refused The main problem is that nothing is listening on 8081, but it's in the config. The firewall (Iptables) is not blocking anything at te moment. So it refuses because nothing is on the port. To be specific: I check the port with the command 'lsof -i -P | grep -i 8081'. 2015-03-05 11:20 GMT+01:00 Christian Hofstaedtler christian.hofstaedt...@deduktiva.com: Hi, On 05 Mar 2015, at 10:57, Melvin Mughal mel...@mughal.nu wrote: The curl commands I run form my own system to the server: curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost/zones And it just returns nothing. So the crud in the API key wasn't an issue I guess. No errors and also no result. But there is a zone file in there, so it should be returning something. I restarted pdns a million times and still no 8081 port listening with this config. You need to stop being unspecific, and you need to stop using “-s” for curl — “nothing” is not a helpful description of an outcome. Start curl with -v and report back both the exact, unmodified curl command line and the complete output curl produced. You do not need to mask your IP addresses, nobody’s going to bother, esp. if those are in an RFC1918 range anyway. 2015-03-05 7:34 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: Also show us the *exact* curl command you're using from the command-line, and the API key (if you're using line 623) better be protected from the shell. :) -- Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien) www.deduktiva.com / +43 1 353 1707 ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
Yep, tried it. Put it in the config on 8081 and also tried 8082. But then we get the 'curl: (45) bind failed with errno 48: Address already in use' response back. So no luck with that :( 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: Hi Melvin, Seems you are talking to your local apache, Try hostname:8081 for your request, unless of course you have gone through the trouble of reverse proxying the pdns instance. AJ On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote: Followed the readme (https://doc.powerdns.com/md/httpapi/README/). Added those three lines to the pdns.conf, to get the API working. When we try an API call, it gives: *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN* *htmlhead* *title404 Not Found/title* */headbody* *h1Not Found/h1* *pThe requested URL /servers/localhost/zones was not found on this server./p* *hr* *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com http://ourhostname.com Port 80/address* */body/html* When we add the lines to specify on which address the webserver should be found, we get: curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib' http://ourhostname.com/servers/localhost/zones http://ns3.undev.nl/servers/localhost/zones ruby-2.1.1 [16:05] curl: (45) bind failed with errno 48: Address already in use Anyone knows what's going wrong? ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
Local port doesn't change anything and nc localhost returns nothing. To configure the port, I added these lines: *# IP Address of web server to listen on* *webserver-address=127.0.0.1* *# Port of web server to listen on* *webserver-port=8081* *# Web server access is only allowed from these subnets* *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0* And restarted pdns with 'sudo service pdns restart'. Now when I run 'sudo lsof -i -P | grep -i 8081' to see what is listening on that port, I get nothing at all listening on that port. Shouldn't the port be listening after the pdns restart? 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk: --local-port specifies which OUTGOING PORT will curl use. not the destination port. On 03/04/15 16:41, Melvin Mughal wrote: Yep, tried it. Put it in the config on 8081 and also tried 8082. But then we get the 'curl: (45) bind failed with errno 48: Address already in use' response back. So no luck with that :( 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: Hi Melvin, Seems you are talking to your local apache, Try hostname:8081 for your request, unless of course you have gone through the trouble of reverse proxying the pdns instance. AJ On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote: Followed the readme (https://doc.powerdns.com/md/httpapi/README/). Added those three lines to the pdns.conf, to get the API working. When we try an API call, it gives: *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN* *htmlhead* *title404 Not Found/title* */headbody* *h1Not Found/h1* *pThe requested URL /servers/localhost/zones was not found on this server./p* *hr* *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com http://ourhostname.com Port 80/address* */body/html* When we add the lines to specify on which address the webserver should be found, we get: curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib' http://ourhostname.com/servers/localhost/zones http://ns3.undev.nl/servers/localhost/zones ruby-2.1.1 [16:05] curl: (45) bind failed with errno 48: Address already in use Anyone knows what's going wrong? ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users -- Juraj Lutter URL: http://www.wilbury.sk/ XMPP: ju...@lutter.sk Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/ ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
Yes, already in the same config: # Enable and config API experimental-json-interface=yes experimental-api-key=NwYkpVMMuGEaDH8ib (not the real API key) webserver=yes 2015-03-04 17:20 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: You will also have to ensure have been set in config. experimental-json-interface=yes experimental-api-key=changeme On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote: Local port doesn't change anything and nc localhost returns nothing. To configure the port, I added these lines: *# IP Address of web server to listen on* *webserver-address=127.0.0.1* *# Port of web server to listen on* *webserver-port=8081* *# Web server access is only allowed from these subnets* *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0* And restarted pdns with 'sudo service pdns restart'. Now when I run 'sudo lsof -i -P | grep -i 8081' to see what is listening on that port, I get nothing at all listening on that port. Shouldn't the port be listening after the pdns restart? 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk: --local-port specifies which OUTGOING PORT will curl use. not the destination port. On 03/04/15 16:41, Melvin Mughal wrote: Yep, tried it. Put it in the config on 8081 and also tried 8082. But then we get the 'curl: (45) bind failed with errno 48: Address already in use' response back. So no luck with that :( 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: Hi Melvin, Seems you are talking to your local apache, Try hostname:8081 for your request, unless of course you have gone through the trouble of reverse proxying the pdns instance. AJ On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote: Followed the readme (https://doc.powerdns.com/md/httpapi/README/). Added those three lines to the pdns.conf, to get the API working. When we try an API call, it gives: *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN* *htmlhead* *title404 Not Found/title* */headbody* *h1Not Found/h1* *pThe requested URL /servers/localhost/zones was not found on this server./p* *hr* *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com http://ourhostname.com Port 80/address* */body/html* When we add the lines to specify on which address the webserver should be found, we get: curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib' http://ourhostname.com/servers/localhost/zones http://ns3.undev.nl/servers/localhost/zones ruby-2.1.1 [16:05] curl: (45) bind failed with errno 48: Address already in use Anyone knows what's going wrong? ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users -- Juraj Lutter URL: http://www.wilbury.sk/ XMPP: ju...@lutter.sk Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/ ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
This version of PowerDNS we use is PowerDNS Authoritative Server 3.4.2. This is the entire pdns.conf file in /etc/powerdns: http://pastebin.com/14LqMbLp 2015-03-04 18:30 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: Weird... For sure its not hitting the API service, its apache. Could you post version and config information please, removing any identifiable or security information and i will test your config on a vm and let you know AJ On 4 March 2015 at 16:27, Melvin Mughal mel...@mughal.nu wrote: Yes, already in the same config: # Enable and config API experimental-json-interface=yes experimental-api-key=NwYkpVMMuGEaDH8ib (not the real API key) webserver=yes 2015-03-04 17:20 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: You will also have to ensure have been set in config. experimental-json-interface=yes experimental-api-key=changeme On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote: Local port doesn't change anything and nc localhost returns nothing. To configure the port, I added these lines: *# IP Address of web server to listen on* *webserver-address=127.0.0.1* *# Port of web server to listen on* *webserver-port=8081* *# Web server access is only allowed from these subnets* *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0* And restarted pdns with 'sudo service pdns restart'. Now when I run 'sudo lsof -i -P | grep -i 8081' to see what is listening on that port, I get nothing at all listening on that port. Shouldn't the port be listening after the pdns restart? 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk: --local-port specifies which OUTGOING PORT will curl use. not the destination port. On 03/04/15 16:41, Melvin Mughal wrote: Yep, tried it. Put it in the config on 8081 and also tried 8082. But then we get the 'curl: (45) bind failed with errno 48: Address already in use' response back. So no luck with that :( 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: Hi Melvin, Seems you are talking to your local apache, Try hostname:8081 for your request, unless of course you have gone through the trouble of reverse proxying the pdns instance. AJ On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote: Followed the readme (https://doc.powerdns.com/md/httpapi/README/). Added those three lines to the pdns.conf, to get the API working. When we try an API call, it gives: *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN* *htmlhead* *title404 Not Found/title* */headbody* *h1Not Found/h1* *pThe requested URL /servers/localhost/zones was not found on this server./p* *hr* *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com http://ourhostname.com Port 80/address* */body/html* When we add the lines to specify on which address the webserver should be found, we get: curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib' http://ourhostname.com/servers/localhost/zones http://ns3.undev.nl/servers/localhost/zones ruby-2.1.1 [16:05] curl: (45) bind failed with errno 48: Address already in use Anyone knows what's going wrong? ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users -- Juraj Lutter URL: http://www.wilbury.sk/ XMPP: ju...@lutter.sk Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/ ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] API issue
Tried the config lines from this post ( http://jpmens.net/2015/01/09/a-look-at-the-powerdns-rest-api/) and the curl commands give no errors anymore. But the problem remains, that nothing is listening on 8081. So the curl in the command line returns nothing. 2015-03-04 20:09 GMT+01:00 Melvin Mughal mel...@mughal.nu: This version of PowerDNS we use is PowerDNS Authoritative Server 3.4.2. This is the entire pdns.conf file in /etc/powerdns: http://pastebin.com/14LqMbLp 2015-03-04 18:30 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: Weird... For sure its not hitting the API service, its apache. Could you post version and config information please, removing any identifiable or security information and i will test your config on a vm and let you know AJ On 4 March 2015 at 16:27, Melvin Mughal mel...@mughal.nu wrote: Yes, already in the same config: # Enable and config API experimental-json-interface=yes experimental-api-key=NwYkpVMMuGEaDH8ib (not the real API key) webserver=yes 2015-03-04 17:20 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: You will also have to ensure have been set in config. experimental-json-interface=yes experimental-api-key=changeme On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote: Local port doesn't change anything and nc localhost returns nothing. To configure the port, I added these lines: *# IP Address of web server to listen on* *webserver-address=127.0.0.1* *# Port of web server to listen on* *webserver-port=8081* *# Web server access is only allowed from these subnets* *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0* And restarted pdns with 'sudo service pdns restart'. Now when I run 'sudo lsof -i -P | grep -i 8081' to see what is listening on that port, I get nothing at all listening on that port. Shouldn't the port be listening after the pdns restart? 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk: --local-port specifies which OUTGOING PORT will curl use. not the destination port. On 03/04/15 16:41, Melvin Mughal wrote: Yep, tried it. Put it in the config on 8081 and also tried 8082. But then we get the 'curl: (45) bind failed with errno 48: Address already in use' response back. So no luck with that :( 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com: Hi Melvin, Seems you are talking to your local apache, Try hostname:8081 for your request, unless of course you have gone through the trouble of reverse proxying the pdns instance. AJ On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote: Followed the readme (https://doc.powerdns.com/md/httpapi/README/). Added those three lines to the pdns.conf, to get the API working. When we try an API call, it gives: *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN* *htmlhead* *title404 Not Found/title* */headbody* *h1Not Found/h1* *pThe requested URL /servers/localhost/zones was not found on this server./p* *hr* *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com http://ourhostname.com Port 80/address* */body/html* When we add the lines to specify on which address the webserver should be found, we get: curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib' http://ourhostname.com/servers/localhost/zones http://ns3.undev.nl/servers/localhost/zones ruby-2.1.1 [16:05] curl: (45) bind failed with errno 48: Address already in use Anyone knows what's going wrong? ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users -- Juraj Lutter URL: http://www.wilbury.sk/ XMPP: ju...@lutter.sk Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/ ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users -- AJ McKee phone: +353 83 1130 545 profile: http://linkedin.com/in/ajmkee jid: aj.mc...@druid-dns.com blog:http://aj.mc-kee.com/ twitter: @ajmckee ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] How to add master zone through PowerDNS API?
Probably it's a Poweradmin thing. I thought it was a PowerDNS feature. In Poweradmin, you can create zone templates and when creating a zone, you can select a template you wish to use for the records to be automatically created. Very handy feature. 2015-02-27 10:57 GMT+01:00 Christian Hofstaedtler christian.hofstaedt...@deduktiva.com: PowerDNS doesn’t know anything about templates. What are you talking about? -- Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien) www.deduktiva.com / +43 1 353 1707 On 27 Feb 2015, at 11:09, Melvin Mughal mel...@mughal.nu wrote: That's a shame. It would be great if you could give the template name with the API call and it would automatically create records from that template. That would be a feature request ;) 2015-02-26 21:06 GMT+01:00 Christian Hofstaedtler christian.hofstaedt...@deduktiva.com: On 26 Feb 2015, at 21:06, Melvin Mughal mel...@mughal.nu wrote: I've seen the API example (http://doc.powerdns.com/md/httpapi/README/), but it doesn't show how to create a new zone with an existing zone template. How can I include the zone template in that API call? There are no templates, but you can include records with the create call. Example: curl -X POST --data '{ name: example.com, kind: Native, masters: [], nameservers: [ns1.example.org, ns2.example.org], records: [ { name: www.example.com, type: A, ttl: 3600, content: “192.0.2.4, disabled: false } ] }' -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones Christian -- Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien) www.deduktiva.com / +43 1 353 1707 ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] How to add master zone through PowerDNS API?
I'm not a DNS expert, but why exactly is zone templates something which you guys politely call useless? In our perspective, it seems efficient and clean when: 1. You need to import a lot of zones (in our case more than 50k). Just adding a template attribute to the API call makes it a bit more easy. Now I'm explaining to devs what goes where and why, instead of just giving a more straight forward call. 2. You have several parties using your DNS API and the administrator can set a fixed template so records are filled in a certain way with required values by the administrator. We work with different parties an different requirements. Gives a bit more control. 3. Less error prone if multiple devs are working with it within different implementations and don't have any knowledge about nameservers and how to set things properly. Again explaining stuff to devs where these things aren't within their primary focus. I can guess the counter argument already: just give the damn API example and be done with it. But I'd rather explain why this seems useful in our perspective to keep the topic constructive instead of calling things 'utterly useless' by some without giving any real arguments. 2015-02-27 16:00 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: template are not standard for everyone. so this useless. Utterly useless, yes. -JP ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] How to add master zone through PowerDNS API?
That's a shame. It would be great if you could give the template name with the API call and it would automatically create records from that template. That would be a feature request ;) 2015-02-26 21:06 GMT+01:00 Christian Hofstaedtler christian.hofstaedt...@deduktiva.com: On 26 Feb 2015, at 21:06, Melvin Mughal mel...@mughal.nu wrote: I've seen the API example (http://doc.powerdns.com/md/httpapi/README/), but it doesn't show how to create a new zone with an existing zone template. How can I include the zone template in that API call? There are no templates, but you can include records with the create call. Example: curl -X POST --data '{ name: example.com, kind: Native, masters: [], nameservers: [ns1.example.org, ns2.example.org], records: [ { name: www.example.com, type: A, ttl: 3600, content: “192.0.2.4, disabled: false } ] }' -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones Christian -- Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien) www.deduktiva.com / +43 1 353 1707 ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
Re: [Pdns-users] How to add master zone through PowerDNS API?
I've seen the API example (http://doc.powerdns.com/md/httpapi/README/), but it doesn't show how to create a new zone with an existing zone template. How can I include the zone template in that API call? 2015-02-26 20:06 GMT+01:00 Jan-Piet Mens jpmens@gmail.com: Does anyone have an API call example on how to do this? There is an example in the documentation [1]. -JP [1] http://doc.powerdns.com/md/httpapi/README/ ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users
[Pdns-users] How to add master zone through PowerDNS API?
We're running a master-slave setup. We want to use the PowerDNS API to automatically create master zones on the master server from our application. We created a master zone template, so when a domain is added the zonefile is automatically filled with the correct records and notifies the slave. I can't find any good reference on how to do this through the PowerDNS API. I want to post it a domain from the application via an API call and request to make a new master zone file for the domain with the zone template. Does anyone have an API call example on how to do this? ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-users