Reputation: 451
I am trying to bring up the rabbitmq ui by pulling the image and then running it using docker
docker run --name rabbit-p -p 15672:15672 -p 5672:5672 rabbitmq:latest
I even tried using docker compose. Below is my docker-compose.yaml file
version: '3'
services:
messaging:
image: "messaging-producer"
ports:
- "7878:9876"
rabbitmq:
image: "rabbitmq:latest"
ports:
- "15762:15762"
- "5672:5672"
In both cases, it shows Server startup complete
but when I try to hit
http://localhost:15672/
it says This page isn’t working
When I ran the command for the first time it worked perfectly fine but after that it has stopped working.
Following is the log-
Starting RabbitMQ 3.7.16 on Erlang 22.0.7
Copyright (C) 2007-2019 Pivotal Software, Inc.
Licensed under the MPL. See https://www.rabbitmq.com/
## ##
## ## RabbitMQ 3.7.16. Copyright (C) 2007-2019 Pivotal Software, Inc.
########## Licensed under the MPL. See https://www.rabbitmq.com/
###### ##
########## Logs: <stdout>
Starting broker...
2019-07-23 05:34:00.741 [info] <0.218.0>
node : rabbit@a9bf56e20b16
home dir : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/rabbitmq.conf
cookie hash : Z1whNqA2n91M8s2sMDqaOA==
log(s) : <stdout>
database dir : /var/lib/rabbitmq/mnesia/rabbit@a9bf56e20b16
2019-07-23 05:34:02.237 [info] <0.218.0> Running boot step pre_boot defined by app rabbit
2019-07-23 05:34:02.237 [info] <0.218.0> Running boot step rabbit_core_metrics defined by app rabbit
2019-07-23 05:34:02.238 [info] <0.218.0> Running boot step rabbit_alarm defined by app rabbit
2019-07-23 05:34:02.243 [info] <0.226.0> Memory high watermark set to 792 MiB (830613094 bytes) of 1980 MiB (2076532736 bytes) total
2019-07-23 05:34:02.247 [info] <0.228.0> Enabling free disk space monitoring
2019-07-23 05:34:02.247 [info] <0.228.0> Disk free limit set to 50MB
2019-07-23 05:34:02.251 [info] <0.218.0> Running boot step code_server_cache defined by app rabbit
2019-07-23 05:34:02.251 [info] <0.218.0> Running boot step file_handle_cache defined by app rabbit
2019-07-23 05:34:02.251 [info] <0.231.0> Limiting to approx 1048476 file handles (943626 sockets)
2019-07-23 05:34:02.251 [info] <0.232.0> FHC read buffering: OFF
2019-07-23 05:34:02.251 [info] <0.232.0> FHC write buffering: ON
2019-07-23 05:34:02.252 [info] <0.218.0> Running boot step worker_pool defined by app rabbit
2019-07-23 05:34:02.253 [info] <0.219.0> Will use 2 processes for default worker pool
2019-07-23 05:34:02.253 [info] <0.219.0> Starting worker pool 'worker_pool' with 2 processes in it
2019-07-23 05:34:02.253 [info] <0.218.0> Running boot step database defined by app rabbit
2019-07-23 05:34:02.254 [info] <0.218.0> Node database directory at /var/lib/rabbitmq/mnesia/rabbit@a9bf56e20b16 is empty. Assuming we need to join an existing cluster or initialise from scratch...
2019-07-23 05:34:02.254 [info] <0.218.0> Configured peer discovery backend: rabbit_peer_discovery_classic_config
2019-07-23 05:34:02.254 [info] <0.218.0> Will try to lock with peer discovery backend rabbit_peer_discovery_classic_config
2019-07-23 05:34:02.254 [info] <0.218.0> Peer discovery backend does not support locking, falling back to randomized delay
2019-07-23 05:34:02.254 [info] <0.218.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping randomized startup delay.
2019-07-23 05:34:02.254 [info] <0.218.0> All discovered existing cluster peers:
2019-07-23 05:34:02.254 [info] <0.218.0> Discovered no peer nodes to cluster with
2019-07-23 05:34:02.256 [info] <0.43.0> Application mnesia exited with reason: stopped
2019-07-23 05:34:02.385 [info] <0.218.0> Waiting for Mnesia tables for 30000 ms, 9 retries left
2019-07-23 05:34:02.412 [info] <0.218.0> Waiting for Mnesia tables for 30000 ms, 9 retries left
2019-07-23 05:34:02.445 [info] <0.218.0> Waiting for Mnesia tables for 30000 ms, 9 retries left
2019-07-23 05:34:02.445 [info] <0.218.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping registration.
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step database_sync defined by app rabbit
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step codec_correctness_check defined by app rabbit
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step external_infrastructure defined by app rabbit
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step rabbit_registry defined by app rabbit
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step rabbit_auth_mechanism_cr_demo defined by app rabbit
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step rabbit_queue_location_random defined by app rabbit
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step rabbit_event defined by app rabbit
2019-07-23 05:34:02.445 [info] <0.218.0> Running boot step rabbit_auth_mechanism_amqplain defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_auth_mechanism_plain defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_exchange_type_direct defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_exchange_type_fanout defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_exchange_type_headers defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_exchange_type_topic defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_mirror_queue_mode_all defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_mirror_queue_mode_exactly defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_mirror_queue_mode_nodes defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Running boot step rabbit_priority_queue defined by app rabbit
2019-07-23 05:34:02.446 [info] <0.218.0> Priority queues enabled, real BQ is rabbit_variable_queue
2019-07-23 05:34:02.447 [info] <0.218.0> Running boot step rabbit_queue_location_client_local defined by app rabbit
2019-07-23 05:34:02.447 [info] <0.218.0> Running boot step rabbit_queue_location_min_masters defined by app rabbit
2019-07-23 05:34:02.447 [info] <0.218.0> Running boot step kernel_ready defined by app rabbit
2019-07-23 05:34:02.447 [info] <0.218.0> Running boot step rabbit_sysmon_minder defined by app rabbit
2019-07-23 05:34:02.447 [info] <0.218.0> Running boot step rabbit_epmd_monitor defined by app rabbit
2019-07-23 05:34:02.452 [info] <0.218.0> Running boot step guid_generator defined by app rabbit
2019-07-23 05:34:02.456 [info] <0.218.0> Running boot step rabbit_node_monitor defined by app rabbit
2019-07-23 05:34:02.456 [info] <0.402.0> Starting rabbit_node_monitor
2019-07-23 05:34:02.457 [info] <0.218.0> Running boot step delegate_sup defined by app rabbit
2019-07-23 05:34:02.457 [info] <0.218.0> Running boot step rabbit_memory_monitor defined by app rabbit
2019-07-23 05:34:02.457 [info] <0.218.0> Running boot step core_initialized defined by app rabbit
2019-07-23 05:34:02.457 [info] <0.218.0> Running boot step upgrade_queues defined by app rabbit
2019-07-23 05:34:02.482 [info] <0.218.0> message_store upgrades: 1 to apply
2019-07-23 05:34:02.483 [info] <0.218.0> message_store upgrades: Applying rabbit_variable_queue:move_messages_to_vhost_store
2019-07-23 05:34:02.483 [info] <0.218.0> message_store upgrades: No durable queues found. Skipping message store migration
2019-07-23 05:34:02.483 [info] <0.218.0> message_store upgrades: Removing the old message store data
2019-07-23 05:34:02.484 [info] <0.218.0> message_store upgrades: All upgrades applied successfully
2019-07-23 05:34:02.514 [info] <0.218.0> Running boot step rabbit_connection_tracking defined by app rabbit
2019-07-23 05:34:02.514 [info] <0.218.0> Running boot step rabbit_connection_tracking_handler defined by app rabbit
2019-07-23 05:34:02.514 [info] <0.218.0> Running boot step rabbit_exchange_parameters defined by app rabbit
2019-07-23 05:34:02.515 [info] <0.218.0> Running boot step rabbit_mirror_queue_misc defined by app rabbit
2019-07-23 05:34:02.517 [info] <0.218.0> Running boot step rabbit_policies defined by app rabbit
2019-07-23 05:34:02.518 [info] <0.218.0> Running boot step rabbit_policy defined by app rabbit
2019-07-23 05:34:02.518 [info] <0.218.0> Running boot step rabbit_queue_location_validator defined by app rabbit
2019-07-23 05:34:02.518 [info] <0.218.0> Running boot step rabbit_vhost_limit defined by app rabbit
2019-07-23 05:34:02.518 [info] <0.218.0> Running boot step rabbit_mgmt_reset_handler defined by app rabbitmq_management
2019-07-23 05:34:02.518 [info] <0.218.0> Running boot step rabbit_mgmt_db_handler defined by app rabbitmq_management_agent
2019-07-23 05:34:02.518 [info] <0.218.0> Management plugin: using rates mode 'basic'
2019-07-23 05:34:02.519 [info] <0.218.0> Running boot step recovery defined by app rabbit
2019-07-23 05:34:02.520 [info] <0.218.0> Running boot step load_definitions defined by app rabbitmq_management
2019-07-23 05:34:02.520 [info] <0.218.0> Running boot step empty_db_check defined by app rabbit
2019-07-23 05:34:02.520 [info] <0.218.0> Adding vhost '/'
2019-07-23 05:34:02.558 [info] <0.443.0> Making sure data directory '/var/lib/rabbitmq/mnesia/rabbit@a9bf56e20b16/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L' for vhost '/' exists
2019-07-23 05:34:02.564 [info] <0.443.0> Starting message stores for vhost '/'
2019-07-23 05:34:02.565 [info] <0.447.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_transient": using rabbit_msg_store_ets_index to provide index
2019-07-23 05:34:02.566 [info] <0.443.0> Started message store of type transient for vhost '/'
2019-07-23 05:34:02.566 [info] <0.450.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent": using rabbit_msg_store_ets_index to provide index
2019-07-23 05:34:02.567 [warning] <0.450.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent": rebuilding indices from scratch
2019-07-23 05:34:02.568 [info] <0.443.0> Started message store of type persistent for vhost '/'
2019-07-23 05:34:02.570 [info] <0.218.0> Creating user 'guest'
2019-07-23 05:34:02.576 [info] <0.218.0> Setting user tags for user 'guest' to [administrator]
2019-07-23 05:34:02.581 [info] <0.218.0> Setting permissions for 'guest' in '/' to '.*', '.*', '.*'
2019-07-23 05:34:02.586 [info] <0.218.0> Running boot step rabbit_looking_glass defined by app rabbit
2019-07-23 05:34:02.586 [info] <0.218.0> Running boot step rabbit_core_metrics_gc defined by app rabbit
2019-07-23 05:34:02.586 [info] <0.218.0> Running boot step background_gc defined by app rabbit
2019-07-23 05:34:02.586 [info] <0.218.0> Running boot step connection_tracking defined by app rabbit
2019-07-23 05:34:02.592 [info] <0.218.0> Setting up a table for connection tracking on this node: tracked_connection_on_node_rabbit@a9bf56e20b16
2019-07-23 05:34:02.598 [info] <0.218.0> Setting up a table for per-vhost connection counting on this node: tracked_connection_per_vhost_on_node_rabbit@a9bf56e20b16
2019-07-23 05:34:02.598 [info] <0.218.0> Running boot step routing_ready defined by app rabbit
2019-07-23 05:34:02.598 [info] <0.218.0> Running boot step pre_flight defined by app rabbit
2019-07-23 05:34:02.599 [info] <0.218.0> Running boot step notify_cluster defined by app rabbit
2019-07-23 05:34:02.599 [info] <0.218.0> Running boot step networking defined by app rabbit
2019-07-23 05:34:02.602 [warning] <0.482.0> Setting Ranch options together with socket options is deprecated. Please use the new map syntax that allows specifying socket options separately from other options.
2019-07-23 05:34:02.602 [info] <0.496.0> started TCP listener on [::]:5672
2019-07-23 05:34:02.603 [info] <0.218.0> Running boot step direct_client defined by app rabbit
2019-07-23 05:34:02.634 [info] <0.556.0> Management plugin: HTTP (non-TLS) listener started on port 15672
2019-07-23 05:34:02.634 [info] <0.662.0> Statistics database started.
2019-07-23 05:34:02.634 [info] <0.661.0> Starting worker pool 'management_worker_pool' with 3 processes in it
completed with 3 plugins.
2019-07-23 05:34:02.764 [info] <0.8.0> Server startup complete; 3 plugins started.
* rabbitmq_management
* rabbitmq_web_dispatch
* rabbitmq_management_agent
Stopping and halting node rabbit@a9bf56e20b16 ...
2019-07-23 05:34:31.944 [info] <0.677.0> RabbitMQ is asked to stop...
2019-07-23 05:34:31.981 [info] <0.677.0> Stopping RabbitMQ applications and their dependencies in the following order:
rabbitmq_management
amqp_client
rabbitmq_web_dispatch
cowboy
cowlib
rabbitmq_management_agent
rabbit
mnesia
rabbit_common
sysmon_handler
os_mon
2019-07-23 05:34:31.981 [info] <0.677.0> Stopping application 'rabbitmq_management'
2019-07-23 05:34:31.983 [warning] <0.552.0> RabbitMQ HTTP listener registry could not find context rabbitmq_management_tls
2019-07-23 05:34:31.984 [info] <0.43.0> Application rabbitmq_management exited with reason: stopped
2019-07-23 05:34:31.984 [info] <0.677.0> Stopping application 'amqp_client'
2019-07-23 05:34:31.986 [info] <0.43.0> Application amqp_client exited with reason: stopped
2019-07-23 05:34:31.986 [info] <0.677.0> Stopping application 'rabbitmq_web_dispatch'
2019-07-23 05:34:31.987 [info] <0.43.0> Application rabbitmq_web_dispatch exited with reason: stopped
2019-07-23 05:34:31.987 [info] <0.677.0> Stopping application 'cowboy'
2019-07-23 05:34:31.989 [info] <0.43.0> Application cowboy exited with reason: stopped
2019-07-23 05:34:31.989 [info] <0.677.0> Stopping application 'cowlib'
2019-07-23 05:34:31.989 [info] <0.43.0> Application cowlib exited with reason: stopped
2019-07-23 05:34:31.989 [info] <0.677.0> Stopping application 'rabbitmq_management_agent'
2019-07-23 05:34:31.991 [info] <0.43.0> Application rabbitmq_management_agent exited with reason: stopped
2019-07-23 05:34:31.991 [info] <0.677.0> Stopping application 'rabbit'
2019-07-23 05:34:31.991 [info] <0.218.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping unregistration.
2019-07-23 05:34:31.992 [info] <0.496.0> stopped TCP listener on [::]:5672
2019-07-23 05:34:31.993 [info] <0.423.0> Closing all connections in vhost '/' on node 'rabbit@a9bf56e20b16' because the vhost is stopping
2019-07-23 05:34:31.993 [info] <0.450.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@a9bf56e20b16/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent'
2019-07-23 05:34:32.001 [info] <0.450.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@a9bf56e20b16/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent' is stopped
2019-07-23 05:34:32.001 [info] <0.447.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@a9bf56e20b16/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient'
2019-07-23 05:34:32.006 [info] <0.447.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@a9bf56e20b16/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient' is stopped
2019-07-23 05:34:32.009 [info] <0.677.0> Stopping application 'mnesia'
2019-07-23 05:34:32.009 [info] <0.43.0> Application rabbit exited with reason: stopped
2019-07-23 05:34:32.012 [info] <0.677.0> Stopping application 'rabbit_common'
2019-07-23 05:34:32.012 [info] <0.43.0> Application mnesia exited with reason: stopped
2019-07-23 05:34:32.012 [info] <0.677.0> Stopping application 'sysmon_handler'
2019-07-23 05:34:32.012 [info] <0.43.0> Application rabbit_common exited with reason: stopped
2019-07-23 05:34:32.014 [info] <0.43.0> Application sysmon_handler exited with reason: stopped
2019-07-23 05:34:32.014 [info] <0.677.0> Stopping application 'os_mon'
2019-07-23 05:34:32.015 [info] <0.677.0> Successfully stopped RabbitMQ and its dependencies
2019-07-23 05:34:32.015 [info] <0.43.0> Application os_mon exited with reason: stopped
Gracefully halting Erlang VM
2019-07-23 05:34:32.016 [info] <0.677.0> Halting Erlang VM with the following applications:
ranch
ssl
public_key
asn1
crypto
observer_cli
recon
inets
jsx
xmerl
lager
goldrush
compiler
syntax_tools
sasl
stdlib
kernel```
Any help's appreciated.
Upvotes: 1
Views: 12217
Reputation: 151
This work for me:
docker-compose.yml
file
version: "3.8"
services:
rabbitmq:
container_name: rabbitmq
image: "rabbitmq:3.8.9-management"
volumes:
- ./.docker/rabbitmq/etc/:/etc/rabbitmq/
- ./.docker/rabbitmq/data/:/var/lib/rabbitmq/
- ./.docker/rabbitmq/logs/:/var/log/rabbitmq/
environment:
RABBITMQ_ERLANG_COOKIE: secret-cookie
RABBITMQ_DEFAULT_USER: rabbituser
RABBITMQ_DEFAULT_PASS: password
RABBITMQ_DEFAULT_VHOST: /rabbit-vh
ports:
- 5672:5672
- 15672:15672
Access the docker container:
docker exec -it rabbitmq /bin/bash
# then enable the management plugin
# https://www.rabbitmq.com/management.html#getting-started
rabbitmq-plugins enable rabbitmq_management
Enabling plugins on node rabbit@592e772911d9:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@592e772911d9...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.
After all, I can access http://localhost:15672/
normally.
Upvotes: 5
Reputation: 10717
From your post I understand you want to access the management console of RabbitMQ. If that is indeed the case you are using the wrong image. The correct image is rabbitmq:management
. Also the internal port is 15672 and not 15762.
Here is a correct version to test the management console:
version: '3'
services:
rabbitmq:
image: "rabbitmq:management"
ports:
- "15672:15672"
- "5672:5672"
Then you can navigate to http://localhost:15672
Upvotes: 3