prashant-r / Scalaris

DHT Chord Transaction
Apache License 2.0
0 stars 0 forks source link

Broken boot setup #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cd bin/ 
2. ./boot.sh

What is the expected output? What do you see instead?

[error] exception in init/loop of dht_node_reregister: {{badmatch,undefined},
                                                [{comm_layer,here,1},
                                                 {dht_node_reregister,init,1},
                                                 {gen_component,start,4}]}

What version of the product are you using? On what operating system?

Latest. Linux.

Original issue reported on code.google.com by natalija...@gmail.com on 24 Apr 2010 at 7:51

GoogleCodeExporter commented 8 years ago
Please could you try
cd bin
./scalarisctl checkinstallation

Maybe you have to call 
make java
before that.

Original comment by schin...@gmail.com on 24 Apr 2010 at 8:07

GoogleCodeExporter commented 8 years ago
make java was run.

~/scalaris/bin$ ./scalarisctl checkinstallation && echo $?
0

BTW, this was recent. Older versions work fine.

Original comment by natalija...@gmail.com on 25 Apr 2010 at 1:56

GoogleCodeExporter commented 8 years ago
FWIW, it works on some machines, in others it doesn't. I'll take a closer look 
later. It might have something todo 
with hostnames...

Original comment by natalija...@gmail.com on 26 Apr 2010 at 1:29

GoogleCodeExporter commented 8 years ago
OK. Had time to look into this, it turns out that I have R13B01 in one of the 
machines. The error was about a 
function not being exported. Looking into erlang's manual:

erlang:port_command/3 is currently not auto imported, but it is planned to be 
auto imported in OTP R14.

and in src/comm_layer/comm_connection.erl we have:

 send({_Address, _Port, Socket}, Pid, Message) ->
     BinaryMessage = term_to_binary({deliver, Pid, Message}),
     erlang:port_command(Socket, BinaryMessage, []),

Since according to the manual:

  port_command(Port, Data, []) equals port_command(Port, Data).

The resulting patch:

Index: src/comm_layer/comm_connection.erl
===================================================================
--- src/comm_layer/comm_connection.erl  (revision 723)
+++ src/comm_layer/comm_connection.erl  (working copy)
@@ -105,7 +105,7 @@

 send({_Address, _Port, Socket}, Pid, Message) ->
     BinaryMessage = term_to_binary({deliver, Pid, Message}),
-    erlang:port_command(Socket, BinaryMessage, []),
+    erlang:port_command(Socket, BinaryMessage),
     ok.

 loop(fail, Address, Port) ->

Original comment by natalija...@gmail.com on 26 Apr 2010 at 7:32

GoogleCodeExporter commented 8 years ago
Thanks. Applied in r729.

Original comment by schin...@gmail.com on 26 Apr 2010 at 8:48