diff options
author | tomyouyou <yxszyn@163.com> | 2022-01-05 16:03:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 16:03:24 +0800 |
commit | fac249b755ea09ffb9ded707277c27bb6611a92d (patch) | |
tree | 1fe197b954004805d299e323c6efb233e7221c37 | |
parent | 4993fefa08fa0785385d23465d1f6de20bd4649c (diff) | |
download | rabbitmq-server-git-fac249b755ea09ffb9ded707277c27bb6611a92d.tar.gz |
The wrong distribution listener IP address is recorded when it is configured.
Add an item to the configuration file(/etc/rabbitmq/rabbitmq.config):
{kernel, [{inet_dist_use_interface, {8193,291,0,0,0,0,0,1}}]}
Use the netstat command to check the IP address of the distribution port(25672):
netstat -anp | grep 25672
tcp6 0 0 2001:123::1:25672 :::* LISTEN 2075/beam.smp
However, 'rabbitmqctl status' shows:
...
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
...
-rw-r--r-- | deps/rabbit/src/rabbit_networking.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/rabbit/src/rabbit_networking.erl b/deps/rabbit/src/rabbit_networking.erl index da4d542c29..ed64e95e7a 100644 --- a/deps/rabbit/src/rabbit_networking.erl +++ b/deps/rabbit/src/rabbit_networking.erl @@ -365,7 +365,12 @@ record_distribution_listener() -> {Name, Host} = rabbit_nodes:parts(node()), case erl_epmd:port_please(list_to_atom(Name), Host, infinity) of {port, Port, _Version} -> - tcp_listener_started(clustering, [], {0,0,0,0,0,0,0,0}, Port); + IPAddress = + case application:get_env(kernel, inet_dist_use_interface) of + {ok, IP} -> IP; + _ -> {0,0,0,0,0,0,0,0} + end, + tcp_listener_started(clustering, [], IPAddress, Port); noport -> throw({error, no_epmd_port}) end. |