[erlang-questions] : First send from JInterface ok, second one blocs?? FOUND THE PROBLEM

Alexander Lamb <>
Tue May 13 12:27:05 CEST 2008


I found the solution but I don't understand why:

When I started the erlang server, I initially wrote:

erl -mnesia -setcookie rodanotech -sname alex (notice the "sname")

It started the node as


But from my Java program I was forced to write:

"" when sending a message from my mailbox.

For some unknown reason, the first call went ok, the any following one  

I started a second erlang node to debug the problem and tried using:

erl -mnesia -setcookie rodanotech -name alex (notice without the "s"  
before name)

It started:


Now it works... but why did it work for each first call when using - 
sname ??? That's what probably put me on the wrong direction to find  
the solution!!

Anyway, thanks a lot for all your help. Once all this is more or less  
stable, I will try to write a small example to explain what we are  

Alexander Lamb
Founding Associate

4 ch. de la Tour de Champel
1206 Geneva

Tel:  022 347 77 37
Fax: 022 347 77 38


Le 13 mai 08 à 12:13, Vlad Dumitrescu a écrit :

> Hi,
> On Tue, May 13, 2008 at 12:04 PM, Alexander Lamb < 
> > wrote:
> I added an OtpNodeStatus to follow the status of the connection and on
> the second call here is what I get:
> -> LOOKUP (r4) 
> <- PORT 57266
> -> MD5 CONNECT TO kirk.local:57266
> -> HANDSHAKE sendName flags=3332 dist=5 local=
> -> CLOSE
> java.io.IOException: Cannot connect to peer node
> Because of the CLOSE, the connection attempt from  is
> refused!
> Can you set a breakpoint on AbstractConnection.close() and look at  
> the stack to see who calls it? It would help to know.
> best regards,
> Vlad

More information about the erlang-questions mailing list