[Pdns-users] API issue. 400 Bad Request
kometch
kometch at gmail.com
Thu Mar 5 12:16:24 UTC 2015
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 Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 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]
100 11 0 11 0 0 976 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.
More information about the Pdns-users
mailing list