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

[Pdns-users] API issue

2020-11-22 Thread Stef Coene via Pdns-users
Hi, I noticed that you can add a record with no content if you specify a comment. We use the mysql backend. This API call works and adds an entry to the comments table: { "rrsets": [ { "name": "test2.test.com.", "type": "A", "ttl": "3600", "comments": [ {

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' \ > https://$power

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' \ >

[Pdns-users] API issue

2020-06-19 Thread qutic development via Pdns-users
Hi list, 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' \ https://$powerdns_ho

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 he

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 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 http://mailman.powerdns.com/mailman/li

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 to

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 > star

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 3.3

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. experimental-api-k

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

2015-03-05 Thread Christian Hofstaedtler
Hi, > On 05 Mar 2015, at 13:16, kometch 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 cache > * Tr

[Pdns-users] API issue. 400 Bad Request

2015-03-05 Thread kometch
Hello All, I have used to compile the PowerDNS recursor 3.7.1 on an ARM board from a source that Cubietruck. Below the place you are trying to obtain statistical information by API on which has been set to PowerDNS recursor to reference, become Bad Request problem has occurred. $ curl -v -H '

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 th

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 wrote: > > What is the version of pdns you are running? > >> On Mar 5, 2015, at 1:11 PM, Melvin Mughal > > wrote: >> >> sudo /etc/init.d/pdns mo

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 : > What is the version of pdns you are running? > > On Mar 5, 2015, at 1:11 PM, Melvin Mughal wrote: > > *sudo /etc/init.d/pdns monitor* > > *Mar 05 06:04:28 Reading random entropy from '/dev/urandom

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 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

Re: [Pdns-users] API issue

2015-03-05 Thread Koko Wijatmoko
On Thu, 5 Mar 2015 12:11:03 +0100 Melvin Mughal 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 mailing list

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 tri

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 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

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 resolv

Re: [Pdns-users] API issue

2015-03-05 Thread Christian Hofstaedtler
Hi, > On 05 Mar 2015, at 10:57, Melvin Mughal 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 j

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* *experimental-json-interfa

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 comma

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 Mughal

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 : > Weird... > > For sure its not hitting the API service, its apache. Could you post > version and config

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 wrote: > Yes, already in the sam

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=NwY>kpVMMuGEaDH8ib (not the real API key) webserver=yes 2015-03-04 17:20 GMT+01:00 AJ McKee : > You will also have to ensure have been set in config. > > experimental-json-interface=y

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 sub

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 wrote: > Local port doesn't change anything and nc localhost returns nothing. To > configure the port, I added these lines: > > *# IP Addr

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 wrote: > Yep, tried it. Put it in the config on

Re: [Pdns-users] API issue

2015-03-04 Thread Juraj Lutter
--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 n

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 : > Hi Melvin, > > Seems you are talking to your local apache, > > Try ho

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 wrote: > Followed the readme (https://doc.powerdns.com/md/httpapi/REA

[Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
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: ** ** *404 Not Found* ** *Not Found* *The requested URL /servers/localhost/zones was not found on this server.* ** *Apache/