Bootstrap FreeKB - RabbitMQ - Restart RabbitMQ
RabbitMQ - Restart RabbitMQ

Updated:   |  RabbitMQ articles

If you are running RabbitMQ on a Linux system, if your system is using systemd, use the systemctl command to start and enable the RabbitMQ Server.

systemctl enable rabbitmq-server
systemctl start rabbitmq-server
systemctl status rabbitmq-server

 

If your system is using init, use the chkconfig and service commands to start and enable the RabbitMQ Server.

chkconfig rabbitmq-server on
service rabbitmq-server start
service rabbitmq-server status

 

If the start command hangs indefinitely, use the ps command to determine the PID associated with the RabbitMQ service, and then use the kill command to kill the PID.

If the RabbitMQ Server successfully starts, something like this will be displayed. 

-sh-4.2$ systemctl status rabbitmq-server
— rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-06-08 22:41:36 CDT; 1min 18s ago
 Main PID: 33180 (beam.smp)
   Status: "Initialized"
    Tasks: 110
   Memory: 304.4M
   CGroup: /system.slice/rabbitmq-server.service
           ””33180 /usr/lib64/erlang/erts-5.10.4/bin/beam.smp -W w -A 96 -P 1048576 -t 5000000 -stbt db -zdbbl 32000 -K true -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_ser...
           ””33363 /usr/lib64/erlang/erts-5.10.4/bin/epmd -daemon
           ””33541 inet_gethost 4
           ””33542 inet_gethost 4

 

Likewise, in the RabbitMQ admin console, the server should be "green".

 

And, /var/log/rabbitmq/rabbit@server1 should have the following.

=INFO REPORT==== 1-Oct-2020::01:58:17 ===
Server startup complete; 15 plugins started.

 

And the rabbitmqctl status command should return something like this.

Status of node rabbit@server001 ...
Runtime

OS PID: 59844
OS: Linux
Uptime (seconds): 6779
RabbitMQ version: 3.8.3
Node name: rabbit@server001
Erlang configuration: Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:96] [hipe]
Erlang processes: 15122 used, 1048576 limit
Scheduler run queue: 1
Cluster heartbeat timeout (net_ticktime): 60

 

The rabbitmqctl node_health_check command can also be used.

~]# rabbitmqctl node_health_check
Timeout: 70.0 seconds
Checking health of node rabbit@server1
Health check passed

 

If the RabbitMQ Server fails to start, something like this will be displayed. 

— rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-06-08 18:05:05 CDT; 2h 54min ago
  Process: 13390 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
 Main PID: 13390 (code=exited, status=1/FAILURE)
   Status: "Exited."

 

Likewise, in the RabbitMQ admin console, "node not running" should be displayed.

In this situation, refer to RabbitMQ - Resolve "Node not running".

 

Or "node statistics not available".

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter e2735b in the box below so that we can be sure you are a human.