RabbitMQ 2.7.1并不以配置文件开头;原因:function_clause

时间:2014-03-24 08:28:34

标签: rabbitmq

我尝试在ubuntu 12.04上使用兔子。安装后rabbitmq-server工作正常。比我停止它并添加我的配置文件。

root@rabbit1:~# tail /etc/rabbitmq/rabbitmq-env.conf 
RABBITMQ_CONFIG_FILE=/etc/rabbitmq/myrabbitmq
root@rabbit1:~# tail /etc/rabbitmq/myrabbitmq.config 
[{rabbit,
    [{cluster_nodes, {['rabbit@rabbit1', 'rabbit@rabbit2'], disc}}]}].

使用这个文件,rabbitmq-server在开始时说:

root@rabbit1:~# rabbitmq-server
Activating RabbitMQ plugins ...
0 plugins activated:


+---+   +---+
|   |   |   |
|   |   |   |
|   |   |   |
|   +---+   +-------+
|                   |
| RabbitMQ  +---+   |
|           |   |   |
|   v2.7.1  +---+   |
|                   |
+-------------------+
AMQP 0-9-1 / 0-9 / 0-8
Copyright (C) 2007-2011 VMware, Inc.
Licensed under the MPL.  See http://www.rabbitmq.com/

node           : rabbit@rabbit1
app descriptor : /usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/sbin/../ebin/rabbit.app
home dir       : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/myrabbitmq.config
cookie hash    : 31CaH3BCSDNL1hDIFQzH2Q==
log            : /var/log/rabbitmq/rabbit@rabbit1.log
sasl log       : /var/log/rabbitmq/rabbit@rabbit1-sasl.log
database dir   : /var/lib/rabbitmq/mnesia/rabbit@rabbit1
erlang version : 5.8.5

-- rabbit boot start
starting file handle cache server                                     ...done
starting worker pool                                                  ...done
starting database                                                     ...BOOT ERROR: FAILED
Reason: function_clause
Stacktrace: [{lists,usort,[{[rabbit@rabbit1,rabbit@rabbit2],disc}]},
             {rabbit_mnesia,init_db,3},
             {rabbit_mnesia,init,0},
             {rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
             {rabbit,run_boot_step,1},
             {rabbit,'-start/2-lc$^0/1-0-',1},
             {rabbit,start,2},
             {application_master,start_it_old,4}]
Erlang has closed
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}})

有什么迹象表明我的兔子有什么问题吗?

1 个答案:

答案 0 :(得分:1)

配置文件应该是这样的:

root@rabbit1:~# cat /etc/rabbitmq/myrabbitmq.config
[{rabbit,
  [{cluster_nodes, ['rabbit@rabbit1', 'rabbit@rabbit2'] }]}].

看来,光盘或ram节点的配置方式与最新版兔子的文档不同。在此配置中,将创建两个磁盘节点。如果有人想要ram节点,则应该在此节点的配置中省略此节点(而不是在其他配置文件中)。