Windows 10 Enterprise.
Docker: 2.3.0.0
Engine: 19.03.8
Compose: 1.25.5
Docker-compose.yml:
rabbit:
container_name: 'rabbit'
build:
context: './'
dockerfile: './rabbitmq/Dockerfile'
restart: always
ports:
- '5672:5672'
- '61613:61613'
- '15674:15674'
- '15672:15672'
networks:
docker_network:
ipv4_address: 192.168.5.10
environment:
RABBITMQ_DEFAULT_USER: 'root'
RABBITMQ_DEFAULT_PASS: 'root'
Dockerfile:
FROM rabbitmq:3.8
RUN rabbitmq-plugins enable --offline \
rabbitmq_mqtt \
rabbitmq_federation_management \
rabbitmq_federation \
rabbitmq_management \
rabbitmq_web_stomp \
rabbitmq_stomp
EXPOSE 5672 15672 61613 15674
The build is successful:
$ docker-compose up -d
Creating network "docker_docker_network" with the default driver
Building rabbit
Step 1/3 : FROM rabbitmq:3.8
3.8: Pulling from library/rabbitmq
Digest: sha256:daccf673fe10dec88315a7c5d7fc47d0185f0568c5e52b8f282a28a8e16435da
Status: Downloaded newer image for rabbitmq:3.8
---> db1d293f9183
Step 2/3 : RUN rabbitmq-plugins enable --offline rabbitmq_mqtt rabbitmq_federation_management rabbitmq_federation rabbitmq_management rabbitmq_web_stomp rabbitmq_stomp
---> Running in 68ce7bec8cf8
Enabling plugins on node rabbit@68ce7bec8cf8:
rabbitmq_mqtt
rabbitmq_federation_management
rabbitmq_federation
rabbitmq_management
rabbitmq_web_stomp
rabbitmq_stomp
The following plugins have been configured:
rabbitmq_federation
rabbitmq_federation_management
rabbitmq_management
rabbitmq_management_agent
rabbitmq_mqtt
rabbitmq_prometheus
rabbitmq_stomp
rabbitmq_web_dispatch
rabbitmq_web_stomp
Applying plugin configuration to rabbit@68ce7bec8cf8...
The following plugins have been enabled:
rabbitmq_federation
rabbitmq_federation_management
rabbitmq_management
rabbitmq_mqtt
rabbitmq_stomp
rabbitmq_web_stomp
set 9 plugins.
Offline change; changes will take effect at broker restart.
Removing intermediate container 68ce7bec8cf8
---> 8816eb1ffddd
Step 3/3 : EXPOSE 5672 15672 61613 15674
---> Running in 158db693950e
Removing intermediate container 158db693950e
---> 6a922624e115
Successfully built 6a922624e115
Successfully tagged docker_rabbit:latest
Image for service rabbit was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating rabbit ... done
Everything looks promising. I can receive messages from Rabbitmq and send messages to Rabbitmq. But when I enter HTTP Management errors are thrown. On the main screen, I can see strange "Overview: Management only mode". Correctly working Management plugin should show something like "Overview" only, like this: https://docs.pivotal.io/rabbitmq-cf/1-18/images/dashboard.jpeg
For me this looks like this:

When I want to do anything I always get an error. This error occurs when I want for example view queue stats, view channels list, view exchange stats (for example amq.topic).

