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

Alexander Lamb alexander.lamb@REDACTED
Tue May 13 12:27:05 CEST 2008


Ok,

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

(alex@REDACTED)1>

But from my Java program I was forced to write:

"alex@REDACTED" when sending a message from my mailbox.

For some unknown reason, the first call went ok, the any following one  
didn't.

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:

(alex@REDACTED)1>

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  
doing.

Alex
--
Alexander Lamb
Founding Associate
RODANOTECH Sàrl

4 ch. de la Tour de Champel
1206 Geneva
Switzerland

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

http://www.rodanotech.ch




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

> Hi,
>
> On Tue, May 13, 2008 at 12:04 PM, Alexander Lamb <alexander.lamb@REDACTED 
> > wrote:
> I added an OtpNodeStatus to follow the status of the connection and on
> the second call here is what I get:
>
> -> LOOKUP (r4) alex@REDACTED
> <- PORT 57266
> -> MD5 CONNECT TO kirk.local:57266
> -> HANDSHAKE sendName flags=3332 dist=5 local=jnode@REDACTED
> -> CLOSE
> -- CONNECTION ATTEMPT: alex@REDACTED INCOMING: false INFO:
> java.io.IOException: Cannot connect to peer node
>
> Because of the CLOSE, the connection attempt from alex@REDACTED 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