9

I try to install rabbitmq-server on ubuntu-server 12.04 but failed.

Then I add the apt source list following the guide in http://www.rabbitmq.com/install-debian.html

But reinstall still have the same error as following:

$ sudo aptitude install rabbitmq-server
...
Setting up rabbitmq-server (2.8.7-1) ...
 * Starting message broker rabbitmq-server
 * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
   ...fail!
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing rabbitmq-server (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up rabbitmq-server (2.8.7-1) ...
 * Starting message broker rabbitmq-server
 * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
   ...fail!
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing rabbitmq-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rabbitmq-server

And error log seems show nothing useful neither:

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

# startup_log shows this
{error_logger,{{2012,10,10},{22,31,54}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,epmd_close}},[{inet_tcp_dist,listen,1},{net_kernel,start_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,{{2012,10,10},{22,31,54}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[#Port<0.90>,<0.17.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,24},{reductions,511}],[]]}
{error_logger,{{2012,10,10},{22,31,54}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[rabbitmqprelaunch18417,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2012,10,10},{22,31,54}},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,10,10},{22,31,54}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

I have googled for some time but got nothing useful.

One solution on the internet is to make sure hostname pingable, but my /etc/hosts already have this line on top:

127.0.0.1    localhost    myserver

Any suggestion on how to get up rabbitmq-server?

lxyu
  • 281
  • 1
  • 5
  • 9

7 Answers7

11

I faced this issue while installing rabbitmq-server, while I was installing chef. The work around for me and the solution to this problem is given as follows.

    $ sudo vim /etc/hosts

Then add

    $ 127.0.0.1 <hostname>

Here is your hostname, if not sure about the hostname then run the following command:

    $ hostname

the Result is your hostname. Just add that to your /etc/hosts and then run:

    $ sudo service rabbitmq-server start

And it was started.

This worked for me.

Dave M
  • 4,494
  • 21
  • 30
  • 30
Apurv Nerlekar
  • 219
  • 2
  • 5
2

First, check erl -sname foo on your shell. If you get the same error, it may be an issue with ubuntu erlang package.

So I just installed the newest erlang package and this works for me.

Khaled
  • 35,688
  • 8
  • 69
  • 98
joest
  • 121
  • 3
1

Your firewall/port maybe block so that it cannot start up!

By default, you should enable 5672 (rabbit mq port) and 4365 (empd port)

Then restart it again it should work.

TheOneTeam
  • 167
  • 1
  • 6
0

This is a problem related to /etc/host file. This file is not configure properly.

Just open the file:

$ sudo -s
$ vim /etc/hosts

Check lines that start with "127.0.0.1" in this file (usually it's located on the top of the file).

Then make it look like this:

127.0.0.1  your host name

Then save and quit. Now restart rabbitmq-server and confirm that it works.

slm
  • 7,355
  • 16
  • 54
  • 72
0

I also got a similar error.( I do not have the logs as I restarted the rabbitmq-server for devstack) My /etc/hosts file was well configured.

When rabbitmq_server fails, it logs certain information in erl_crash.dump. In the file, I could see that the port 5672( where the server is deployed) is not free. The same was visible from netstat -vtanp|grep 5672 The port was being used by beam.smp. I stopped the process and restarted the rabbitmq-server, and it worked.

0

In my case, the problem was that my firewall was blocking all local connections.

I had set the iptables policy for incoming packets to DROP. However, I needed to add a specific rule to allow packets coming from localhost.

Winston Ewert
  • 211
  • 1
  • 4
0

Just for be sure, take a look to your local network

ip add

If there's no "lo" network, the you should enable it:

ifconfig lo up

Then restart the server again and let's see if it works again now

systemctl start rabbitmq-server
sebix
  • 4,175
  • 2
  • 25
  • 45