我准备与Chef一起安装Sensu,但是RabbitMQ似乎没有工作。即使安装erlang和RabbitMQ成功,rabbitmq-server的服务也无法启动。
rabbitMQ的错误说
Error: unable to connect to node rabbit@localhost: nodedown
和
rabbitmq service has already started
所以我用ps命令检查了rabbitmq的进程。
ps aux |grep rabbitmq
肯定有一个进程正在与rabbitmq用户一起运行
/usr/lib64/erlang/erts-6.1/bin/epmd -daemon
我杀了那个进程,然后重新启动了rabbitmq-server服务。但无法启动rabbitmq-server,同样的日志显示同样的事情,同样的事情发生了。
我曾删除过erlang和rabbitmq并重新安装它们,但结果是一样的。
以下是详细信息。
服务器
OS: CentOS 6.5
Related installed packages
erlang.x86_64 17.1-1.1.el6
rabbitmq-server.noarch 3.1.5-1.el6
原始日志
# /etc/init.d/rabbitmq-server status
Status of node rabbit@localhost ...
Error: unable to connect to node rabbit@localhost: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit@localhost]
hosts, their running nodes and ports:
- localhost: [{rabbitmqctl23036,37270}]
current node details:
- node name: rabbitmqctl23036@localhost
- home dir: /var/lib/rabbitmq
- cookie hash: Tghu0ucbQ4pq3Sc0JJBbAg==
# tail /var/log/rabbitmq/rabbit\@localhost.log
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
Starting RabbitMQ 3.1.5 on Erlang 17
Copyright (C) 2007-2013 GoPivotal, Inc.
Licensed under the MPL. See http://www.rabbitmq.com/
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
node : rabbit@localhost
home dir : /var/lib/rabbitmq
cookie hash : 9qNy1Q7BP12PVVcbSnZwRw==
log : /var/log/rabbitmq/rabbit@localhost.log
sasl log : /var/log/rabbitmq/rabbit@localhost-sasl.log
database dir : /var/lib/rabbitmq/mnesia/rabbit@localhost
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
Limiting to approx 924 file handles (829 sockets)
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
Memory limit set to 802MB of 2006MB total.
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
Disk free limit set to 1000MB
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
msg_store_transient: using rabbit_msg_store_ets_index to provide index
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
msg_store_persistent: using rabbit_msg_store_ets_index to provide index
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
started TCP Listener on [::]:5672
=INFO REPORT==== 6-Aug-2014::14:59:15 ===
Error description:
{case_clause,{error,{already_started,<0.193.0>}}}
Log files (may contain more information):
/var/log/rabbitmq/rabbit@localhost.log
/var/log/rabbitmq/rabbit@localhost-sasl.log
Stack trace:
[{rabbit_networking,start_listener0,4,[]},
{rabbit_networking,'-start_listener/4-lc$^0/1-0-',4,[]},
{rabbit_networking,start_listener,4,[]},
{rabbit_networking,'-boot_ssl/0-lc$^0/1-0-',1,[]},
{rabbit_networking,boot_ssl,0,[]},
{rabbit_networking,boot,0,[]},
{rabbit,'-run_boot_step/1-lc$^1/1-1-',1,[]},
{rabbit,run_boot_step,1,[]}]
=INFO REPORT==== 6-Aug-2014::14:59:16 ===
stopped TCP Listener on [::]:5672
=INFO REPORT==== 6-Aug-2014::14:59:16 ===
Error description:
{could_not_start,rabbit,
{bad_return,
{{rabbit,start,[normal,[]]},
{'EXIT',
{rabbit,failure_during_boot,
{case_clause,{error,{already_started,<0.193.0>}}}}}}}}
Log files (may contain more information):
/var/log/rabbitmq/rabbit@localhost.log
/var/log/rabbitmq/rabbit@localhost-sasl.log
答案 0 :(得分:0)
看起来RabbitMQ(确切地说5672
)正在使用的端口已经被使用了。或者在你的情况下,它可能仍然被采取。如果您杀死在某个端口上打开套接字的应用程序,则您没有给它时间来正确关闭此连接。系统最终会注意到这一点并释放资源,但可能需要一些时间。所以你可以做的就是等一下,或者改变RabbitMQ configuration。
希望这会对您的一些问题有所帮助。