<div dir="ltr">Tried the config lines from this post (<a href="http://jpmens.net/2015/01/09/a-look-at-the-powerdns-rest-api/">http://jpmens.net/2015/01/09/a-look-at-the-powerdns-rest-api/</a>) 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.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-04 20:09 GMT+01:00 Melvin Mughal <span dir="ltr"><<a href="mailto:melvin@mughal.nu" target="_blank">melvin@mughal.nu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8000001907349px">This version of PowerDNS we use is </span><span style="font-size:12.8000001907349px;font-family:arial,helvetica,sans-serif;color:rgb(51,51,51);line-height:1.1">PowerDNS Authoritative Server 3.4.2. This is the entire pdns.conf file in /etc/powerdns:</span><br><div><br></div><div><a href="http://pastebin.com/14LqMbLp" target="_blank">http://pastebin.com/14LqMbLp</a><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-03-04 18:30 GMT+01:00 AJ McKee <span dir="ltr"><<a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Weird...<div><br>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</div><span><font color="#888888"><div>AJ</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 4 March 2015 at 16:27, Melvin Mughal <span dir="ltr"><<a href="mailto:melvin@mughal.nu" target="_blank">melvin@mughal.nu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, already in the same config:<div><br></div><div>







<p><span># Enable and config API</span></p>
<p><span>experimental-json-interface=yes</span></p>
<p><span>experimental-api-key=NwY>kpVMMuGEaDH8ib (not the real API key)</span></p>
<p><span>webserver=yes</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-04 17:20 GMT+01:00 AJ McKee <span dir="ltr"><<a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You will also have to ensure have been set in config.<div><br><div><pre style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:14px;white-space:pre-wrap;padding:10px;margin-top:0px;margin-bottom:10.5px;line-height:1.428571429;color:rgb(51,51,51);word-break:break-all;word-wrap:break-word;border:1px solid rgb(204,204,204);border-radius:0px;background-color:rgb(245,245,245)"><code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:inherit;padding:0px;color:inherit;border-radius:0px;background-color:transparent">experimental-json-interface=yes
experimental-api-key=changeme</code></pre></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 4 March 2015 at 16:15, Melvin Mughal <span dir="ltr"><<a href="mailto:melvin@mughal.nu" target="_blank">melvin@mughal.nu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Local port doesn't change anything and nc localhost returns nothing. To configure the port, I added these lines:<div><br></div><div>







<p><span><i># IP Address of web server to listen on</i></span></p>
<p><span><i>webserver-address=127.0.0.1</i></span></p>
<p><span><i># Port of web server to listen on</i></span></p>
<p><span><i>webserver-port=8081</i></span></p>
<p><span><i># Web server access is only allowed from these subnets</i></span></p>
<p><span><i>webserver-allow-from=<a href="http://0.0.0.0/0,::/0" target="_blank">0.0.0.0/0,::/0</a>"</i></span></p><p>And restarted pdns with 'sudo service pdns restart'. Now when I run 'sudo lsof -i -P | grep -i 8081' to see what is listening on that port, I get nothing at all listening on that port.  Shouldn't the port be listening after the pdns restart?</p>








<p><span></span><br></p></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-04 16:50 GMT+01:00 Juraj Lutter <span dir="ltr"><<a href="mailto:juraj@lutter.sk" target="_blank">juraj@lutter.sk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>--local-port specifies which OUTGOING
      PORT will curl use. not the destination port.<div><div><br>
      <br>
      On 03/04/15 16:41, Melvin Mughal wrote:<br>
    </div></div></div><div><div>
    <blockquote type="cite">
      <div dir="ltr">Yep, tried it. Put it in the config on 8081 and
        also tried 8082.  But then we get the '<span style="font-size:12.8000001907349px">curl: (45) bind failed
          with errno 48: Address already in use' response back. So no
          luck with that :(</span><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">2015-03-04 16:31 GMT+01:00 AJ McKee <span dir="ltr"><<a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a>></span>:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div dir="ltr">Hi Melvin,
                <div><br>
                </div>
                <div>Seems you are talking to your local apache,</div>
                <div><br>
                </div>
                <div>Try hostname:<span>8081
                    for your request, unless of course you have gone
                    through the trouble of reverse proxying the pdns
                    instance.</span></div>
                <div><span><br>
                  </span></div>
                <div><span>AJ</span></div>
              </div>
              <div class="gmail_extra"><br>
                <div class="gmail_quote">
                  <div>
                    <div>On 4 March 2015 at 15:17, Melvin
                      Mughal <span dir="ltr"><<a href="mailto:melvin@mughal.nu" target="_blank">melvin@mughal.nu</a>></span>
                      wrote:<br>
                    </div>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                    <div>
                      <div>
                        <div dir="ltr">Followed the readme (<a href="https://doc.powerdns.com/md/httpapi/README/" target="_blank">https://doc.powerdns.com/md/httpapi/README/</a>).
                          Added those three lines to the pdns.conf, to
                          get the API working. When we try an API call,
                          it gives:
                          <div><br>
                          </div>
                          <div>
                            <p><i><!DOCTYPE HTML PUBLIC "-//IETF//DTD
                                HTML 2.0//EN"></i></p>
                            <p><i><html><head></i></p>
                            <p><i><title>404 Not
                                Found</title></i></p>
                            <p><i></head><body></i></p>
                            <p><i><h1>Not Found</h1></i></p>
                            <p><i><p>The requested URL
                                /servers/localhost/zones was not found
                                on this server.</p></i></p>
                            <p><i><hr></i></p>
                            <p><i><address>Apache/2.4.7 (Ubuntu)
                                Server at <a href="http://ourhostname.com" target="_blank">ourhostname.com</a> Port
                                80</address></i></p>
                            <p><i></body></html></i></p>
                            <p><i><br>
                              </i></p>
                            <p>When we add the lines to specify on which
                              address the webserver should be found, we
                              get:</p>
                            <p><br>
                            </p>
                            <p>curl --local-port 8081 -H 'X-API-Key:
                              NwY>kpVMMuB8ib' <a href="http://ns3.undev.nl/servers/localhost/zones" target="_blank">http://ourhostname.com/servers/localhost/zones</a>                                            ruby-2.1.1
                              [16:05]</p>
                            <p>
                            </p>
                            <p>curl: (45) bind failed with errno 48:
                              Address already in use</p>
                            <p><br>
                            </p>
                            <p>Anyone knows what's going wrong?</p>
                          </div>
                        </div>
                        <br>
                      </div>
                    </div>
                    _______________________________________________<br>
                    Pdns-users mailing list<br>
                    <a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
                    <a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
                    <br>
                  </blockquote>
                </div>
                <span><font color="#888888"><br>
                    <br clear="all">
                    <div><br>
                    </div>
                    -- <br>
                    <div>AJ McKee<br>
                      phone: +353 83 1130 545<br>
                      profile:  <a href="http://linkedin.com/in/ajmkee" target="_blank">http://linkedin.com/in/ajmkee</a><br>
                      jid:       <a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a><br>
                      blog:    <a href="http://aj.mc-kee.com/" target="_blank">http://aj.mc-kee.com/</a><br>
                      twitter: @ajmckee</div>
                  </font></span></div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Pdns-users mailing list
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a>
<a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
    </blockquote>
    <br>
    <br>
    </div></div><span><font color="#888888"><pre cols="72">-- 
Juraj Lutter
URL:  <a href="http://www.wilbury.sk/" target="_blank">http://www.wilbury.sk/</a>
XMPP: <a href="mailto:juraj@lutter.sk" target="_blank">juraj@lutter.sk</a>
Pekny, mily a usmievavy webhosting a serverhousing: <a href="http://www.nic.sk/" target="_blank">http://www.nic.sk/</a>
</pre>
  </font></span></div>

</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Pdns-users mailing list<br>
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
<a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
<br></blockquote></div><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br><div>AJ McKee<br>phone: +353 83 1130 545<br>profile:  <a href="http://linkedin.com/in/ajmkee" target="_blank">http://linkedin.com/in/ajmkee</a><br>jid:       <a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a><br>blog:    <a href="http://aj.mc-kee.com/" target="_blank">http://aj.mc-kee.com/</a><br>twitter: @ajmckee</div>
</font></span></div>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Pdns-users mailing list<br>
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
<a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>AJ McKee<br>phone: +353 83 1130 545<br>profile:  <a href="http://linkedin.com/in/ajmkee" target="_blank">http://linkedin.com/in/ajmkee</a><br>jid:       <a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a><br>blog:    <a href="http://aj.mc-kee.com/" target="_blank">http://aj.mc-kee.com/</a><br>twitter: @ajmckee</div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>