Closed LHCGreg closed 5 years ago
Please provide a way to reproduce when making such claims.
Both are supported but management.tcp.*
and management.ssl.*
are the more consistent, easier to remember way available as of 3.7.9. Legacy options support was retained for backwards compatibility.
management.tcp.port = 15672
is effective and can be verified using rabbitmq-diagnostics environment
and rabbitmq-diagnostics listeners
:
Interface: [::], port: 15678, protocol: http, purpose: HTTP API
My only guess is that you are not actually running 3.7.17 but rather something before 3.7.9.
The output of rabbitmqctl status
inside the container is:
Status of node rabbit@rabbitmq-dev-0.rabbitmq-dev-discovery-service.rabbitmq-dev.svc.cluster.local ...
[{pid,499},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","3.7.17"},
{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.7.17"},
{cowboy,"Small, fast, modern HTTP server.","2.6.1"},
{cowlib,"Support library for manipulating Web protocols.","2.7.0"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.7.17"},
{amqp_client,"RabbitMQ AMQP Client","3.7.17"},
{rabbitmq_peer_discovery_k8s,
"Kubernetes-based RabbitMQ peer discovery backend","3.7.17"},
{rabbitmq_peer_discovery_common,
"Modules shared by various peer discovery backends","3.7.17"},
{rabbit,"RabbitMQ","3.7.17"},
{rabbit_common,
"Modules shared by rabbitmq-server and rabbitmq-erlang-client",
"3.7.17"},
{ranch,"Socket acceptor pool for TCP protocols.","1.7.1"},
{ssl,"Erlang/OTP SSL application","9.3.5"},
{public_key,"Public key infrastructure","1.6.7"},
{asn1,"The Erlang ASN1 compiler version 5.0.9","5.0.9"},
{mnesia,"MNESIA CXC 138 12","4.16"},
{stdout_formatter,
"Tools to format paragraphs, lists and tables as plain text",
"0.2.2"},
{jsx,"a streaming, evented json parsing toolkit","2.9.0"},
{observer_cli,"Visualize Erlang Nodes On The Command Line","1.5.0"},
{xmerl,"XML parser","1.3.21"},
{crypto,"CRYPTO","4.5.1"},
{inets,"INETS CXC 138 49","7.0.9"},
{sysmon_handler,"Rate-limiting system_monitor event handler","1.1.0"},
{os_mon,"CPO CXC 138 46","2.5"},
{recon,"Diagnostic tools for production use","2.5.0"},
{lager,"Erlang logging framework","3.6.10"},
{goldrush,"Erlang event stream processor","0.1.9"},
{compiler,"ERTS CXC 138 10","7.4.4"},
{syntax_tools,"Syntax tools","2.2"},
{sasl,"SASL CXC 138 11","3.4"},
{stdlib,"ERTS CXC 138 10","3.9.2"},
{kernel,"ERTS CXC 138 10","6.4.1"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:64]\n"},
{memory,
[{connection_readers,118584},
{connection_writers,59732},
{connection_channels,318544},
{connection_other,498628},
{queue_procs,708284},
{queue_slave_procs,0},
{plugins,2832248},
{other_proc,23318528},
{metrics,250764},
{mgmt_db,1052984},
{mnesia,121952},
{other_ets,2939952},
{binary,2809464},
{msg_index,34064},
{code,27517311},
{atom,1254625},
{other_system,12315776},
{allocated_unused,19101040},
{reserved_unallocated,0},
{strategy,rss},
{total,[{erlang,76151440},{rss,92155904},{allocated,95252480}]}]},
{alarms,[]},
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"},{http,15672,"::"}]},
{vm_memory_calculation_strategy,rss},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,858993459},
{disk_free_limit,50000000},
{disk_free,5107138560},
{file_descriptors,
[{total_limit,65436},
{total_used,10},
{sockets_limit,58890},
{sockets_used,4}]},
{processes,[{limit,1048576},{used,480}]},
{run_queue,1},
{uptime,8536},
{kernel,{net_ticktime,60}}]
So either it is 3.7.17, or it somehow thinks it is 3.7.17 but is not. I'll put together some steps for reproducing.
ok, so if I run the 3.7.17 docker image with no environment variables, with a one line config of management.tcp.request_timeout = 122000
, everything works fine. But (with the same config) if I set environment variables RABBITMQ_DEFAULT_USER and RABBITMQ_DEFAULT_PASS, the error happens.
To reproduce, save this as Dockerfile
:
FROM rabbitmq:3.7.17
RUN echo "management.tcp.request_timeout = 122000" > /etc/rabbitmq/rabbitmq.conf
RUN echo "[rabbitmq_management]." > /etc/rabbitmq/enabled_plugins
EXPOSE 15672
Then run
docker build -t lhcgreg_repro .
docker run -it -p 9999:15672 --env "RABBITMQ_DEFAULT_USER=rabbitmq" --env "RABBITMQ_DEFAULT_PASS=rabbitmq_password" lhcgreg_repro
It looks like RABBITMQ_DEFAULT_USER and RABBITMQ_DEFAULT_PASS are understood by the docker image rather than RabbitMQ itself. Maybe the docker image is doing something funky. I'll take this up with the maintainers of the docker image.
Available Environment Variables do not include RABBITMQ_DEFAULT_USER
. I highly recommend configuring as much as possible using RabbitMQ config file. The tendency to use environment variables heavily in the Docker image is a design choice I would likely never understand.
It looks like RABBITMQ_DEFAULT_USER and RABBITMQ_DEFAULT_PASS are understood by the docker image rather than RabbitMQ itself
Those values are probably used to create invalid configuration for RabbitMQ.
I'm running 3.7.17 using the rabbitmq:3.7.17 docker image.
I found that contrary to the documentation at https://www.rabbitmq.com/management.html,
management.tcp.request_timeout
,management.tcp.idle_timeout
, andmanagement.tcp.inactivity_timeout
have to bemanagement.listener.server.request_timeout
,management.listener.server.idle_timeout
, andmanagement.listener.server.inactivity_timeout
instead. If I try to usemanagement.tcp.request_timeout
, etc, Rabbit fails to start with the error:I only knew to use
management.listener.server.request_timeout
instead because of the helpful "did you mean ..." log message when there's a wrong config setting.