Re: Pb of communication between emacs and a node
Luke Gorrie <[email protected]> 05 Feb 2003 23:22:12 +0100
| Newsgroups | gmane.comp.lang.erlang.distel.devel |
|---|---|
| Message-ID | <[email protected]> |
"Nicolas Charpentier" <[email protected]> writes: > Hi, > I'm new to Erlang and I'm interested in distel. > When I try to list all erlang process (C-c C-d l) I have some error message: > In the shell: > =ERROR REPORT==== 4-Feb-2003::22:46:22 === > ** Connection attempt from disallowed node distel_2092@XXXX ** > In emacs: > error in process sentinel: Can't handle event closed in state > derl-recv-challenge-ack > Where am I wrong ??? Distel has a reported problem on windows: Vlad Dumitrescu had to change (have-program-p "dec32") to (have-program-p "dec32.exe") in elisp/derl.el to make it work. That doesn't sound like the same problem here, though. More directly, the messages you get says that the Erlang rejected Emacs's handshake in the distribution protocol. Two main possibilities present themselves: * Cookie mismatch. Emacs and Erlang will both try to read ~/.erlang.cookie by default, but I'm not sure if they have the same concept of where "home" is on Windows. We can inspect the cookies to see if they match, using "erlang:get_cookie()" in Erlang, and "(erl-cookie)" in Emacs. (NB: the cookie is an atom in erlang and a string in Emacs - that's ok.) If they aren't the same, you can either override Erlang's one with "erl -setcookie foo", or Emacs's one with (setq derl-cookie "foo") * Node name mismatch. You can check that "node()" in Erlang and `erl-node-name' in Emacs both have the same host name. If Emacs has it wrong, you can override it with: (setq erl-node-name 'my-distel-node@myhost) Note that you have to do this *before* loading distel, since the node name is used during initial setup. Also you should be using short node names (no domain part, "erl -sname foo"). At least I think you should, on my machine with R9 it works either way.. I'm eager to hear how it goes. Making Distel work properly on Windows machines has been on my TODO list for much too long. > An other question: what is the name of the emacs node ? >From version 3.2, the node name is distel_<unix_pid_of_emacs>@<shorthostname>. In previous versions, it was simply distel@<shorthostname>, but that caused a lot of collisions (both between multiple Emacsen, and erlang nodes called 'distel'). To find out the node name of a running emacs, you can look at the variable `erl-node-name'. > Ps: When I ask for the nodes for emacs, I see all my running node. I'm not sure what you mean by ask for the nodes? Cheers, Luke ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com