How to communicate between two machines each having a single node

Matthias.Lang@REDACTED Matthias.Lang@REDACTED
Tue Jun 6 12:26:43 CEST 2000


Hi,

There are many ways to prevent communication between erlang nodes from
working. Did you start your node as a distributed node? Are you using
the right node naming scheme for your network? Here's a suggestion
from the FAQ on how to get things going.

|  9.6. Why won't my distributed Erlang nodes communicate?
|  
|  For Erlang nodes to be able to communicate, you need 
|  
|      * A working tcp network between the nodes. On unix systems you 
|        can check this by using telnet. 
|  
|      * The nodes to use the same node naming scheme (you cannot have
|        a system where some nodes use fully qualified names and
|        others use short names). 
|  
|      * The nodes must agree to use the same "magic security cookie". 
|  
|  Here's an example of how to create two nodes on different machines 
|  called martell and grolsch and verify that they're connected. On
|  one machine: 
|  
|           ~ >rlogin martell
|           Last login: Sat Feb 5 20:40:52 from super
|           ~ >erl -sname first_node 
|           Eshell V4.9.1.1  (abort with ^G)
|           (first_node@REDACTED)1> erlang:set_cookie(first_node, nocookie).
|           true
|           
|  
|  And on the other 
|  
|           ~ >rlogin grolsch
|           Last login: Thu Feb 3 10:54:20 from :0
|           ~ >erl -sname second_node
|           Eshell V4.9.1.1  (abort with ^G)
|           (second_node@REDACTED)1> erlang:set_cookie(second_node, nocookie).
|           true
|           (second_node@REDACTED)2> net:ping(first_node@REDACTED).
|           pong
|           (second_node@REDACTED)3> rpc:call(first_node@REDACTED, os, type, []).
|           {unix,sunos}
|           
|  
|  The pong tells us that the connection works, the result of
|  net:ping() is pang when the connection isn't working. The rpc:call()
|  command illustrates executing a command on the other node. 
|  

Question 9.6.1 (http://www.erlang.org/faq/x699.html#AEN760) has some
troubleshooting suggestions.

If it still doesn't work, some information about which steps above
work and which ones don't will help solving the problem.

Matthias

--- original message follows ----

    Maheedar> I am from Wipro Technologies working for Ericsson
    Maheedar> project on Erlang. I want to know how to communicate
    Maheedar> between two machines each having a node. I want to
    Maheedar> communicate between these two nodes. I tried with
    Maheedar> setting the cookies in the two machines using
    Maheedar> "erlang:set_cookie(nodename, cookie)". But, it doesn't
    Maheedar> work. If I can have the answer at the earliest, I will
    Maheedar> be grateful.




More information about the erlang-questions mailing list