[rabbitmq-discuss] Error: Can't set short node name! Please check your configuration

Tim Watson tim at rabbitmq.com
Mon May 21 10:37:25 BST 2012


On 17/05/2012 11:52, Андрей Спиридонов wrote:
> "Let us know what you were trying to do, the error you received and relevant entries from the logfile and one of our engineers will help you get it fixed."
>
> OS: Windows 7
>
> I was trying next command:
>
>> rabbitmqctl status
>
> error:
> {error_logger,{{2012,5,17},{14,39,42}},"Can't set short node name!\nPlease check your configuration\n",[]}
> {error_logger,{{2012,5,17},{14,39,42}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.19.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.16.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,24},{reductions,220}],[]]}
> {error_logger,{{2012,5,17},{14,39,42}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[rabbitmqctl15024,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
> {error_logger,{{2012,5,17},{14,39,42}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
> {error_logger,{{2012,5,17},{14,39,42}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
> {"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}
>
>
> where I can set node name and how? How can I check my configuration? Thank us in advance!

Hi there. The node name is set by the scripts rabbitmq-server and 
rabbitmqctl.

Erlang has two kinds of node name, short names (passed as -sname <name> 
to the emulator) and long names (pass as -name <name>). Short names must 
not contain the full hostname, whereas long names do. For example here 
is one short and one long name:

$ erl -sname myserver
$ erl -name myserver.mydomain.com

By default, rabbit uses the 'shortnames' scheme. The actual name that a 
node uses is governed by the environment variable RABBITMQ_NODE_NAME, 
and by default this will be set to 'rabbit'.

Both the scripts need to use the same naming scheme. If you're using the 
default (short) naming scheme, then your node names must not contain the 
domain part, just the 'short' hostname as evidenced via `hostname -s` or 
equivalent.

HTH

>
>
> PS
>> rabbitmq-service start
> works fine. Output: Service RabbitMQ started.
>
> but when I'm trying to start rabbit as a server... then I get the same error:



More information about the rabbitmq-discuss mailing list