[Pdns-users] API issue
AJ McKee
aj.mckee at druid-dns.com
Wed Mar 4 15:49:59 UTC 2015
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 <melvin at mughal.nu> 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.mckee at 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 <melvin at 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">*
>>>
>>> *<html><head>*
>>>
>>> *<title>404 Not Found</title>*
>>>
>>> *</head><body>*
>>>
>>> *<h1>Not Found</h1>*
>>>
>>> *<p>The requested URL /servers/localhost/zones was not found on this
>>> server.</p>*
>>>
>>> *<hr>*
>>>
>>> *<address>Apache/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: NwY>kpVMMuB8ib'
>>> 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 at 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.mckee at druid-dns.com
>> blog: http://aj.mc-kee.com/
>> twitter: @ajmckee
>>
>
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at 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.mckee at druid-dns.com
blog: http://aj.mc-kee.com/
twitter: @ajmckee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20150304/8a2489c5/attachment-0001.html>
More information about the Pdns-users
mailing list