Commit Graph

267 Commits

Author SHA1 Message Date
JimMoen
72eb34658d
style: erlfmt all remaining escripts 2023-11-08 11:51:10 +08:00
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
ad09ca9d6d refactor(nodetool): only add libs when necessary 2023-10-18 14:08:35 +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
Zaiming (Stone) Shi
d3779a3219 fix(audit): make 'emqx eval' command auditable 2023-09-27 13:37:09 +02:00
Zaiming (Stone) Shi
a34ab19d93 fix(audit): make emqx eval command auditable 2023-09-22 12:05:45 +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
Serge Tupchii
9b3f88aeeb feat(nodetool): print shutdown status messages while EMQX is stopping 2023-09-12 19:55:16 +03:00
Serge Tupchii
9de9631d6b fix(nodetool): increase graceful stop timeout, handle and report {badrpc, timeout} error 2023-09-12 19:55:16 +03:00
Zaiming (Stone) Shi
d0ccd80850 fix(nodetool): ensure patches dir added for rpm/deb installs 2023-09-04 10:04:44 +02:00
Thales Macedo Garitezi
bc0b0fe9e8 fix(nodetool): add patches directory to head of path
This enables us to provide patches that affect `call_hocon` from `bin/emqx`.
2023-08-31 12:40:11 -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
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