我正在尝试在centos 7中启动rabbitmq服务器
[root@localhost ~]# /sbin/service rabbitmq-server start
Starting rabbitmq-server (via systemctl): Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
然后显示此状态
[root@localhost ~]# systemctl status rabbitmq-server.service
● rabbitmq-server.service - LSB: Enable AMQP service provided by RabbitMQ broker
Loaded: loaded (/etc/rc.d/init.d/rabbitmq-server; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 2017-05-05 18:32:08 CST; 10s ago
Docs: man:systemd-sysv-generator(8)
Process: 5196 ExecStart=/etc/rc.d/init.d/rabbitmq-server start (code=exited, status=1/FAILURE)
5月 05 18:32:06 localhost.localdomain systemd[1]: Starting LSB: Enable AMQP service provided by RabbitMQ broker...
5月 05 18:32:06 localhost.localdomain su[5206]: (to rabbitmq) root on none
5月 05 18:32:06 localhost.localdomain su[5267]: (to rabbitmq) root on none
5月 05 18:32:06 localhost.localdomain su[5269]: (to rabbitmq) root on none
5月 05 18:32:08 localhost.localdomain rabbitmq-server[5196]: Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_{log, _err}
5月 05 18:32:08 localhost.localdomain rabbitmq-server[5196]: rabbitmq-server.
5月 05 18:32:08 localhost.localdomain systemd[1]: rabbitmq-server.service: control process exited, code=exited status=1
5月 05 18:32:08 localhost.localdomain systemd[1]: Failed to start LSB: Enable AMQP service provided by RabbitMQ broker.
5月 05 18:32:08 localhost.localdomain systemd[1]: Unit rabbitmq-server.service entered failed state.
5月 05 18:32:08 localhost.localdomain systemd[1]: rabbitmq-server.service failed.
[root@localhost ~]# firewall-cmd --permanent --add-port=5672/tcp
FirewallD is not running
[root@localhost ~]# firewall-cmd --reload
FirewallD is not running
[root@localhost ~]# setsebool -P nis_enabled 1
setsebool: SELinux is disabled.
[root@localhost ~]# cat /etc/hostname
localhost.localdomain
[root@localhost ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 saltcode
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
检查此日志和错误文件
[root@localhost ~]# cat /var/log/rabbitmq/startup_err
Kernel pid terminated (application_controller) ({application_start_failure,sasl,{bad_return,{{sasl,start,[normal,[]]},{'EXIT',{undef,[{sasl,start,[normal,[]],[]},{application_master,start_it_old,4,[{f
Crash dump is being written to: erl_crash.dump...done
[root@localhost ~]# cat /var/log/rabbitmq/startup_log
=INFO REPORT==== 5-May-2017::18:32:06 ===
application: sasl
exited: {bad_return,
{{sasl,start,[normal,[]]},
{'EXIT',
{undef,
[{sasl,start,[normal,[]],[]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},
{line,273}]}]}}}}
type: permanent
{"Kernel pid terminated",application_controller,"{application_start_failure,sasl,{bad_return,{{sasl,start,[normal,[]]},{'EXIT',{undef,[{sasl,start,[normal,[]],[]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,273}]}]}}}}}"}
我可以推测这是网络或端口配置问题,有人可以告诉我如何解决它?
如果我直接从客户端运行它,它似乎正在运行,但是从xshell退出时它将停止。
[root@localhost ~]# rabbitmq-server
RabbitMQ 3.1.5. Copyright (C) 2007-2013 GoPivotal, Inc.
## ## Licensed under the MPL. See http://www.rabbitmq.com/
## ##
########## Logs: /var/log/rabbitmq/rabbit@localhost.log
###### ## /var/log/rabbitmq/rabbit@localhost-sasl.log
##########
Starting broker... completed with 6 plugins.