Erlang 无法在CentOS 6.5上启动RabbitMQ服务器
我正要和Chef一起安装Sensu,但RabbitMQ似乎不起作用。即使erlang和rabbitmq安装成功,rabbitmq服务器的服务也不会启动 rabbitMQ的错误是Erlang 无法在CentOS 6.5上启动RabbitMQ服务器,erlang,rabbitmq,chef-infra,yum,sensu,Erlang,Rabbitmq,Chef Infra,Yum,Sensu,我正要和Chef一起安装Sensu,但RabbitMQ似乎不起作用。即使erlang和rabbitmq安装成功,rabbitmq服务器的服务也不会启动 rabbitMQ的错误是 Error: unable to connect to node rabbit@localhost: nodedown 及 所以我用ps命令检查了rabbitmq的进程 ps aux |grep rabbitmq 确保有一个进程正在使用rabbitmq用户运行 /usr/lib64/erlang/erts-6.1/b
Error: unable to connect to node rabbit@localhost: nodedown
及
所以我用ps命令检查了rabbitmq的进程
ps aux |grep rabbitmq
确保有一个进程正在使用rabbitmq用户运行
/usr/lib64/erlang/erts-6.1/bin/epmd -daemon
我终止了该进程,并重新启动了rabbitmq服务器服务。但是,无法启动rabbitmq服务器,并且显示了相同的日志—发生了相同的事情
我曾经删除了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
确切地说,RabbitMQ 5672使用的端口似乎已被占用。或者在你的情况下,它可能仍然是采取。若您关闭了在某个端口上打开套接字的应用程序,那个么您就并没有给它足够的时间来正确关闭此连接。系统最终会注意到这一点并释放资源,但这可能需要一些时间。所以你能做的就是等一等,或者改变一下
希望这能帮助您解决一些问题。端口5672是否已被占用?也许您可以使用lsof进行检查?您是否使用同一用户启动rabbitmq并稍后联系它?Erlang程序必须使用相同的.Erlang.cookie文件才能相互联系在我的情况下,我在rabbitmq.config中配置了ssl_侦听器,但没有tcp_侦听器;当我使用不同的端口将tcp_侦听器添加到配置中时,服务再次开始工作。
# /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