Re: [Pdns-users] API issue

2020-11-24 Thread Peter van Dijk via Pdns-users
(resent from correct account - apologies if my previous email also appears eventually) On Sun, 2020-11-22 at 12:24 +0100, Stef Coene via Pdns-users wrote: > Hi, > > I noticed that you can add a record with no content if you specify a > comment. Not exactly - because there is no 'records' array

Re: [Pdns-users] API issue

2020-07-26 Thread qutic development via Pdns-users
> we are using PowerDNS version 4.2.2 and seeing errors creating subdomains via > the api. > > The following curl worked for years [1], but after an update to latest pdns > version it is returning 500 http errors: > > curl -i -s -XPATCH \ > -H 'X-API-Key: $powerdns_api_key' \ >

Re: [Pdns-users] API issue

2020-06-22 Thread qutic development via Pdns-users
Hi Aki, >> we are using PowerDNS version 4.2.2 and seeing errors creating subdomains >> via the api. >> >> The following curl worked for years [1], but after an update to latest pdns >> version it is returning 500 http errors: >> >> curl -i -s -XPATCH \ >> -H 'X-API-Key: $powerdns_api_key' \

Re: [Pdns-users] API issue

2015-03-05 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-05 Thread Aki Tuomi
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

Re: [Pdns-users] API issue

2015-03-05 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-05 Thread Melvin Mughal
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*

Re: [Pdns-users] API issue

2015-03-05 Thread Jan-Piet Mens
curl --local-port 8081 -H 'X-API-Key: otto' http://178.62.251.135:8081/servers/localhost/zones Why do you insist on using --local-port ? -JP ___ Pdns-users mailing list Pdns-users@mailman.powerdns.com

Re: [Pdns-users] API issue

2015-03-05 Thread Jan-Piet Mens
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

Re: [Pdns-users] API issue

2015-03-05 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-05 Thread Keresztes Péter-Zoltán
As far as I remember this was introduced in 3.4 version of pdns-server On Mar 5, 2015, at 1:20 PM, Keresztes Péter-Zoltán z...@z0z0.tk wrote: What is the version of pdns you are running? On Mar 5, 2015, at 1:11 PM, Melvin Mughal mel...@mughal.nu mailto:mel...@mughal.nu wrote: sudo

Re: [Pdns-users] API issue

2015-03-05 Thread Christian Hofstaedtler
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

Re: [Pdns-users] API issue

2015-03-05 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-05 Thread Keresztes Péter-Zoltán
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'

Re: [Pdns-users] API issue

2015-03-05 Thread Melvin Mughal
*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

Re: [Pdns-users] API issue

2015-03-05 Thread Koko Wijatmoko
On Thu, 5 Mar 2015 12:11:03 +0100 Melvin Mughal mel...@mughal.nu wrote: *Mar 05 06:04:28 Fatal error: Trying to set unexisting parameter 'webserver-allow-from'* maybe your pdns is to old, and not support webserver-allow-from setting. ___ Pdns-users

Re: [Pdns-users] API issue

2015-03-05 Thread Keresztes Péter-Zoltán
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

Re: [Pdns-users] API issue

2015-03-05 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-05 Thread Jan-Piet Mens
*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

Re: [Pdns-users] API issue. 400 Bad Request

2015-03-05 Thread Christian Hofstaedtler
Hi, On 05 Mar 2015, at 13:16, kometch kome...@gmail.com wrote: [..] I have used to compile the PowerDNS recursor 3.7.1 on an ARM board from a source that Cubietruck. [..] $ curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8082/servers/localhost | jq . * Hostname was NOT found in DNS

Re: [Pdns-users] API issue. 400 Bad Request

2015-03-05 Thread kometch
Hello Christian, In some versions, '400 Bad Request’ may also happen because of wrong authentication (i.e. wrong X-API-Key). Please double check the API Key. recursor.conf on which was initialized, and has been set again following parameters, the results did not change.

Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
Yes because you are telling curl to use port 8081, try just curl hostname:8081 and you commands, i.e. remove --local-port Failing that, try nc localhost 8081 and simulate a HTTP request to the service. AJ On 4 March 2015 at 15:41, Melvin Mughal mel...@mughal.nu wrote: Yep, tried it. Put it

Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
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:

Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
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,

Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
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.

Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
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

Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
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

Re: [Pdns-users] API issue

2015-03-04 Thread Jan-Piet Mens
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