我正要和厨师一起安装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发布于 2014-08-11 20:05:51
看起来RabbitMQ (准确地说是5672)正在使用的端口已经被占用了。或者在你的情况下,它可能还会被拿走。如果您终止在某些端口上打开套接字的应用程序,则没有给它足够的时间来正确关闭此连接。系统最终会注意到这一点并释放资源,但这可能需要一些时间。因此,您可以稍等片刻,或者更改RabbitMQ configuration。
希望这能帮助你解决一些问题。
https://stackoverflow.com/questions/25161319
复制相似问题