
This section contains server installation instructions for various platforms. You can download example programs, utilities, Java client libraries and bindings to various third-party management, monitoring and routing tools from http://www.rabbitmq.com/.
The bundle zip file contains all the files listed in the next section, including an Erlang system installer and the RabbitMQ broker binary distribution, the .Net client, as well as an archive of the Java librabbitmq client library.
rabbitmq-server-windows-2.0.0.zip
from the download page.
rabbitmq_server-2.0.0.
You should extract this folder to somewhere appropriate
for application files, for example C:\Program Files\RabbitMQ.
Once the files are successfully extracted, you should end up with a structure
similar to C:\Program Files\RabbitMQ\rabbitmq_server-2.0.0.
You will also need to set the environment
variable ERLANG_HOME to point to your Erlang directory
(e.g. C:\Program Files\erl5.7.4).
sbin directory is a file
rabbitmq-server.bat which may need
customisation for your installation, especially if you
use a different version of Erlang. Environment variables
set within the batch file are
C:\Program Files\erl5.7.4.
The RabbitMQ batch file expects the file
bin\erl.exe to be present at this
location. The default setting determines the base
directory from the script location, which will work
in most cases.
RabbitMQ in
the user's application data directory, e.g.
C:\Documents and Settings\User\Application Data\RabbitMQ.
Under Windows Vista the location would be slightly different, e.g.
C:\Documents and Settings\User\AppData\Roaming\RabbitMQ
This is the base directory containing
sub-directories for the RabbitMQ Server's database
and log files. Alternatively, set
RABBITMQ_MNESIA_BASE and
RABBITMQ_LOG_BASE individually.
%RABBITMQ_BASE%\db. Set this to the
directory where Mnesia database files should be
placed.
%RABBITMQ_BASE%\log. Log files
generated by the server will be placed in this
directory.
rabbit. This can be useful
if you want to run more than one node per machine -
RABBITMQ_NODENAME should be unique per
erlang-node-and-machine combination. See
clustering on a single machine for more.
0.0.0.0. This can be changed
if you only want to bind to one network interface.
Please note that Windows 2000 (and maybe earlier
versions) do not understand "0.0.0.0"
and will need to have this set explicitly.
5672.
%RABBITMQ_BASE%\rabbitmq. If this file
is present it is used by the server to configure
RabbitMQ application components. Note that the
.config extension is automatically appended by the
Erlang runtime. See the section on the configuration file for
details. Note that this file is also used to
auto-configure RabbitMQ clusters. See the clustering guide for
details.
Currently, it's sufficient to change directory to
rabbitmq_server-2.0.0\sbin
and double-click the rabbitmq-server.bat
file.
The shell window that results displays a banner message, and reports on progress in the startup sequence, concluding with the message "broker running", indicating that the RabbitMQ broker has been started successfully. To shut down the server, close the shell window. Alternatively, use the rabbitmqctl stop command.
The server can be run as a service instead of an application. The server will run in the security context of the system account, without the need for a user to be logged in on a console. The server should not be run as a service and application simultaneously.
rabbitmq-service.bat script in the
sbin directory is used to manage the
service. The rabbitmq-service.bat script
recognises many of the same environment variables as
rabbitmq-server.bat (see the previous
section), as well as a few additional
ones. Of particular importance are:
C:\Program Files\erl5.7.4\erts-5.7.4\bin. The given path
must contain the erlsrv.exe Erlang service wrapper
script.
new or
reuse to have the console output from
the server redirected to a file named
RABBITMQ_SERVICENAME.debug in the
default RABBITMQ_BASE directory. If
RABBITMQ_CONSOLE_LOG is set to
new then a new file will be created
each time the service starts. If
RABBITMQ_CONSOLE_LOG is set to
reuse then the file will be
overwritten each time the service starts. If
RABBITMQ_CONSOLE_LOG is unset then
console output from the server will be discarded.
cmd.exe)
in the sbin directory where the broker was installed.
Install the service by executing rabbitmq-service.bat install
services.msc).
Confirm that the service account has full access to the RABBITMQ_BASE,
RABBITMQ_MNESIA_BASE and RABBITMQ_LOG_BASE
directories.
rabbitmqctl.bat script then the Erlang
security cookies for those accounts must be synchronised before
running rabbitmqctl.bat. The cookie is stored in a
file named .erlang.cookie and stored in the home
or %APPDATA% directory of the account. Local service
account cookies are normally stored in C:\WINDOWS\.erlang.cookie
while user account cookies are typically stored in
C:\Documents and Settings\User\.erlang.cookie .
The contents of the two cookie files must be identical.
rabbitmq-service.bat startto start the server. If the output from this command is "
Service RABBITMQ_SERVICENAME
started", then the service was started
correctly. If the output reads "The process
terminated unexpectedly" instead, then the
service did not start correctly. Check that the
environment variables are set correctly. The logfiles in
RABBITMQ_BASE may also contain useful diagnostic
information.
services.msc) reports a
"Started" status for the service named RABBITMQ_SERVICENAME.
rabbitmqctl.bat script.
Refer to the service guide
for a complete description of rabbitmq-service.bat
arguments.
Output from the server is sent to a RABBITMQ_NODENAME.log file in the RABBITMQ_LOG_BASE directory. Additional log data is written to RABBITMQ_NODENAME-sasl.log.
The log files are created afresh every time the broker
starts. In order to retain a complete log history the
startup scripts append the contents to the corresponding
.1 files prior to starting the broker.
You can easily write your own log rotation script using the
rotate_logs_all command in
rabbitmq-multi.bat or the rotate_logs
command in rabbitmqctl.bat if you want to perform
log rotation selectively.
/etc/rabbitmq/rabbitmq.conf, setting
environment variables as described in the Generic Unix section below (but
dropping the RABBITMQ_ prefix). You can additionally set
NODE_COUNT in
/etc/default/rabbitmq to define the number of
nodes to run on a single machine.
The server is started as a daemon by default when the
RabbitMQ Server package is installed. Start and stop the
server as usual for Debian using invoke-rc.d
rabbitmq-server stop/start/etc.
The server is set up to run as system user rabbitmq.
This means that if you change the location
of the Mnesia database or logs as described below, you must
ensure the files are owned by this user.
The startup script waits for a limited amount of time, 30
seconds by default, for the broker nodes to start. When
that time is exceeded a TIMEOUT is
reported. The cause of this could be a misconfiguration or
other error. However, it is also possible that the node
simply is taking a long time to start up, perhaps because
the machine it is running on is heavily loaded, or there
are many persisted messages or durable queues and
exchanges that need to be recovered. For that reason the
timeout can be adjusted by setting
MULTI_START_ARGS to
"-maxwait timeout_in_seconds"
in /etc/rabbitmq/rabbitmq.conf.
Output from the server is sent to a RABBITMQ_NODENAME.log file in the RABBITMQ_LOG_BASE directory. Additional log data is written to RABBITMQ_NODENAME-sasl.log.
The log files use logrotate program to do all
the necessary rotation and compression (when needed). The
script runs weekly, but you can easily change that. By default
logrotate will handle files located in default
/var/log/rabbitmq directory. See
/etc/logrotate.d/rabbitmq-server for default
logrotate configuration file.
/etc/rabbitmq/rabbitmq.conf, setting
environment variables as described in the Generic Unix section below. You
can additionally set NODE_COUNT in
/etc/sysconfig/rabbitmq to define
the number of
nodes to run on a single machine.
The server is not started as a daemon by default when the
RabbitMQ Server package is installed. Start and stop the
server as usual using /sbin/service rabbitmq-server
stop/start/etc. To start the daemon by default
when the system boots, run chkconfig rabbitmq-server on.
The server is set up to run as system user rabbitmq.
This means that if you change the location
of the Mnesia database or logs as described below, you must
ensure the files are owned by this user.
The startup script waits for a limited amount of time, 30
seconds by default, for the broker nodes to start. When that
time is exceeded a TIMEOUT is reported. The
cause of this could be a misconfiguration or other
error. However, it is also possible that the node simply is
taking a long time to start up, perhaps because the machine
it is running on is heavily loaded, or there are many
persisted messages or durable queues and exchanges that need
to be recovered. For that reason the timeout can be adjusted
by setting MULTI_START_ARGS to
"-maxwait timeout_in_seconds"
in /etc/rabbitmq/rabbitmq.conf.
A portfile for the RabbitMQ server is included in MacPorts. From the MacPorts home page:
The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system.
Users of Mac OS X who do not use MacPorts can use the Generic Unix installation instructions below.
The officially released MacPorts packaging may not always contain the lastest released version of RabbitMQ. If you wish to install the latest version via MacPorts, we maintain a dedicated MacPorts repository for this purpose.
Installation of the version of the RabbitMQ server
distributed with MacPorts is as simple as (sudo port
sync followed by)
sudo port install rabbitmq-server
To start the server, you can either use launchctl (see the
instructions emitted during the sudo port
install step) or you can start it from the command
line with sudo rabbitmq-server.
The rabbitmq-server,
rabbitmqctl, and other RabbitMQ-related
scripts on the path automatically (through sudo) run in
the context of the rabbitmq user so that the Erlang cookie
can be read from
$MACPORTS_PREFIX/var/lib/rabbitmq/.erlang.cookie.
rabbitmq-server-generic-unix-2.0.0.tar.gz
from the download page.
rabbitmq_server-2.0.0. You should
extract this into somewhere appropriate for application
binaries on your system.
sbin directory is a shell script
rabbitmq-server which may need
customisation for your installation. Environment
variables available for configuration are
/var/lib/rabbitmq/mnesia. Set this to
the directory where Mnesia database files should be
placed.
/var/log/rabbitmq. Log
files generated by the server will be placed in this
directory.
rabbit. This can be useful
if you want to run more than one node per machine -
RABBITMQ_NODENAME should be unique per
erlang-node-and-machine combination. See
clustering on a single machine for more.
0.0.0.0. This can be changed
if you only want to bind to one network interface.
5672.
/etc/rabbitmq/rabbitmq. If
this file is present it is used by the server to
configure RabbitMQ application components. Note that
the .config extension is automatically appended by
the Erlang runtime. See the section on the configuration file for
details. Note that this file is also used to
auto-configure RabbitMQ clusters. See the clustering guide for
details.
Invoke the rabbitmq-server shell script.
This displays a banner message, and reports on progress in
the startup sequence, concluding with the message "broker
running", indicating that the RabbitMQ broker has been
started successfully. To shut down the server just
terminate the process. Alternatively, use the rabbitmqctl stop command.
You can also start the server in "detached" mode with
rabbitmq-server -detached, in which case the
server process is backgrounded immediately and nothing is
written to the console.
Output from the server is sent to a RABBITMQ_NODENAME.log file in the RABBITMQ_LOG_BASE directory. Additional log data is written to RABBITMQ_NODENAME-sasl.log.
In order to retain a complete log history the startup scripts,
by default, append the contents to the corresponding .1
files prior to starting the broker.
You can easily set up log rotation process by creating
logrotate script as it is done for
Debian and RPM based distributions.
If the server fails to start, examine the console output and the log files in the RABBITMQ_LOG_BASE directory for clues. Chances are there is a configuration error, e.g. the mnesia directory cannot be created or the TCP port on which RabbitMQ tries to listen is already taken.
When the server fails to start, usually a crash dump file
erl_crash.dump is created in the directory
where the server was started. This can provide very detailed
information on the causes of a start up failure, but its
analysis requires Erlang expertise.
If the server is not behaving as expected during operation, examine the log files for clues and use the rabbitmqctl commands from the admin guide to obtain further information on the server status.
For problems encountered in the handling of AMQP traffic, the AMQP capture and analysis tool may help in the analysis.
Failing that, it's possible that we've solved the problem for someone else on our mailing list archives a Google search for something like erl_crash.dump site:lists.rabbitmq.com should do the trick, possibly also adding terms for your platform, RabbitMQ/Erlang versions and anything else relevant to what you were trying to do when things went wrong.
If you can't find a solution to your problem on the list archive then please post a new message to rabbitmq-discuss@lists.rabbitmq.com (you may have to join the mailing list first). Let us know what you were trying to do, the error you received and a copy of the crash dump and one of our engineers will help you get it fixed.
If all of the above fails, report the problem to support@rabbitmq.com and include the log files under RABBITMQ_LOG_BASE in your report.
The Rabbit configuration file allows for the rabbit core application, Erlang services and Rabbit plugins to be configured. This configuration file is a standard Erlang configuration file, as documented on the Erlang Config Man Page.
The location of this configuration file is distribution specific. By default, it is located in the following places on each platform:
Note that this file is not the same as the
rabbitmq.conf mentioned elsewhere -
rabbitmq.conf can be used to set the environment
variables mentioned on this page, while
rabbitmq.config contains an Erlang term. A
future release of RabbitMQ will unify the two configuration
mechanisms.
Note that this file may not be created by default. If needed, it can be created manually. The location can also be overidden via the RABBITMQ_CONFIG_FILE environment variable. Note that the property value should not include the .config extension - this is automatically appended by the Erlang runtime.
An example configuration file would look like:
[
{mnesia, [{dump_log_write_threshold, 1000}]},
{rabbit, []}
].
This configuration file will alter the dump_log_write_threshold for mnesia (increasing from the default of 100).