[PowerDNS][ARM] ARMボードでコンパイルしたPowerDNS recursorでAPIが取得できない?

AIX、UNIX、LinuxARM
HTTP API - Introduction

先日ZabbixでPowerDNS recursorの統計情報を取得するネタを書きましたが、その後Facebookにて、PowerDNSはAPIが用意されてるよー、と教えていただいたので実験中気がついたことが。

というのも我が家でDNSキャッシュサーバを2台用意してあるのですが、1台はCentOS7x64、もう1台はCubietruckというARMボードにUbuntu 12.04 を載せたものを用意しています。

そのうち、CentOS7の方はAPIを問題なく取得できたのですが、もう1台のARMボードの方がAPIをうまく取得できない問題に遭遇しました。

検証環境

検証した設定は以下のとおり。

  • PowerDNS recursor 3.7.1
experimental-webserver=yes
experimental-api-key=changeme
auth-zones=
forward-zones=
forward-zones-recurse=

試験したこと

サービスを再起動したあと、以下のコマンドを実行。

curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8082/servers/localhost | jq .

確認

CentOS7の方は以下の様な感じで結果が帰ってくることを確認しています。

# curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8082/servers/localhost/zones | jq .
* About to connect() to 127.0.0.1 port 8082 (#0)
*   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/zones HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1:8082
> Accept: */*
> X-API-Key: changeme
>
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Access-Control-Allow-Origin: *
< Connection: close
< Content-Length: 3395
< Content-Type: application/json
< Server: PowerDNS/3.7.1
<
{ [data not shown]
100  3395  100  3395    0     0  2582k      0 --:--:-- --:--:-- --:--:-- 3315k
* Closing connection 0
[
{
"recursion_desired": false,
"servers": [],
"kind": "Native",
"name": "10.in-addr.arpa.",
"url": "/servers/localhost/zones/10.in-addr.arpa.",
"id": "10.in-addr.arpa."
},
{
"recursion_desired": false,
"servers": [],
"kind": "Native",
"name": "127.in-addr.arpa.",

が、ARMボードの方は以下の様な感じでBad Requestになってしまう・・・

$ 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   1509      0 --:--:-- --:--:-- --:--:--  2200
* Closing connection 0
parse error: Invalid numeric literal at line 1, column 4

最初はConfigを間違えているのかと思ったのですが、何度やっても結果は同じ・・・
ポートは間違いなく開いているのですが、これはコードを読めということなんですかね・・・

$ sudo lsof -i :8082
COMMAND    PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
pdns_recu 8018 root   27u  IPv4 8466627      0t0  TCP localhost:8082 (LISTEN)

それとも32bitモードで動作する際の制限だったりするんでしょうか・・・
誰か助けてー

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました