简体   繁体   中英

unable to start rabbitmq server on ubuntu 10.04

I have a ubuntu server with version 10.04 and installed rabbitmq-server by using sudo apt-get install rabbitmq-server .

When i tried running rabbitmq-server , it returned the below error

{error_logger,{{2014,7,7},{12,10,27}},"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[]}
{error_logger,{{2014,7,7},{12,10,27}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.18.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,24},{reductions,598}],[]]}
{error_logger,{{2014,7,7},{12,10,27}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{offender,[{pid,undefined},{name,auth},{mfa,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2014,7,7},{12,10,27}},supervisor_report,[{supervisor,{local,kernel_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,{{2014,7,7},{12,10,27}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

So what was it and how to avoid it ?

I got such error when I accidentally changed permissions. So, to fix it:

chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie

chmod 600 /var/lib/rabbitmq/.erlang.cookie

As per this page: http://www.rabbitmq.com/man/rabbitmqctl.1.man.html

use:

sudo rabbitmqctl start_app

to start the service

Or refer to this page:

http://www.rabbitmq.com/install-debian.html

To use the debian/ubuntu specific method to start the server - you will need to be root or have root access (sudo)

Hope this helps,

{error_logger,{{2014,7,7},{12,10,27}},"Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces",[]} means the rabbit user running the command doesnt have access to the .erlang.cookie file. So, to fix it, chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie then, chmod 400 /var/lib/rabbitmq/.erlang.cookie

尝试用sudo service rabbitmq-server start解决一个问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM