版本:4.4.1
OS:Ubuntu 18.04.5
现象:用supervisor启动emqx和服务,服务中用golang自带的os/exec包去执行emqx ping命令报错,但是直接启动服务就没问题。具体的报错信息如下:
escript: exception error: no match of right hand side value
{error,
{{shutdown,
{failed_to_start_child,auth,
{"No home for cookie file",
[{auth,init_no_setcookie,0,
[{file,"auth.erl"},{line,293}]},
{auth,init,1,[{file,"auth.erl"},{line,144}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,423}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,390}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,226}]}]}}},
{child,undefined,net_sup_dynamic,
{erl_distribution,start_link,
[['remsh_maint_emqx118969@127.0.0.1',longnames],
false,net_sup_dynamic]},
permanent,false,1000,supervisor,
[erl_distribution]}}}
in function nodetool__escript__1693__280646__434859__8:'-main/1-fun-3-'/1 (/opt/demo/deps/emqx/bin/nodetool, line 29)
in call from nodetool__escript__1693__280646__434859__8:do_with_ret/3 (/opt/demo/deps/emqx/bin/nodetool, line 145)
in call from nodetool__escript__1693__280646__434859__8:main/1 (/opt/demo/deps/emqx/bin/nodetool, line 26)
in call from escript:run/2 (escript.erl, line 750)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3