I've used docker to start my rabbitmqserver. How can I use rabbitmqctl to connect to the rabbitmqserver in the docker container?
Port 5672 has been exposed and map to the 5672 port of my host. But I still get the following error:
Status of node rabbit@m2 ...
Error: unable to connect to node rabbit@m2: nodedown
rabbitmqctl
uses Erlang Distributed Protocol (EDP) to communicate with RabbitMQ. Port 5672 provides AMQP protocol. You can investigate EDP port that your RabbitMQ instance uses:It means that RabbitMQ:
To make
rabbitmqctl
able to connect to RabbitMQ you also have to forward port 55950 and allow RabbitMQ instance connect to 127.0.0.1:4369. It is possible that RabbitMQ EDP port is dinamic, so to make it static you can try to useERL_EPMD_PORT
variable of Erlang environment variables or useinet_dist_listen_min
andinet_dist_listen_max
of Erlang Kernel configuration options and apply it with RabbitMQ environment variable -export RABBITMQ_CONFIG_FILE="/path/to/my_rabbitmq.conf
my_rabbitmq.conf
Or you can use RabbitMQ Management Plugin. It is more functional and simple to setup.