-
Notifications
You must be signed in to change notification settings - Fork 4
Useful commands for debugging
piroor edited this page Nov 30, 2014
·
5 revisions
$ sudo -u droonga-engine -H /home/droonga-engine/droonga/serf members -rpc-addr node0:7373
node0/protocol-adapter 192.168.100.50:8946 alive role=protocol-adapter
node0:10031/droonga 192.168.100.50:7946 alive role=engine,cluster_id=f52d474afd2c34511cddaf5bc92243b017670e6b
node1/protocol-adapter 192.168.100.51:8946 alive role=protocol-adapter
node1:10031/droonga 192.168.100.51:7946 alive role=engine,cluster_id=29a2f18f5a7f6c2f0d471ef618ed9d4369f56750
-
-rpc-addrを(hostname):7373にすると、Engineから見た時のクラスタの様子が見える。 -
-rpc-addrを(hostname):8373にすると、Protocol Adapterから見た時のクラスタの様子が見える。 -
-format jsonを加えると、結果をJSON形式で見ることができる。
$ curl "http://node0:10041/droonga/system/status?" | jq "."
{
"nodes": {
"node0:10031/droonga": {
"live": true
}
}
}
$ echo '{"dataset":"Default","type":"system.status"}' | \
droonga-request --host node0 --receiver-host node1
Elapsed time: 0.003526426
{
"inReplyTo": "1417338968.0856526",
"statusCode": 200,
"type": "system.status.result",
"body": {
"nodes": {
"node0:10031/droonga": {
"live": false
},
"node1:10031/droonga": {
"live": true
}
}
}
}
$ curl "http://node0:10041/engines" | jq "."
{
"hostNames": [
"node1",
"node0"
],
"clusterId": "29a2f18f5a7f6c2f0d471ef618ed9d4369f56750"
}