From aac41ba1281a43bbbd29e7548d5c937268d44fb0 Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Wed, 15 Mar 2023 11:35:13 +0100 Subject: [PATCH 1/2] fix: emqx ctl crashed when $HOME/.erlang.cookie is not available fixes #10142 --- bin/emqx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/emqx b/bin/emqx index 14f94f359..741aa3718 100755 --- a/bin/emqx +++ b/bin/emqx @@ -441,9 +441,8 @@ call_nodetool() { # Control a node relx_nodetool() { command="$1"; shift - ERL_FLAGS="${ERL_FLAGS:-} $EPMD_ARGS" \ - call_nodetool "$NAME_TYPE" "$NAME" \ - -setcookie "$COOKIE" "$command" "$@" + ERL_FLAGS="${ERL_FLAGS:-} $EPMD_ARGS -setcookie $COOKIE" \ + call_nodetool "$NAME_TYPE" "$NAME" "$command" "$@" } call_hocon() { From d43ee0be60a23a1a3960a38aed220cc8dbea98d3 Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Wed, 15 Mar 2023 11:38:21 +0100 Subject: [PATCH 2/2] chore: add changelog --- changes/ce/fix-10144.en.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/ce/fix-10144.en.md diff --git a/changes/ce/fix-10144.en.md b/changes/ce/fix-10144.en.md new file mode 100644 index 000000000..d5a84b24c --- /dev/null +++ b/changes/ce/fix-10144.en.md @@ -0,0 +1 @@ +Add -setcookie emulator flag when invoking emqx ctl to prevent problems with emqx cli when home directory is read only. Fixes [#10142](https://github.com/emqx/emqx/issues/10142)