feat: add listener bind ip config.
This commit is contained in:
parent
526d8a8200
commit
43b56e82bd
|
@ -301,6 +301,17 @@ node.crash_dump = {{ platform_log_dir }}/crash.dump
|
||||||
## vm.args: -kernel net_ticktime Number
|
## vm.args: -kernel net_ticktime Number
|
||||||
## node.dist_net_ticktime = 120
|
## node.dist_net_ticktime = 120
|
||||||
|
|
||||||
|
## If the host of an Erlang node has many network interfaces,
|
||||||
|
## this parameter specifies which one to listen on.
|
||||||
|
## For the type definition of ip_address(), see inet(3).
|
||||||
|
##
|
||||||
|
## See: http://www.erlang.org/doc/man/kernel_app.html
|
||||||
|
##
|
||||||
|
## Value: IP Address, [0-255].[0-255].[0-255].[0-255]
|
||||||
|
## Default: 0.0.0.0
|
||||||
|
## 0.0.0.0 means all network interfaces.
|
||||||
|
node.dist_use_interface = 0.0.0.0
|
||||||
|
|
||||||
## Sets the port range for the listener socket of a distributed Erlang node.
|
## Sets the port range for the listener socket of a distributed Erlang node.
|
||||||
## Note that if there are firewalls between clustered nodes, this port segment
|
## Note that if there are firewalls between clustered nodes, this port segment
|
||||||
## for nodes’ communication should be allowed.
|
## for nodes’ communication should be allowed.
|
||||||
|
@ -341,6 +352,8 @@ rpc.async_batch_size = 256
|
||||||
## Defaults to `stateless`.
|
## Defaults to `stateless`.
|
||||||
rpc.port_discovery = stateless
|
rpc.port_discovery = stateless
|
||||||
|
|
||||||
|
rpc.tcp_server_ip = 0.0.0.0
|
||||||
|
|
||||||
## TCP port number for RPC server to listen on.
|
## TCP port number for RPC server to listen on.
|
||||||
##
|
##
|
||||||
## Only takes effect when `rpc.port_discovery` = `manual`.
|
## Only takes effect when `rpc.port_discovery` = `manual`.
|
||||||
|
|
|
@ -344,6 +344,23 @@ end}.
|
||||||
hidden
|
hidden
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
%% @doc http://www.erlang.org/doc/man/kernel_app.html#net_ticktime
|
||||||
|
{mapping, "node.dist_use_interface", "kernel.inet_dist_use_interface", [
|
||||||
|
{commented, "0.0.0.0"},
|
||||||
|
{datatype, string}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
{translation, "kernel.inet_dist_use_interface",
|
||||||
|
fun(Conf) ->
|
||||||
|
Addr = cuttlefish:conf_get("node.dist_use_interface", Conf, "0.0.0.0"),
|
||||||
|
case inet:parse_address(Addr) of
|
||||||
|
{ok, IP} ->
|
||||||
|
IP;
|
||||||
|
_ ->
|
||||||
|
error({bad_node_dist_use_interface, Addr})
|
||||||
|
end
|
||||||
|
end}.
|
||||||
|
|
||||||
%% @doc http://www.erlang.org/doc/man/kernel_app.html
|
%% @doc http://www.erlang.org/doc/man/kernel_app.html
|
||||||
{mapping, "node.dist_listen_min", "kernel.inet_dist_listen_min", [
|
{mapping, "node.dist_listen_min", "kernel.inet_dist_listen_min", [
|
||||||
{commented, 6369},
|
{commented, 6369},
|
||||||
|
|
Loading…
Reference in New Issue