Commit Graph

188 Commits

Author SHA1 Message Date
William Yang a6f14c255d feat: add emqx_cluster_rescue 2022-07-15 15:47:52 +02:00
Zhongwen Deng 0ee732c076 fix: typo error +ssl_dist_optfile to \-ssl_dist_optfile 2022-07-02 17:19:21 +08:00
Zaiming (Stone) Shi b3f16ccb36 fix: Erlang distribution over TLS 2022-06-28 21:49:02 +02:00
Zaiming (Stone) Shi 2457143645 fix(windows): log to console when running in console mode 2022-06-17 07:51:59 +02:00
Zaiming (Stone) Shi 41808fc2a2 chore: add a comment to describe why setting ESCRIPT_NAME 2022-06-11 14:41:01 +02:00
Zaiming (Stone) Shi 8151f79f45 fix(bin/emqx): turn off debug print when need to capture stderror 2022-05-31 16:31:16 +02:00
Zaiming (Stone) Shi c56fbb0d5d fix(emqx.cmd): write_ini should be done before invoking Erlang
Otherwise erl.exe may turn to C:\System Files to load dll modules
2022-05-31 15:03:31 +02:00
Thales Macedo Garitezi b1d3b9ba04
style: strange style forced by git? 2022-05-26 14:55:05 -03:00
Thales Macedo Garitezi d0c5de1da6
chore(config): move db configs under cluster/node keys 2022-05-26 14:02:22 -03:00
Shawn b9a9da3208 fix(relup): improve the error code and log messages 2022-05-25 10:58:06 +08:00
Shawn f036a946a8 fix: only support .tar.gz files when hot upgrade 2022-05-25 01:59:52 +08:00
Shawn b942fde836 fix: porting the install_upgrade.escript from v4.4 2022-05-24 15:05:08 +08:00
DDDHuang 809c0bede7 fix: check node name, regular expression 2022-05-19 09:52:00 +08:00
Zhongwen Deng 41268dba01 fix: can't get emqx's priv_dir when whitespace in install path 2022-05-05 15:59:14 +08:00
Thales Macedo Garitezi e59bea03ad
Merge pull request #7765 from thalesmg/node-dump-license-info
feat(node_dump): add license info to node_dump
2022-04-26 09:04:12 -03:00
Thales Macedo Garitezi 208cc0fad8
feat(node_dump): add license info to node_dump 2022-04-25 11:42:20 -03:00
Zaiming (Stone) Shi 12d7975c36
Merge pull request #7733 from thalesmg/fix-node-dump-root
fix(node_dump): define `RUNNER_ROOT_DIR` before sourcing vars
2022-04-23 10:56:24 +01:00
Shawn 7ee0887237 fix: ./bin/emqx_ctl status failed
The CLI emqx_ctl fails:

```
./bin/emqx_ctl status

Node not initialized?
Generated config file vm.*.args is not found for command 'ctl'
in config dir: /Users/liuxy/code/emqx50/_build/emqx/rel/emqx/-emqx_data_dir /Users/liuxy/code/emqx50/_build/emqx/rel/emqx/data --/configs
In case the file has been deleted while the node is running,
set environment variable 'EMQX_NODE__NAME' to continue
```
2022-04-23 15:07:58 +08:00
Thales Macedo Garitezi a6e458b23e
fix(node_dump): define `RUNNER_ROOT_DIR` before sourcing vars
`emqx_vars` requires `RUNNER_ROOT_DIR` to be defined before being
sourced.
2022-04-22 17:31:36 -03:00
Zaiming (Stone) Shi ce902b5405 refactor(bin/emqx): speed up boot
The main slow-down is the overheads of booting up beam with the
'start_clean' boot file (which loads all modules).

Prior to this change, beam is started multiple times in order to
resolve configuration values.

After this change:
* For boot commands such as 'start', 'console' and
  'foreground', it starts beam twice:
  - 1st is to check platform compatibility
  - 2nd is to resolve all configs required for boot in a batch
* For non-boot commands, such as 'ctl' and 'ping', it does not
  require to start beam for config resolution at all
