unable to start rabbitmq-server
Solution 1
I looked for a similar error on google, and it looks like it can happen if your /etc/hosts
file is in the wrong format. Try fixing it and see if that helps.
References:
Edit: For completeness, it seems like setting a long name (of the form abc@abc
) worked.
Solution 2
check your computer name and your short host name or alias name in /etc/hosts, match this
- Check your computer name
[wendy@nyc123]$
nyc123 is your computer name -
Check your short hostname
[wendy@nyc123]$ hostname -s
[wendy@nyc123]$ nyc456
This error could happen because your computer name and short host name didn't match. To match this, you can change the computer hostname or alias name.
-
Change computer host name
[wendy@nyc123]$ hostname nyc456
close your terminal and open again [wendy@nyc456]$ the computer name has changed
or
-
Change alias name in /etc/hosts
127.0.0.1 nyc123.com nyc123
save and check again[wendy@nyc123]$ hostname -s
[wendy@nyc123]$ nyc123
Restart your rabbitmq!
[root@nyc123]$ rabbitmq-server start</p>
RabbitMQ 3.6.0. Copyright (C) 2007-2015 Pivotal Software, Inc.</p>
## ## Licensed under the MPL. See http://www.rabbitmq.com/</p>
## ##</p>
########## Logs: /var/log/rabbitmq/[email protected]</p>
###### ## /var/log/rabbitmq/[email protected]</p>
##########</p>
Starting broker... completed with 6 plugins.</p>
Solution 3
Found the answer here: control rabbitmq 'name' not 'sname'
Set your machine name to something simple and make it an alias to locahost
Solution 4
I also encountered this problem yesterday and found the root cause: I had changed my system's hostname to a "long" name, pm3(hc desktop).
If your server's hostname is long or invalid, Linux can still work and no error message is prompted to you. As you just modify the /etc/hostname file and reboot. However, the rabbitmq server may not work and give this "short-name" error message to you.
I changed hostname back to "pm3", rebooted and everything went well.
Comments
-
Madhusudhan almost 2 years
I installed rabbitmq using homebrew. I am trying to start rabbitmq server but I always get this error which I am unable to figure out why!
I have erlang installed and there is no other application running on the same port.
$ rabbitmq-server {error_logger,{{2013,2,11},{22,37,49}},"Can't set short node name!\nPlease check your configuration\n",[]} {error_logger,{{2013,2,11},{22,37,49}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,},{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,]},{messages,[]},{links,[]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,24},{reductions,249}],[]]} {error_logger,{{2013,2,11},{22,37,49}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[rabbitmqprelaunch1593,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]} {error_logger,{{2013,2,11},{22,37,49}},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,{{2013,2,11},{22,37,49}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]} {"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"} Crash dump was written to: erl_crash.dump Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
btw,
erl -sname abc
gives the same outputUpdate:
This is what I have in
/etc/hosts
127.0.0.1 localhost 255.255.255.255 broadcasthost
-
Madhusudhan about 11 yearsall i have in /etc/hosts is 127.0.0.1 localhost 255.255.255.255 broadcasthost
-
Luke Bakken about 6 yearsThis is the correct answer. Since the original poster is on OS X, there needs to be an entry in
/etc/hosts
for127.0.0.1
that matches the output ofhostname -s