Ubuntu: Start and Stop the RabbitMQ Server

The RabbitMQ server is started as a daemon by default when you first installed the RabbitMQ server package. This section describes how to manually start and stop it.

Prerequisites

Procedure

  1. Log in as the root user (or as an unprivileged user who has sudo privileges) and open a terminal window.

  2. Start the RabbitMQ server using the invoke-rc.d rabbitmq-server command, passing it the start option. For example:

    prompt# invoke-rc.d rabbitmq-server start

    The RabbitMQ server process runs as the rabbitmq user, which is non-interactive.

  3. To stop the server:

    prompt# invoke-rc.d rabbitmq-server stop
  4. To get status about the server (only partial output shown):

    prompt# invoke-rc.d rabbitmq-server status
    Status of node 'rabbit@vmc-ssrc-ub1056' ...
    [{pid,20045},
     {running_applications,
         [{rabbitmq_management,"RabbitMQ Management Console","3.1.5"},
          {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.1.5"},
          {webmachine,"webmachine","1.10.3-rmq3.1.5-gite9359c7"},
          {mochiweb,"MochiMedia Web Server","2.7.0-rmq3.1.5-git680dba8"},
          {rabbitmq_management_agent,"RabbitMQ Management Agent","3.1.5"},
          {rabbit,"RabbitMQ","3.1.5"},
          {os_mon,"CPO  CXC 138 46","2.2.7"},
          {inets,"INETS  CXC 138 49","5.7.1"},
          {xmerl,"XML parser","1.2.10"},
          {mnesia,"MNESIA  CXC 138 12","4.5"},
          {amqp_client,"RabbitMQ AMQP Client","3.1.5"},
          {sasl,"SASL  CXC 138 11","2.1.10"},
          {stdlib,"ERTS  CXC 138 10","1.17.5"},
          {kernel,"ERTS  CXC 138 10","2.14.5"}]},
     {os,{unix,linux}},
     {erlang_version,
         "Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:30] [kernel-poll:true]\n"},
    ...

What to do next