[erlang-questions] jinterface cannot connect to epmd
tsuraan
tsuraan@REDACTED
Tue Nov 20 06:28:22 CET 2007
I'm attempting to get some of my code running on a JVM to connect to
my erlang cluster using the jinterface package. On a single computer,
I have the following two erlang sessions running happily in different
terminals:
=========
erl -setcookie foo -sname real
Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [hipe]
[kernel-poll:false]
Eshell V5.5.5 (abort with ^G)
(real@REDACTED)1>
==========
rl -setcookie foo -sname test
Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [hipe]
[kernel-poll:false]
Eshell V5.5.5 (abort with ^G)
(test@REDACTED)2> node().
test@REDACTED
(test@REDACTED)10> net_adm:ping('test@REDACTED').
pong
(test@REDACTED)11> net_adm:ping('real@REDACTED').
pong
(test@REDACTED)12> net_adm:ping('blah@REDACTED').
pang
==========
So, the erlang nodes seem happy to talk to each other (at least ping
works). So, in my JVM I'm trying to create a connection to the same
cluster (using JRuby for an interactive session):
===========
CLASSPATH=/usr/lib/erlang/lib/jinterface-1.3/priv/OtpErlang.jar:$CLASSPATH jirb
irb(main):001:0> require 'java'
=> true
irb(main):003:0> import 'com.ericsson.otp.erlang.OtpNode'
=> ["com.ericsson.otp.erlang.OtpNode"]
irb(main):004:0> OtpNode.new('blah', 'foo')
NativeException: java.io.IOException: Nameserver not responding on
localhost when publishing blah
from OtpEpmd.java:327:in `com.ericsson.otp.erlang.OtpEpmd.r3_publish'
from OtpEpmd.java:119:in `com.ericsson.otp.erlang.OtpEpmd.publishPort'
from OtpNode.java:645:in
`com.ericsson.otp.erlang.OtpNode$Acceptor.publishPort'
from OtpNode.java:638:in
`com.ericsson.otp.erlang.OtpNode$Acceptor.<init>'
from OtpNode.java:136:in `com.ericsson.otp.erlang.OtpNode.init'
...
=========
So, it seems to think epmd isn't there. Erlang processes have no
trouble connecting, so I'm wondering if I need to set some
environmental variable to tell the JVM where epmd is listening, or
what. Any ideas?
My java -version is:
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)
And I'm running under Gentoo Linux kernel 2.6.21.
More information about the erlang-questions
mailing list