Erlang:启动从节点 [英] Erlang: starting slave node

查看:164
本文介绍了Erlang:启动从节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在群集上启动erlang从节点,并收到bash:erl:command not found消息。虽然我有别名为erl。这是我实际做的:

  [user @ n001〜] $ erl -rsh ssh -sname n001 
Eshell V5.7.5(中止与^ G)
(n001 @ n001)1> slave:start_link(user @ n002,n002,-rsh ssh)。
bash:erl:command not found
{error,timeout}
(n001 @ n001)2>

也许有什么问题吗?
谢谢。



更新:
我已将erlang bin目录添加到$ PATH变量中;我设置了$ ERLANG_ROOT_DIR变量;在〜/到erl中创建符号链接 - 但没有任何改变...
Btw,我已经在〜/ bin / erlang目录中安装了erlang ...

解决方案

麻烦是在bash中:
实际上erlang通过ssh连接到节点,在非交互模式下调用默认sh。
但是当bash以非交互模式启动时,它不会读取.bashrc,其中存储了我的路径变量和别名。
所以我切换到zsh,一切都OK了! ;)


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... Btw, I have installed erlang in ~/bin/erlang dir...

解决方案

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! ;)

这篇关于Erlang:启动从节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