[chord] failed to unmarshall result
piotrek jacak
jacak at gmx.de
Mon Jan 9 18:46:32 EST 2006
hello,
i try to write an interface which would add / remove nodes.
Unfortunately I get an error message "failed to unmarshall result" while
using CD_NEWVNODE and CD_NEWCHORD.
Here what i did:
1. i started lsd as usual:
lsd: lsd starting up at Tue Jan 10 00:11:50 2006
lsd: running with options:
lsd: IP/port: 127.0.0.1:10000
lsd: vnodes: 1
lsd: lookup_mode: 1
lsd: ss_mode: -1
2. then i run my prog.:
./p2p-dhashclient 127.0.0.1 10000 1
[main] chordID 92636c5e6f4949bed1b2386362676b89f8e3b36d
[doit]
[doRPC]
failed to unmarshall result
[process_cb] started
fatal: [RPC failed] RPC: Unable to send
and the lsd says:
1136848447.326616 chord: unknown vnode
92636c5e6f4949bed1b2386362676b89f8e3b36d for procedure 1 (344600.4).
which is correct, isn't it?, because there is no vnode with the id 92...6d.
3. so i run:
./p2p-dhashclient 127.0.0.1 10000 0
and i become the same bug:
[main] chordID d295d5d3461551a97ee81c2ac0b5ce0356f99c6d
[doit]
[doRPC]
failed to unmarshall result
[process_cb] started
fatal: [RPC failed] RPC: Unable to send
well, the chordID which i make is definitely available, isn't??
if so could you please help me finding out why i get "failed to
unmarshall result" ??
here is my code:
//-----------------
#include <async.h>
#include <string.h>
#include <dhash_prot.h>
#include <dhashclient.h>
#include <chord_impl.h>
#include "rpclib.h"
#include <cd_prot.h>
#include <id_utils.h>
void
process_NEWCHORD_cb (chord_node n, ptr<cd_newchord_arg> arg,
cd_newchord_res *result, clnt_stat err)
{
warn << "[process_cb] started\n";
if (err) {
fatal << "[RPC failed] " << err << "\n";
} else {
warn << "[process_cb] no errors\n";
warn << "[process_cb] new vnode chordID "
// << result->resok->vnode
<< "\n";
exit(0);
}
// exit(0);
}
void
doit_NEWCHORD (chord_node dst) {
warn << "[doit_NEWCHORD]\n";
ptr<cd_newchord_arg> arg = New refcounted<cd_newchord_arg> ();
arg->wellknownhost = dst.r.hostname;
arg->wellknownport = dst.r.port;
arg->myname = "";
arg->myport = 10002;
arg->maxcache = 1000; //····
cd_newchord_res *res = New cd_newchord_res ();
//ptr<cd_newchord_res> res = New refcounted<cd_newchord_res> ();
warn << "[doRPC]\n";
doRPC(dst, cd_program_1, CD_NEWCHORD, arg, res,
wrap(&process_NEWCHORD_cb, dst, arg, res));
}
int
main(int argc, char *argv[]) {
...
chord_node dst;
dst.r.hostname = argv[1];
//dst.r.port = 10000;
dst.r.port = atoi(argv[2]);
//dst.vnode_num = 0;
dst.vnode_num = atoi(argv[3]);
dst.x = make_chordID (dst.r.hostname, dst.r.port, dst.vnode_num);
warn << "[main] chordID " << dst.x << "\n";
// doit_NEWVNODE(dst);
doit_NEWCHORD(dst);
amain();
}
//-----------------
thanks again [in advance..] for your help!!
Best regards,
Piotr Jacak
More information about the chord
mailing list