Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang: starting slave node

I'm trying to start Erlang slave node on cluster and I receive bash: erl: command not found message. Though I have alias for erl. Here is what I actually do:

[user@n001 ~]$ erl -rsh ssh -sname n001    
Eshell V5.7.5  (abort with ^G)
    (n001@n001)1> slave:start_link("user@n002", n002, "-rsh ssh").
    bash: erl: command not found
                                {error,timeout}
    (n001@n001)2>

Maybe, there is something wrong? Thanks.

UPDATE:
I've added Erlang bin dir to my $PATH variable; I've set $ERLANG_ROOT_DIR variable; created symlink in ~/ to erl - but nothing have changed...
I have installed Erlang in ~/bin/erlang dir...

like image 865
Zim Avatar asked Oct 14 '22 06:10

Zim


2 Answers

The trouble was in bash: Actually erlang connects to node via ssh, invoking default sh in non-interactive mode. But when bash is started in non-interactive mode, it doesn't read .bashrc where my path variables and aliases are stored. So I switched to zsh and all is ok now! ;)

like image 129
Zim Avatar answered Dec 30 '22 01:12

Zim


I believe that the alias won't be honored

erl needs to actually be in your path

Also, I believe that your .bashrc doesn't execute either. So you may have to symlink "erl" to /usr/bin or /usr/local/bin

like image 30
David Budworth Avatar answered Dec 30 '22 00:12

David Budworth