2022-04-22 11:35:50 +02:00
Zaiming (Stone) Shi 6b0f56d4d6 fix(windows): start console mode in erl but not werl
otherwise there is no way to debug a boot
2022-04-22 08:21:07 +02:00
Zaiming (Stone) Shi 18cebd9be7 feat: parameterise console flavor
so we can start an Erlang console in a Elixir release
by: env EMQX_CONSOLE_FLAVOR=erl ./bin/emqx console
2022-04-13 23:29:17 +02:00
Zaiming (Stone) Shi 82ef4c87e5 fix(bin/emqx): configure mnesia dir in vm.args file 2022-04-13 21:55:05 +02:00
Zaiming (Stone) Shi 3c03c0cfc1 feat(bin/emqx): make possible to boot Erlang node from Elixir build 2022-04-13 21:55:05 +02:00
Zaiming (Stone) Shi 2dbc65cfe3 fix(bin/emqx): make possible to start in path with space 2022-04-13 21:55:05 +02:00
Zaiming (Stone) Shi 72405f977c refactor(bin/emqx): remove unnecessary intermediate env variables 2022-04-13 13:50:56 +02:00
Zaiming (Stone) Shi c8242816b0 refactor(bin/emqx): no need to template-render RUNNER_ROOT_DIR 2022-04-13 13:50:25 +02:00
Zaiming (Stone) Shi c62f7e5baa chore: fix typos in bin/emqx 2022-04-13 13:50:25 +02:00
Thales Macedo Garitezi b5ac56ba50
feat(db): check if OTP has mnesia_hook, otherwise fallback to mnesia
Adds a check to `bin/emqx` to see if the OTP version being used has
support for `mnesia_hook`, which is required by Mria for using the
RLOG backend.  If OTP is not compatible and the user tries to use
RLOG, a warning is printed during startup and the configuration falls
back to using the Mnesia backend.
2022-04-11 14:33:16 -03:00
Zaiming (Stone) Shi 32694e601a refactor: rename RUNNER_ETC_DIR to EMQX_ETC_DIR 2022-04-05 23:08:45 +02:00
Zaiming (Stone) Shi 822a4f9f73 feat: parameterise EMQX_ETC_DIR
both at build time and at runtime
2022-04-05 16:36:13 +02:00
Zaiming (Stone) Shi 122e75c0b4 feat(systemd): start EMQX under systemd in foreground mode 2022-03-11 13:34:54 +01:00
Zaiming (Stone) Shi 68fb80fc29 chore(bin/emqx): refine boot message 2022-03-04 21:02:54 +01:00
Zaiming (Stone) Shi 4e64010a3b build: more structured build info 2022-03-02 21:22:03 +01:00
Zaiming (Stone) Shi a9deb43f7e
Merge pull request #7160 from zmstone/fix-data-dir-for-windows
fix: get data_dir from config for windows
2022-02-28 15:12:16 +01:00
Zaiming (Stone) Shi 2285091585 fix: get data_dir from config for windows 2022-02-28 12:52:22 +01:00
Zaiming (Stone) Shi e22104476a fix(data_dir): get data_dir config in the right way
now data_dir config is respected by boot script as well as
EMQX application after booted
2022-02-28 09:59:56 +01:00
Zaiming (Stone) Shi 271fda3d66 fix(windows): deal with space in install path 2022-02-22 23:39:26 +01:00
Zaiming (Stone) Shi 88343df95a fix(windows): delete stale find functions
some of the find_ functions are generated from the old rebar template
which will never be used since we:

1. always release erts
2. always generate sys.config
3. always generate vm.args
2022-02-22 23:37:00 +01:00
Zaiming (Stone) Shi d9bb616574 fix(windows): attach remote_console 2022-02-22 22:33:46 +01:00
Zaiming (Stone) Shi 0fa7b4a7d4 fix(windows): wrong clean start boot file path 2022-02-22 22:33:46 +01:00
Zaiming (Stone) Shi 893b844444 feat(windows): simplify emqx_ctl for windows 2022-02-22 22:33:37 +01:00
Zaiming (Stone) Shi 5a0e3c1c7b fix(windows): fix boot in windows 2022-02-22 22:33:33 +01:00
ieQu1 bdcb37263b fix(node_dump): Don't collect information about modules 2022-02-21 18:30:08 +01:00
Zaiming (Stone) Shi 05af1874aa chore: ensure remsh prefix for remote nodes
for remsh prefixed nodes, ekka pick a random port to listen on
instead of following the conventional port mapping rule:
ekka listens on 4370 for emqx or emqx0 and 4371 for emqx1 and so on
2022-02-20 19:47:23 +01:00
Zaiming (Stone) Shi 2e94880bb6 docs: More EMQ X -> EMQX rename in descriptive strings 2022-02-15 22:39:11 +01:00
Ilya Averyanov 64c59b5469 feat(license): check license before node start 2022-02-11 11:49:29 +03:00
Thales Macedo Garitezi eea217093b
fix(mix): include `node_dump` in tgz and packages 2022-02-07 18:15:17 -03:00
Ilya Averyanov 17599432d1 feat(license): add license application 2022-02-07 19:05:47 +03:00
Thales Macedo Garitezi 1b3b2c0d03
feat: add eval-erl command to `bin/emqx`
This allows Erlang expressions to be evaluated easily even on nodes
running Elixir.
2022-02-04 16:53:27 -03:00