From 1081a8f0413162418d4bdf73664aeff9a4d46a68 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Mon, 22 May 2023 23:12:18 +0200 Subject: [PATCH 1/3] fix(windows): set EMQX_LOG_DIR env variable --- bin/emqx.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/emqx.cmd b/bin/emqx.cmd index ede51a56b..2871bcc20 100644 --- a/bin/emqx.cmd +++ b/bin/emqx.cmd @@ -46,6 +46,7 @@ @set "RUNNER_ROOT_DIR=%rel_root_dir%" :: hard code etc dir @set "EMQX_ETC_DIR=%rel_root_dir%\etc" +@set "EMQX_LOG_DIR=%rel_root_dir%\log" @set "etc_dir=%rel_root_dir%\etc" @set "lib_dir=%rel_root_dir%\lib" @set "emqx_conf=%etc_dir%\emqx.conf" From b5e1bc4cc892024f08f50824e2d10913c232dbda Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 23 May 2023 14:10:19 +0200 Subject: [PATCH 2/3] ci: check ping output in windows package start/stop test --- .github/workflows/build_packages.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_packages.yaml b/.github/workflows/build_packages.yaml index be6c73068..80a87662a 100644 --- a/.github/workflows/build_packages.yaml +++ b/.github/workflows/build_packages.yaml @@ -102,9 +102,16 @@ jobs: - name: run emqx timeout-minutes: 5 run: | + $ErrorActionPreference = "Stop" ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start - Start-Sleep -s 5 - echo "EMQX started" + Start-Sleep -s 10 + $pingOutput = ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx ping + if ($pingOutput = 'pong') { + echo "EMQX started OK" + } else { + echo "Failed to ping EMQX $pingOutput" + Exit 1 + } ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop echo "EMQX stopped" ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install From 5fe58c50511773f33a09fe19731e552434663b72 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 23 May 2023 14:13:18 +0200 Subject: [PATCH 3/3] docs: add changelog for 10785 --- changes/ce/fix-10785.en.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ce/fix-10785.en.md diff --git a/changes/ce/fix-10785.en.md b/changes/ce/fix-10785.en.md new file mode 100644 index 000000000..14075593f --- /dev/null +++ b/changes/ce/fix-10785.en.md @@ -0,0 +1,3 @@ +Ensure `EMQX_LOG_DIR` is set by Windows boot script. + +The environment variable `EMQX_LOG_DIR` was missing in v5.0.25, caused EMQX Windows package fail to boot unless set by sysadmin.