[Pdns-users] API issue

Keresztes Péter-Zoltán zozo at z0z0.tk
Thu Mar 5 10:49:24 UTC 2015


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 <melvin at 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 <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.hofstaedtler at deduktiva.com <mailto:christian.hofstaedtler at deduktiva.com>>:
> Hi,
> 
> 
> > On 05 Mar 2015, at 10:57, Melvin Mughal <melvin at mughal.nu <mailto:melvin at 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 <http://xxx.xx.xx.xx:8081/servers/localhost>
> >
> >
> > curl -s -H 'X-API-Key: otto' http://xxx.xx.xx.xx:8081/servers/localhost/zones <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.dns at gmail.com <mailto:jpmens.dns at 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 <http://www.deduktiva.com/> / +43 1 353 1707
> 
> 
> 
> 
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20150305/f69a5010/attachment-0001.html>


More information about the Pdns-users mailing list