#10 chord 1.0.5 leaveN

1.0.5
open-fixed
Sven Kaffille
9
2009-04-18
2009-04-18
ye junpeng
No

I use the command leaveN in the console in the version 1.0.5,found these problems.
when the chord has only one peer,the resule is right,as follows:

Type 'help' for a list of available commands
Console ready.
oc > joinN
Creating new chord overlay network!
URL of created chord node ocsocket://211.86.145.88/.
oc > leaveN
Leaving network.
oc > joinN
Creating new chord overlay network!
URL of created chord node ocsocket://211.86.145.88/.
oc >
when the peers more than one ,using the command leaveN will cause the failed,as follows:
Type 'help' for a list of available commands
Console ready.
oc > joinN -port 4343 -bootstrap 127.0.0.1
Trying to join chord network with boostrap URL ocsocket://127.0.0.1/
URL of created chord node ocsocket://211.86.145.88:4343/.
oc > leaveN
Leaving network.
Leave failed! Reason: null
oc > refsN
java.lang.NullPointerException
at de.uniba.wiai.lspi.chord.console.command.ShowFingerTableNetwork.print
FingerTableForEndpoint(ShowFingerTableNetwork.java:64)
at de.uniba.wiai.lspi.chord.console.command.ShowFingerTableNetwork.exec(
ShowFingerTableNetwork.java:68)
at de.uniba.wiai.lspi.util.console.Command.execute(Command.java:116)
at de.uniba.wiai.lspi.util.console.ConsoleThread.run(ConsoleThread.java:
259)
An unexpected Exception occured. Could not execute command. Reason:
null
oc > leaveN
Leaving network.
oc > joinN -port 4343 -bootstrap 127.0.0.1
Trying to join chord network with boostrap URL ocsocket://127.0.0.1/
java.lang.RuntimeException: Endpoint already created!
at de.uniba.wiai.lspi.chord.com.Endpoint.createEndpoint(Endpoint.java:33
6)
at de.uniba.wiai.lspi.chord.service.impl.NodeImpl.<init>(NodeImpl.java:1
34)
at de.uniba.wiai.lspi.chord.service.impl.ChordImpl.joinHelp(ChordImpl.ja
va:536)
at de.uniba.wiai.lspi.chord.service.impl.ChordImpl.join(ChordImpl.java:4
75)
at de.uniba.wiai.lspi.chord.console.command.RemoteChordNetworkAccess.joi
n(RemoteChordNetworkAccess.java:105)
at de.uniba.wiai.lspi.chord.console.command.JoinNetwork.exec(JoinNetwork
.java:124)
at de.uniba.wiai.lspi.util.console.Command.execute(Command.java:116)
at de.uniba.wiai.lspi.util.console.ConsoleThread.run(ConsoleThread.java:
259)
Join/Creation of network failed. Reason: Endpoint already created!
oc >
and so on,when I first use the command leaveN,the console show Leave failed! Reason: null;but when I use the command refsN,the console show the exceptions,so the peer has left.then I second use the command
leaveN,the console show Leaving network.
but when I try to join the chord overlay net using the same command as before "joinN -port 4343 -bootstrap 127.0.0.1",the console command show the exceptions.
how to fix it? Anyway,when will be the next version publish?

Discussion

  • Sven Kaffille
    Sven Kaffille
    2009-04-18

    • labels: 810537 --> Communication Protocols
    • milestone: --> 1.0.5
    • status: open --> open-fixed
     
  • Sven Kaffille
    Sven Kaffille
    2009-04-18

    Please apply the attached patch and recompile Open Chord.

     
  • Sven Kaffille
    Sven Kaffille
    2009-04-18

    Patch file

     
  • Sven Kaffille
    Sven Kaffille
    2009-04-18

    • priority: 5 --> 9
     
  • I apply the attached patch and recompile Open Chord, then it is successful,Thank you!