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

2015-03-05 19:46 GMT+01:00 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
> 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

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


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/listinfo/pdns-users


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

> 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

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

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

> > *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. 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-key=changeme
experimental-webserver=yes

Is this Will such that it should be reported as issue?

Best regards.



> 2015/03/05 21:23、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
>> *   Trying 127.0.0.1...
>> % Total% Received % Xferd  Average Speed   TimeTime Time  Current
>>Dload  Upload   Total   SpentLeft  Speed
>> 0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
>> 0* Connected to 127.0.0.1 (127.0.0.1) port 8082 (#0)
>>> GET /servers/localhost HTTP/1.1
>>> User-Agent: curl/7.35.0
>>> Host: 127.0.0.1:8082
>>> Accept: */*
>>> X-API-Key: changeme
>>> 
>> < HTTP/1.1 400 Bad Request
>> < Content-Type: 11
>> * no chunk, no close, no size. Assume close to signal end
>> <
>> { [data not shown]
>> 100110110 0976  0 --:--:-- --:--:-- --:--:--  
>> 1100
>> * Closing connection 0
>> parse error: Invalid numeric literal at line 1, column 4
> 
> 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.
> 
> OTOH, I’m not sure anybody ever tested API on ARM, so maybe you found a bug.
> 
> Best,
> 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] 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
> *   Trying 127.0.0.1...
>  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
> Dload  Upload   Total   SpentLeft  Speed
>  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
> 0* Connected to 127.0.0.1 (127.0.0.1) port 8082 (#0)
>> GET /servers/localhost HTTP/1.1
>> User-Agent: curl/7.35.0
>> Host: 127.0.0.1:8082
>> Accept: */*
>> X-API-Key: changeme
>> 
> < HTTP/1.1 400 Bad Request
> < Content-Type: 11
> * no chunk, no close, no size. Assume close to signal end
> <
> { [data not shown]
> 100110110 0976  0 --:--:-- --:--:-- --:--:--  1100
> * Closing connection 0
> parse error: Invalid numeric literal at line 1, column 4

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.

OTOH, I’m not sure anybody ever tested API on ARM, so maybe you found a bug.

Best,
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] 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 'X-API-Key: changeme' http://127.0.0.1:8082/servers/localhost | jq 
.
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0* 
Connected to 127.0.0.1 (127.0.0.1) port 8082 (#0)
> GET /servers/localhost HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8082
> Accept: */*
> X-API-Key: changeme
>
< HTTP/1.1 400 Bad Request
< Content-Type: 11
* no chunk, no close, no size. Assume close to signal end
<
{ [data not shown]
100110110 0976  0 --:--:-- --:--:-- --:--:--  1100
* Closing connection 0
parse error: Invalid numeric literal at line 1, column 4



When you source compiled with CentOS6 the problem did not occur.
Is it just a matter of that environment is too special?

Verification environment:

$ uname -a
Linux dns02 3.19.0-rc5-cubieboard #6 SMP Fri Jan 23 06:17:54 EST 2015 armv7l 
armv7l armv7l GNU/Linux
$
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 14.04.2 LTS
Release:14.04
Codename:   trusty
$ sudo lsof -i :8082
COMMAND PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
pdns_recu 14988 pdns   32u  IPv4 3789953  0t0  TCP localhost:8082 (LISTEN)


It has been confirmed that the iptable also ufw also not running.
How can I solve this problem, and how do I to?

Best regards.
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


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


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

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


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'*
>
> *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 :
>
>> 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
>>
>> * 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  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 :
>>> > 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

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

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
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


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

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

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

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 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  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 :
> > 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] Order Value Decimal Place /leading Zero behaviour

2015-03-05 Thread Jonathan Hunter
Hi Guys,
I am testing  the Order Value in the content of NAPTR records using powerdns 
and MySQL database.
I am trying to see an order value of 0.000322 which is lowest cost entry for 
one target carrier, and 0.0049 for a slightly more expensive carrier.
So content looks like this in the records table;
0.000322 10 "U" "E2U+sip" "!^(.*)$!sip:\\1...@carrier1.com!".0.0049 10 "U" 
"E2U+sip" "!^(.*)$!sip:\\1...@carrier2.com!".
When I do this I get a parsing error, I presume due to decimal point;

Mar  5 10:05:42 localhost pdns[6207]: Exception: Parsing record content: 
expected digits at position 1 in '0.000322 10 "U" "E2U+sip" 
"!^(.*)$!sip:\\1...@carrier1.com!".'Mar  5 10:05:42 localhost pdns[6207]: 
Exception building answer packet (Parsing record content: expected digits at 
position 1 in '0.000322 10 "U" "E2U+sip" "!^(.*)$!sip:\\1...@carrier1.com!".') 
sending out servfail
So I wondered if it would respect the leading 0's if I removed the decimal, so 
I have entries as;
322 10 "U" "E2U+sip" "!^(.*)$!sip:\\1...@carrier1.com!".00049 10 "U" 
"E2U+sip" "!^(.*)$!sip:\\1...@carrier2.com!".
However when testing with dig I am returned;
 IN NAPTR 49 10 "U" "E2U+sip" "!^(.*)$!sip:\\1...@carrier2.com!" . IN NAPTR 322 
10 "U" "E2U+sip" "!^(.*)$!sip:\\1...@carrier1.com!" .
So doesnt seem to respect the leading 0's.
Is there anyway I can resolve this so I can define values such as 0.000322 so 
in the example above it is the preference?
Many thanks
Jon   ___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


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

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

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 :

> > 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] Configure private subdomain

2015-03-05 Thread Nikolaos Milas

On 5/3/2015 8:53 πμ, Michael Ströder wrote:

Yes, IMHO it's far easier to build up a replicated setup with the LDAP backend
than with any SQL DB.


We are using LDAP replication for powerdns (rather than normal 
master-slaves) for years. It is a great setup.



>Unfortunately, Grégory Oestreicher's fork
>(http://repo.or.cz/w/pdns-ldap-backend.git) of the LDAP backend (which is the
>most updated source code) has not had any progress for two years now.
I'm using stock pdns 3.4.3 and not external code. Give it a try.


G. Oestreicher's fork is better that stock ldap backend (which I don't 
know if is still included in the latest pdns releases). It includes 
numerous fixes and works fine as is.


The only problem is that development stalled two years ago. It would be 
nice if more ldap-and-pdns-aware developers could delve into it.


I am not a developer, yet I can assist with design, testing and other 
auxilliary tasks.


Regards,
Nick

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users