Commit Graph

188 Commits

Author SHA1 Message Date
Igor Urminček 3609b20fb2 fix(bin/eqmx): do not rely on existing user name
Container should be able to run as other user too. Use uid as fallback.
Prerequisite to be able to run as user specified during startup.
2023-10-21 21:19:57 +02:00
Zaiming (Stone) Shi 497e08448d feat(cluster): support ipv6 and tls on ipv6 for clustering
Made possible to configure inet6_tls for Erlang distribution
Also, added support to configure ipv6 listener for gen_rpc
2023-10-09 20:03:21 +02:00
Paulo Zulato 1b533794aa fix: handle case that zombie process terminated
When emqx is stopped, sometimes it found out that the process is at
zombie state and tries to get the parent PID but the process has already
finished in the meanwhile, printing an error message like this:

```
error: process ID list syntax error

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
WARNING: 281777 is marked <defunct>, parent:
ok
```
2023-09-17 21:53:37 -03:00
Serge Tupchii f790690d8b fix(bin/emqx): don't suppress `wait_for` command output, as it can print warning messages 2023-09-12 19:55:16 +03:00
Serge Tupchii 6dd9e54ab8 fix(bin/emqx): remove `ps` `-e` opt, as it lists all processes regardless of `-p <pid>` 2023-09-12 19:55:16 +03:00
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 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
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 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
Ivan Dyachkov e8073f9e7d chore: fix RUNNER_ROOT_DIR detection on MacOS 2022-12-19 13:07:18 +01:00
Zaiming (Stone) Shi 56066a03b5 Merge remote-tracking branch 'origin/release-50' into 1214-sync-master-upstreams 2022-12-14 20:04:20 +01:00
Zaiming (Stone) Shi 74ce4ec606 fix(bin/emqx): typo in bin/emqx usage info 2022-12-14 20:01:17 +01:00
Ivan Dyachkov ec826f03c9 chore: colorize warning and error logs 2022-12-07 14:42:09 +01:00