LoginSignup
1
1

More than 5 years have passed since last update.

rabbitmq_managementを使うとRabbitMQの起動ができない

Posted at

環境

  • CentOS 7.1
  • Erlang R16B03
  • RabbitMQ 3.2.1

問題

RabbitMQをsystemctlで起動しようとすると失敗する。

systemctlでのメッセージはこんな感じ。

$ sudo systemctl status rabbitmq-server
rabbitmq-server.service - LSB: Enable AMQP service provided by RabbitMQ broker
   Loaded: loaded (/etc/rc.d/init.d/rabbitmq-server)
   Active: failed (Result: exit-code) since 火 2015-12-01 22:40:20 EST; 20min ago
  Process: 965 ExecStart=/etc/rc.d/init.d/rabbitmq-server start (code=exited, status=1/FAILURE)

12月 01 22:40:10 localhost systemd[1]: Starting LSB: Enable AMQP service provided by RabbitMQ broker...
12月 01 22:40:10 localhost su[1049]: (to rabbitmq) root on none
12月 01 22:40:12 localhost su[1616]: (to rabbitmq) root on none
12月 01 22:40:12 localhost su[1638]: (to rabbitmq) root on none
12月 01 22:40:20 localhost rabbitmq-server[965]: Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_{log, _err}
12月 01 22:40:20 localhost rabbitmq-server[965]: rabbitmq-server.
12月 01 22:40:20 localhost systemd[1]: rabbitmq-server.service: control process exited, code=exited status=1
12月 01 22:40:20 localhost systemd[1]: Failed to start LSB: Enable AMQP service provided by RabbitMQ broker.
12月 01 22:40:20 localhost systemd[1]: Unit rabbitmq-server.service entered failed state.

/var/log/rabbitmq/startup_logのログはこんな感じ。

 cat /var/log/rabbitmq/startup_log

              RabbitMQ 3.2.1. 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...

BOOT FAILED
===========

Error description:
   {could_not_start,rabbitmq_management,
                    {could_not_start_listener,[{port,15672}],eacces}}

Log files (may contain more information):
   /var/log/rabbitmq/rabbit@localhost.log
   /var/log/rabbitmq/rabbit@localhost-sasl.log

{"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabbitmq_management,{could_not_start_listener,[{port,15672}],eacces}}}}

原因

selinuxでした。

解決策

selinuxを無効化してやればいいです。

$ sudo setenforce 0
$ sudo sed -i "/SELINUX/s/enforcing/disabled/g" /etc/selinux/config
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1