Jinterface question

Richard Carlsson <>
Tue Feb 22 19:16:16 CET 2000


On 22 Feb 2000, Gordon Beaton wrote:

> On 22 Feb 2000 16:48:57 GMT, Richard Carlsson wrote:
> > Has anyone managed to get Jinterface (1.0) to talk to an Erlang node
> > under Open Source Erlang R6B? I seem to be unable to get past the
> > authentication, even though I think I set the cookies correctly.
> 
> Are you specifically getting an OtpAuthException?

Yes. It occurs in `recvChallengeAck', at the point when OtpConnection has
sent its "challenge" and tries to read something back, but apparently gets
a short read, which is turned into a "Peer authentication error.". What
this implies is beyond me, since I don't know the protocol. 

> This is really all you need to do to set up a connection from the Java
> side (I have not tried with the open source version):
> 
>     OtpServer self = new OtpServer(thisnodename, cookie);
>     OtpPeer other = new OtpPeer(othernodename);
> 
>     OtpConnection conn = self.connect(other);

Well, that's exactly the documentation example, which is also what I'm
already doing, unless the cookie is wrong, but it is supposed to be just
the string corresponding to the atom that the node uses as its cookie, as
seen in `erlang:get_cookie()', right? I mean, I am able to get another
Erlang node to talk to the first node by explicitly setting its cookie to
the same value, so I don't see why I can't make it work for Jinterface.

> If you suspect a problem, try setting Java system property
> OtpConnection.trace to some value like 4 before starting your java
> node, i.e.:
> 
> 	java -DOtpConnection.trace=4 MyClass ...

Did that. Even inserted some print statements in the Java code and
recompiled to see what was going on.

	/Richard


Richard Carlsson ()   (This space intentionally left blank.)
E-mail: 	WWW: http://www.csd.uu.se/~richardc/




More information about the erlang-questions mailing list