3

This is the configure file

cat config/sys.config
[
 {kernel, [
         {inet_dist_listen_min, 25672},
         {inet_dist_listen_max, 25680},
         {net_ticktime, 360},
         {net_tickintensity, 10}
        ]}
].

run: rebar3 shell --sname apple

The environment variables have taken effect:

(apple@centos7-mq1)1> application:get_all_env(kernel).
[{net_ticktime,360},
.....
 {shell_history_drop,[]},
 {net_tickintensity,10},
 {logger_sasl_compatible,false},
 {shell_docs_ansi,auto},
 {inet_dist_listen_min,25672},
 {logger_level,notice},
 {prevent_overlapping_partitions,true},
 {inet_dist_listen_max,25680}]

But the listening port is still random and does not start at 25672(inet_dist_listen_min):

TCP *:42151 (LISTEN)

If start directly with the erl command, It don't have this problem, such as:

erl -sname pear@centos7-mq1 -kernel inet_dist_listen_min 33672 inet_dist_listen_max 33680 net_ticktime 360 net_tickintensity 10   
孙海城
  • 389
  • 1
  • 7

0 Answers0