Commit Graph

254 Commits

Author SHA1 Message Date
Ivan Dyachkov 3be1773e99
Merge pull request #11289 from id/0713-build-debian12-packages 2023-07-18 19:46:29 +02:00
Ivan Dyachkov 42627a3d42 fix: ps -ef to detect defunct pid 2023-07-18 17:12:20 +02:00
ieQu1 191916211b fix(emqx): Change incompatible DB backend message log to a warning 2023-07-18 12:05:07 +02:00
Zaiming (Stone) Shi b8b1779627 Merge remote-tracking branch 'origin/master' into 0503-no-telemetry-app-for-ee 2023-05-23 21:42:07 +02:00
Zaiming (Stone) Shi 1081a8f041 fix(windows): set EMQX_LOG_DIR env variable 2023-05-23 13:22:40 +02:00
Zaiming (Stone) Shi 3bb1f7ab2b Merge remote-tracking branch 'origin/master' into 0503-no-telemetry-app-for-ee 2023-05-23 13:03:55 +02:00
某文 7b000157d0 feat: refactor log configuration 2023-05-09 11:24:51 +08:00
Zaiming (Stone) Shi 7c1b453285 refactor: stop creating emqx-enterprise.conf 2023-05-08 15:16:27 +02:00
JimMoen 5a25d53fba
fix: avoid stray `\` warning for grep 3.8+
Only the first `-` in ERE need escaping to ensure it's not a command
option for `grep`.

The fix also tested on BSD grep 2.6 and works well.

More details:
https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html

> Regular expressions with stray backslashes now cause warnings, as
  their unspecified behavior can lead to unexpected results.
  For example, '\a' and 'a' are not always equivalent
  <https://bugs.gnu.org/39678>.
2023-05-06 12:42:53 +08:00
Zaiming (Stone) Shi d5f5f35787 Merge remote-tracking branch 'origin/release-50' into 0502-merge-release-50-back-to-master 2023-05-02 18:08:04 +02:00
Zaiming (Stone) Shi 7a549d71ef chore: make it easier for IDE to connect
1. By default, start the node with regular EPMD, not ekka_epmd
2. Use user's Erlang cookie
3. Add a -r option to attach remsh
2023-05-02 10:24:16 +02:00
Zaiming (Stone) Shi 4d705817d8 refactor(log): move default values to schema 2023-04-29 22:10:19 +02:00
Zaiming (Stone) Shi 41f13330ba refactor: export EMQX_LOG_DIR 2023-04-29 22:10:19 +02:00
JianBo He 069afd042a chore: update changes 2023-04-17 13:56:50 +02:00
JianBo He f2fae16d3b fix(gw): load emqx applications before hocon configs checking 2023-04-17 13:56:39 +02:00
JianBo He 73c15d9668 chore: update changes 2023-04-15 21:47:38 +08:00
JianBo He 3a511c6229 fix(gw): load emqx applications before hocon configs checking 2023-04-15 19:41:07 +08:00
Paulo Zulato 3765f5f120
Merge pull request #10297 from paulozulato/fix-eval
fix: keep eval command backward compatible with v4
2023-03-31 11:29:57 -03:00
Paulo Zulato 2dd10df417
fix: remove redundant text for eval command
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2023-03-31 09:24:38 -03:00
Paulo Zulato 161435d29d fix: keep eval command backward compatible with v4
Keeps "eval" command evaluating only Erlang expressions, even on Elixir
node.

Fixes: https://emqx.atlassian.net/browse/EMQX-8947
2023-03-30 14:20:49 -03:00
Zaiming (Stone) Shi 36043dd651
Merge pull request #10286 from zmstone/0330-exit-with-non-zero-code-if-conf-init-failed
0330 exit with non zero code if conf init failed
2023-03-30 17:41:14 +02:00
Zaiming (Stone) Shi 28021c466a chore(bin/emqx): do not use -r option in rm command when deleting .siz 2023-03-30 12:31:34 +02:00
Ivan Dyachkov 6b8652108f chore: show ulimit warning on start only 2023-03-30 11:12:58 +02:00
Paulo Zulato d9fc8fbc87 feat: add new command for Elixir expression evaluation
Currently, Elixir expressions are evaluated on an EMQX node using the
'eval' command, which works for both Erlang and Elixir expressions.
This commit adds the new command 'eval-ex' exclusively for evaluating
Elixir expressions on Elixir nodes, similar to 'eval-erl' for Erlang.
2023-03-28 18:45:48 -03:00
Ivan Dyachkov aac41ba128 fix: emqx ctl crashed when $HOME/.erlang.cookie is not available
fixes #10142
2023-03-15 13:35:46 +01:00
Zaiming (Stone) Shi 4eb9a69df0 feat(bin/emqx): diagnose boot failure
Prior to this change, when EMQX daemon mode failed to start
it's not quite easy for users to understand what went wrong.
All the know is the node did not start in time
and then instructed to boot the node in 'console' mode wishing
for some logs.
However, the node might actuay be running, causing 'console' mode
to fail with a different reason.

With this change, after a filure of daemon mode boot,
we issue a diagnosis.
1. if node can not be found from ps -ef, instruct the user
   to find information in erlang.log.N
2. if the node is found running, but not responding to pings
   instruct the user to check if the node name is
   resolvable and reachable
3. if the node is responding to pings but emqx app is not
   running, then it's likely a bug. so the user is advised
   to report a github issue.
2023-03-02 14:46:09 +01:00
Zaiming (Stone) Shi c4c0c9cc7e fix(bin/emqx): no need to ping node before attach 2023-03-02 14:32:10 +01:00
Zaiming (Stone) Shi f48d054986 fix(bin/emqx): ensure SSL_DIST_OPTFILE is set for non-boot command 2023-02-28 20:47:05 +01:00
Zaiming (Stone) Shi f6cb5b607c fix(bin/emqx): do not check cookie when it's a boot command 2023-02-28 20:16:32 +01:00
Zaiming (Stone) Shi a638cc1d74 docs: add change logs 2023-02-24 09:11:45 +01:00
Zaiming (Stone) Shi 8d480a1dc9 fix(bin/emqx): fail fast if cookie is obviously wrong 2023-02-22 13:57:55 +01:00
Zaiming (Stone) Shi 6b81d9965f fix(bin/emqx): allow starting two nodes from the same installation
If more than one node is boot from the same root directory
try to find the node by node name set in EMQX_NODE_NAME
or EMQX_NODE__NAME environment variable
2023-02-16 14:35:50 +01:00
Zaiming (Stone) Shi 12199e7987 refactor(bin/emqx): check if node is already running with ps command 2023-02-13 22:59:54 +01:00
Zaiming (Stone) Shi ab63954ce7 refactor: check if node is already started before default-cookie warning 2023-02-13 22:35:01 +01:00
Zaiming (Stone) Shi e0709f7eae fix(bin/emqx): ensure protable dynamic libs loaded before call_hocon 2023-02-13 15:46:23 +01:00
Zaiming (Stone) Shi 936eab7fbe chore: refine error messages when node is not running 2023-02-13 15:06:32 +01:00
Zaiming (Stone) Shi be867b1303 refactor: read Erlang kernel app config 'net_ticktime' from ps -ef 2023-02-13 12:47:42 +01:00
Zaiming (Stone) Shi cc9ee34eff refactor: grep with --color=never 2023-02-13 12:17:25 +01:00
Zaiming (Stone) Shi d08eb01d90 refactor: read node name and cookie from ps -ef
instead of parsing the generated vm.args file,
because the file might have been deleted
2023-02-13 11:05:43 +01:00
Zaiming (Stone) Shi b6b9df06db fix(bin/emqx): drop remsh and escript from ps -ef outputs 2023-02-13 10:50:21 +01:00
Zaiming (Stone) Shi c6a78cbfda chore: refine a warning message about default erlang cookie 2023-02-04 07:56:29 +01:00
Zhongwen Deng f81a488010 chore: logwarn if dynlibs is missing 2023-02-02 15:17:51 +08:00
Zaiming (Stone) Shi e7b8df6ba9 chore(bin/emqx): hide upgrade/downgrade from usage info 2023-01-31 13:09:46 +01:00
Zaiming (Stone) Shi c228b84db6 fix(log): fail fast if emqx.conf is not found in EMQX_ETC_DIR
otherwise the call_hocon failure is not quite readable
2023-01-14 18:36:52 +01:00
Thales Macedo Garitezi a9d0143d5f chore(license): change `key` type to `binary()`
So that the `raw_default` field in the schema JSON renders properly.
2023-01-11 09:10:04 -03:00
Thales Macedo Garitezi 465e73cac0 feat: deny upgrades for now 2022-12-27 13:10:12 -03:00
Thales Macedo Garitezi 86a4010b8d refactor(review): use `lists:flatten/1` 2022-12-27 11:14:57 -03:00
Thales Macedo Garitezi 5428d46694 feat: log the upgrade script being used for visibility 2022-12-27 11:14:57 -03:00
Thales Macedo Garitezi 7c6bb63ce9 feat(upgrade): add forward version check for upgrade script
https://emqx.atlassian.net/browse/EMQX-6978

[Related EIP](c4864eeccb/active/0022-forward-check-install-upgrade-script.md)

Currently, when performing a hot upgrade, the scripts that are run are
those from the currently installed EMQX version. It has a validation
that prevents upgrade between different minor versions. If we want to
allow an upgrade from, say, 5.0.x to 5.1.y, then the scripts in
already released packages will deny such operation. Also, if an
upgrade installation script contains a bug in the current, it will
never be able to execute properly without manual patching.

By attempting to execute the scripts from the target version, we may
add fixes and new validations to new EMQX versions and have them
executed by older versions.
2022-12-23 17:50:33 -03:00
Ivan Dyachkov 4a9be95f6d chore: fix logging in bin/emqx on non-tty 2022-12-19 14:58:59 +01:00