Errors:
2020-08-25 11:47:52.114 [error] <0.681.0> ** Generic server <0.681.0> terminating
** Last message in was {submit,#Fun,<0.1083.0>,reuse}
** When Server state == {from,<0.1083.0>,#Ref<0.1016829863.3774611457.11965>}
** Reason for termination ==
** {function_clause,[{rabbit_mgmt_db,'-delegate_invoke/1-lc$^0/1-0-',[{error,{no_such_group,management_db}}],[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,delegate_invoke,1,[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,get_data_from_nodes,1,[{file,"src/rabbit_mgmt_db.erl"},{line,666}]},{rabbit_mgmt_db,detail_exchange_stats,3,[{file,"src/rabbit_mgmt_db.erl"},{line,543}]},{worker_pool_worker,handle_call,3,[{file,"src/worker_pool_worker.erl"},{line,96}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1046}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}
2020-08-25 11:47:52.115 [info] <0.681.0> [{initial_call,{worker_pool_worker,init,['Argument__1']}},{pid,<0.681.0>},{registered_name,[]},{error_info,{exit,{function_clause,[{rabbit_mgmt_db,'-delegate_invoke/1-lc$^0/1-0-',[{error,{no_such_group,management_db}}],[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,delegate_invoke,1,[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,get_data_from_nodes,1,[{file,"src/rabbit_mgmt_db.erl"},{line,666}]},{rabbit_mgmt_db,detail_exchange_stats,3,[{file,"src/rabbit_mgmt_db.erl"},{line,543}]},{worker_pool_worker,handle_call,3,[{file,"src/worker_pool_worker.erl"},{line,96}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1046}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]},[{gen_server2,terminate,3,[{file,"src/gen_server2.erl"},{line,1183}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}},{ancestors,[management_worker_pool_sup,rabbit_mgmt_sup,rabbit_mgmt_sup_sup,<0.572.0>]},{message_queue_len,0},{messages,[]},{links,[<0.679.0>]},{dictionary,[{worker_pool_worker,true},{worker_pool_name,management_worker_pool},{rand_seed,{#{jump => #Fun,max => 288230376151711743,next => #Fun,type => exsplus},[244703517654542884|259729165865445747]}}]},{trap_exit,false},{status,running},{heap_size,1598},{stack_size,28},{reductions,810}], []
2020-08-25 11:47:52.115 [error] <0.681.0> CRASH REPORT Process <0.681.0> with 0 neighbours exited with reason: no function clause matching rabbit_mgmt_db:'-delegate_invoke/1-lc$^0/1-0-'({error,{no_such_group,management_db}}) line 732 in gen_server2:terminate/3 line 1183
2020-08-25 11:47:52.116 [info] <0.1083.0> [{initial_call,{cowboy_stream_h,request_process,['Argument__1','Argument__2','Argument__3']}},{pid,<0.1083.0>},{registered_name,[]},{error_info,{exit,{{{function_clause,[{rabbit_mgmt_db,'-delegate_invoke/1-lc$^0/1-0-',[{error,{no_such_group,management_db}}],[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,delegate_invoke,1,[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,get_data_from_nodes,1,[{file,"src/rabbit_mgmt_db.erl"},{line,666}]},{rabbit_mgmt_db,detail_exchange_stats,3,[{file,"src/rabbit_mgmt_db.erl"},{line,543}]},{worker_pool_worker,handle_call,3,[{file,"src/worker_pool_worker.erl"},{line,96}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1046}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]},{gen_server2,call,[<0.681.0>,{submit,#Fun,<0.1083.0>,reuse},infinity]}},[]},[]}},{ancestors,[<0.892.0>,<0.574.0>,<0.573.0>,rabbit_web_dispatch_sup,<0.562.0>]},{message_queue_len,0},{messages,[]},{links,[<0.892.0>]},{dictionary,[{{xtype_to_module,fanout},rabbit_exchange_type_fanout}]},{trap_exit,false},{status,running},{heap_size,4185},{stack_size,28},{reductions,2427}], []
2020-08-25 11:47:52.116 [error] <0.1083.0> CRASH REPORT Process <0.1083.0> with 0 neighbours exited with reason: {{{{function_clause,[{rabbit_mgmt_db,'-delegate_invoke/1-lc$^0/1-0-',[{error,{no_such_group,management_db}}],[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,delegate_invoke,1,[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,get_data_from_nodes,1,[{file,"src/rabbit_mgmt_db.erl"},{line,666}]},{rabbit_mgmt_db,detail_exchange_stats,3,[{file,"src/rabbit_mgmt_db.erl"},{line,543}]},{worker_pool_worker,handle_call,3,[{file,"src/worker_pool_worker.erl"},{line,96}]},{gen_server2,...},...]},...},...},...}
2020-08-25 11:47:52.116 [info] <0.679.0> supervisor: {local,management_worker_pool_sup}, errorContext: child_terminated, reason: {function_clause,[{rabbit_mgmt_db,'-delegate_invoke/1-lc$^0/1-0-',[{error,{no_such_group,management_db}}],[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,delegate_invoke,1,[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,get_data_from_nodes,1,[{file,"src/rabbit_mgmt_db.erl"},{line,666}]},{rabbit_mgmt_db,detail_exchange_stats,3,[{file,"src/rabbit_mgmt_db.erl"},{line,543}]},{worker_pool_worker,handle_call,3,[{file,"src/worker_pool_worker.erl"},{line,96}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1046}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]}, offender: [{pid,<0.681.0>},{id,1},{mfargs,{worker_pool_worker,start_link,[management_worker_pool]}},{restart_type,transient},{shutdown,4294967295},{child_type,worker}]
2020-08-25 11:47:52.116 [error] <0.679.0> Supervisor management_worker_pool_sup had child 1 started with worker_pool_worker:start_link(management_worker_pool) at <0.681.0> exit with reason no function clause matching rabbit_mgmt_db:'-delegate_invoke/1-lc$^0/1-0-'({error,{no_such_group,management_db}}) line 732 in context child_terminated
2020-08-25 11:47:52.116 [error] <0.892.0> Ranch listener rabbit_web_dispatch_sup_15672, connection process <0.892.0>, stream 55 had its request process <0.1083.0> exit with reason {{function_clause,[{rabbit_mgmt_db,'-delegate_invoke/1-lc$^0/1-0-',[{error,{no_such_group,management_db}}],[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,delegate_invoke,1,[{file,"src/rabbit_mgmt_db.erl"},{line,732}]},{rabbit_mgmt_db,get_data_from_nodes,1,[{file,"src/rabbit_mgmt_db.erl"},{line,666}]},{rabbit_mgmt_db,detail_exchange_stats,3,[{file,"src/rabbit_mgmt_db.erl"},{line,543}]},{worker_pool_worker,handle_call,3,[{file,"src/worker_pool_worker.erl"},{line,96}]},{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1046}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}]},{gen_server2,call,[<0.681.0>,{submit,#Fun,<0.1083.0>,reuse},infinity]}} and stacktrace []
Your Dockerfile is FROM rabbitmq:3.8, change that to rabbitmq:3.8-management
Yes, you're right. Thank you.
I thought code below is equivalent of rabbitmq:3.8-management, but I was wrong.
RUN rabbitmq-plugins enable --offline rabbitmq_management
The rabbitmq_management plugin uses the rabbitmqadmin binary. As such, it's not enough to enable the plugin.
The :management image takes care of extracting and installing this file.
Most helpful comment
Your Dockerfile is
FROM rabbitmq:3.8, change that torabbitmq:3.8-management