[erlang-questions] Setting node name from the shell started withou -name or -sname

Andrew Stone stondage123@REDACTED
Wed Apr 23 19:46:00 CEST 2008


Hi Zvi,

You can set the node name with net_kernel:start(atom()).

You must however make sure that epmd is running on your system. You can do this with os:cmd("epmd -daemon"). You may want to put a timer:sleep() after this though, as I'm not sure it is ready immediately after return. 

You are correct that you can set the cookie with erlang:set_cookie/2.

-Andrew

----- Original Message ----
From: Zvi <exta7@REDACTED>
To: erlang-questions@REDACTED
Sent: Wednesday, April 23, 2008 1:14:25 PM
Subject: [erlang-questions] Setting node name from the shell started withou -name or -sname


It's possible to set cookie name programmatically, using erlang:set_cookie/2,
even if BEAM started without -setcookie flag or .erlang.cookie file.
How to set a node name for BEAM started without -name or -sname flags?
There is undocumented erlang:setnode/2 BIF, I guess that it's:
  setnode(NodeName::node(),PortNumber::int())
but still have no idea how to use it.

TIA,
Zvi

-- 
View this message in context: http://www.nabble.com/Setting-node-name-from-the-shell-started-withou--name-or--sname-tp16834718p16834718.html
Sent from the Erlang Questions mailing list archive at Nabble.com.

_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://www.erlang.org/mailman/listinfo/erlang-questions






More information about the erlang-questions mailing list