为什么我不能在Windows中启动一个名为Erlang的节点?

时间:2022-02-09 20:53:06

I'm trying to start a named Erlang node using the -sname option in Windows XP Home, but when I run erl, it prints out a long error message, which I don't understand, and quits:

我正在尝试使用Windows XP Home中的-sname选项启动一个名为Erlang的节点,但是当我运行erl时,它会输出一条很长的错误消息,我不明白,并退出:

>erl -sname allyourcode
{error_logger,{{2009,5,25},{16,20,57}},"Protocol: ~p: register error: ~p~n",["in
et_tcp",{{badmatch,{error,econnrefused}},[{inet_tcp_dist,listen,1},{net_kernel,s
tart_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{net_kernel,
init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}]}
{error_logger,{{2009,5,25},{16,20,57}},crash_report,[[{initial_call,{net_kernel,
init,['Argument__1']}},{pid,},{registered_name,[]},{error_info,{exit,{er
ror,badarg},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[
net_sup,kernel_sup,]},{messages,[]},{links,[#Port,]},{dicti
onary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,610},{st
ack_size,24},{reductions,490}],[]]}
{error_logger,{{2009,5,25},{16,20,57}},supervisor_report,[{supervisor,{local,net
_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{p
id,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[allyourcode,shortn
ames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2009,5,25},{16,20,57}},supervisor_report,[{supervisor,{local,ker
nel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined
},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},{restart_type,permanent}
,{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2009,5,25},{16,20,57}},std_info,[{application,kernel},{exited,{s
hutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kern
el,{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kerne
l,{shutdown,{kernel,start,[normal,[]]}}})

I'd like to include the erl_crash.dump file, but I don't know a good way to do that, because it's pretty long.

我想要包含erl_crash.dump文件,但我不知道这样做的好方法,因为它很长。

At first, I thought I was having a firewall issue, because the first time I tried to do this, my firewall asked if I would grant permission to different programs, which I did; however, even after disabling my firewall, I'm still having the same problem.

起初,我以为我遇到了防火墙问题,因为我第一次尝试这样做时,我的防火墙问我是否会授予不同程序的权限,我这样做了;然而,即使在禁用我的防火墙后,我仍然遇到同样的问题。

Using -name instead doesn't seem to help either.

使用-name似乎也没有帮助。

3 个解决方案

#1


Yes, you may even have to restart your OS - to check whether this is true, you could also simply start a node with a different name, also it is generally better to use a fully qualified name, such as:

是的,您甚至可能必须重新启动操作系统 - 检查是否属实,您也可以简单地启动具有不同名称的节点,通常最好使用完全限定名称,例如:

erl -name rambo@127.0.0.1 -setcookie KILLER

erl -name rambo@127.0.0.1 -setcookie KILLER

Then, start another one using:

然后,使用以下命令启动另一个

erl -name terminator@127.0.0.1 -setcookie KILLER

erl -name terminator@127.0.0.1 -setcookie KILLER

and try to ping the other node:

并尝试ping其他节点:

net_adm:ping('rambo@127.0.0.1').

You should get a 'pong' message.

你应该收到'pong'的消息。

Next use

nodes().

to see all visible nodes.

查看所有可见节点。

#2


I think that you will find that you have started a node by that name already. Try shutting down all your Erlang console windows and try again.

我想你会发现你已经用这个名字开始了一个节点。尝试关闭所有Erlang控制台窗口,然后重试。

#3


  1. You need to make sure you are not using an already registered name (of course): this includes any name already claimed by Erlang.

    您需要确保您没有使用已注册的名称(当然):这包括Erlang已声明的任何名称。

  2. If you are starting on the same machine but under different user, make sure your cookies are the same.

    如果您在相同的计算机上但在不同的用户下启动,请确保您的cookie是相同的。

#1


Yes, you may even have to restart your OS - to check whether this is true, you could also simply start a node with a different name, also it is generally better to use a fully qualified name, such as:

是的,您甚至可能必须重新启动操作系统 - 检查是否属实,您也可以简单地启动具有不同名称的节点,通常最好使用完全限定名称,例如:

erl -name rambo@127.0.0.1 -setcookie KILLER

erl -name rambo@127.0.0.1 -setcookie KILLER

Then, start another one using:

然后,使用以下命令启动另一个

erl -name terminator@127.0.0.1 -setcookie KILLER

erl -name terminator@127.0.0.1 -setcookie KILLER

and try to ping the other node:

并尝试ping其他节点:

net_adm:ping('rambo@127.0.0.1').

You should get a 'pong' message.

你应该收到'pong'的消息。

Next use

nodes().

to see all visible nodes.

查看所有可见节点。

#2


I think that you will find that you have started a node by that name already. Try shutting down all your Erlang console windows and try again.

我想你会发现你已经用这个名字开始了一个节点。尝试关闭所有Erlang控制台窗口,然后重试。

#3


  1. You need to make sure you are not using an already registered name (of course): this includes any name already claimed by Erlang.

    您需要确保您没有使用已注册的名称(当然):这包括Erlang已声明的任何名称。

  2. If you are starting on the same machine but under different user, make sure your cookies are the same.

    如果您在相同的计算机上但在不同的用户下启动,请确保您的cookie是相同的。