title: Failed to start LSB: Enable AMQP service provided by RabbitMQ broker
body: <p>I am trying to start the rabbitmq server in centos 7</p>
  
  <pre><code>[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.
  </code></pre>
  
  <p>then showing this status</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>Check this log and err file</p>
  
  <pre><code>[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}]}]}}}}}"}
  </code></pre>
  
  <p>There i can speculate that is network or port config question, and someone can tell me how to resolve it?</p>
  
  <p>If i run it from client directly, its seems running, but it will be stop when quit from xshell.</p>
  
  <pre><code>[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.
  </code></pre>