I'm trying to set up a RabbitMQ docker instance running on a VDS.
Here is my docker-compose config.
version: "3"
services:
rabbitmq:
image: rabbitmq:3-management
ports:
- '15672:15672'
- '5672:5672'
environment:
- RABBITMQ_DEFAULT_USER=<some-user>
- RABBITMQ_DEFAULT_PASS=<some-pass>
hostname: 'rabbit-<hostname>'
I start this docker instance in detached mode with docker compose up -d
It starts, and it works well while I have at least one terminal connected to the server. It doesn't have to be the one I started RabbitMQ from, but basically any open connection.
As soon as I close all the terminals, it shuts down within one minute. This is what I see in the logs.
2023-06-05 09:13:44.954939+00:00 [info] <0.591.0> Server startup complete; 4 plugins started.
2023-06-05 09:13:44.954939+00:00 [info] <0.591.0> * rabbitmq_prometheus
2023-06-05 09:13:44.954939+00:00 [info] <0.591.0> * rabbitmq_management
2023-06-05 09:13:44.954939+00:00 [info] <0.591.0> * rabbitmq_web_dispatch
2023-06-05 09:13:44.954939+00:00 [info] <0.591.0> * rabbitmq_management_agent
2023-06-05 09:20:06.739687+00:00 [notice] <0.61.0> SIGTERM received - shutting down
2023-06-05 09:20:06.739687+00:00 [notice] <0.61.0>
2023-06-05 09:20:06.744979+00:00 [warning] <0.642.0> HTTP listener registry could not find context rabbitmq_prometheus_tls
2023-06-05 09:20:06.751396+00:00 [notice] <0.61.0> SIGTERM received - shutting down
2023-06-05 09:20:06.751396+00:00 [notice] <0.61.0>
2023-06-05 09:20:06.752950+00:00 [warning] <0.642.0> HTTP listener registry could not find context rabbitmq_management_tls
2023-06-05 09:20:06.766258+00:00 [info] <0.230.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping unregistration.
2023-06-05 09:20:06.766573+00:00 [info] <0.736.0> stopped TCP listener on [::]:5672
2023-06-05 09:20:06.767926+00:00 [info] <0.1569.0> Closing all connections in vhost '/' on node 'rabbit@rabbit-feedgerald' because the vhost is stopping
2023-06-05 09:20:06.768153+00:00 [info] <0.553.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@rabbit-feedgerald/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent'
2023-06-05 09:20:06.771638+00:00 [info] <0.553.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@rabbit-feedgerald/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent' is stopped
2023-06-05 09:20:06.772045+00:00 [info] <0.549.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@rabbit-feedgerald/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient'
2023-06-05 09:20:06.775578+00:00 [info] <0.549.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@rabbit-feedgerald/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient' is stopped
2023-06-05 09:20:06.777133+00:00 [info] <0.485.0> Management plugin: to stop collect_statistics.
It looks as if it had received a SIGTERM from some process. I have no idea what causes this.
This doesn't happen to other images that I tried to run.
If there are any other logs I could provide, that could help figure out what's going on, please tell.