私のプロジェクトで DHT を使用したいのですが、Kademlia のサンプルがうまく動作しません。
からの出力ログは次のtwistd -noy examples/server.tac
とおりです。
2015-01-21 18:19:43+0100 [-] Log opened.
2015-01-21 18:19:43+0100 [-] twistd 13.2.0 (/usr/bin/python 2.7.6) starting up.
2015-01-21 18:19:43+0100 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2015-01-21 18:19:43+0100 [-] KademliaProtocol starting on 8468
2015-01-21 18:19:49+0100 [-] 'Did not received reply for msg id YES6sdvjJ3qpg5Pr6pg/ajdeMg8= within 5 seconds'
2015-01-21 18:19:49+0100 [NodeSpiderCrawl] [INFO] creating spider with peers: []
2015-01-21 18:19:49+0100 [NodeSpiderCrawl] [INFO] crawling with nearest: ()
2015-01-21 18:19:49+0100 [NodeSpiderCrawl] [INFO] last iteration same as current - checking all in list now
2015-01-21 18:19:53+0100 [Server] [WARNING] No known neighbors, so not writing to cache.
上記のリンクにあるクライアント スクリプトの出力は次のとおりです。
2015-01-21 18:22:09+0100 [-] Log opened.
2015-01-21 18:22:09+0100 [-] KademliaProtocol starting on 5678
2015-01-21 18:22:14+0100 [-] 'Did not received reply for msg id SpQjdpv2Qos+C7q0BB1XzNgya4A= within 5 seconds'
2015-01-21 18:22:14+0100 [NodeSpiderCrawl] [INFO] creating spider with peers: []
2015-01-21 18:22:14+0100 [NodeSpiderCrawl] [INFO] crawling with nearest: ()
2015-01-21 18:22:14+0100 [NodeSpiderCrawl] [INFO] last iteration same as current - checking all in list now
2015-01-21 18:22:14+0100 [-] Found nodes: []
2015-01-21 18:22:14+0100 [Server] [DEBUG] setting 'a key' = 'a value' on network
2015-01-21 18:22:14+0100 [Server] [WARNING] There are no known neighbors to set key a key
2015-01-21 18:22:14+0100 [Server] [WARNING] There are no known neighbors to get key a key
2015-01-21 18:22:14+0100 [-] Key result: None
2015-01-21 18:22:14+0100 [KademliaProtocol (UDP)] (UDP Port 5678 Closed)
2015-01-21 18:22:14+0100 [-] Main loop terminated.
どうしたの?ピアには接続するためのネットワークが必要であることは理解していますが、それはスタンドアロン サーバーが行うべきことではありませんか?
前もって感謝します!