
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, as well as an archive of the Java librabbitmq client library.
rabbitmq-server-version.zip, where
version is the version of RabbitMQ Server you
want to install.
rabbitmq_server-version.
You can either extract this folder into
C:\Program Files\erl5.5.5\lib
(or if you use a different Erlang version, the
corresponding lib directory)
or extract it elsewhere and set the environment
variable ERLANG_HOME to point to your Erlang directory
(e.g. C:\Program Files\erl5.5.5).
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.5.5.
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_cluster.config. If
this file is present it is used by the server to
auto-configure a RabbitMQ cluster. See the clustering guide for
details.
Currently, it's sufficient to change directory to
rabbitmq_server-version\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 accepts the same environment
variables as rabbitmq-server.bat, except ERLANG_HOME.
Configure the following additional variables:
C:\Program Files\erl5.5.5\erts-5.5.5\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. Install the service by
executing rabbitmq-service.bat install
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
environmental variables are set correctly.
services.msc) reports a
"Started" status for the value of
RABBITMQ_SERVICENAME.
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/default/rabbitmq, setting
environment variables as described in the Generic Unix section below. You
can additionally set NODE_COUNT 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/default/rabbitmq.
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/default/rabbitmq, setting
environment variables as described in the Generic Unix section below. You
can additionally set NODE_COUNT 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 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/default/rabbitmq.
rabbitmq-server-generic-unix-version.tar.gz,
where version is the version of RabbitMQ Server
you want to install.
rabbitmq-server-generic-unix-version. You
can either extract the tarball into
/usr/lib/erlang/lib directory (or wherever
your Erlang installation places its application and
library directory) or extract it elsewhere and
set the environment variable ERLANG_HOME to point to
your Erlang directory
(e.g. /usr/lib/erlang).
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/default/rabbitmq_cluster.config. If
this file is present it is used by the server to
auto-configure a RabbitMQ cluster. 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.
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.