diff --git a/bin/emqx b/bin/emqx index 674610a4f..308aaf51f 100755 --- a/bin/emqx +++ b/bin/emqx @@ -85,7 +85,7 @@ die() { assert_node_alive() { if ! relx_nodetool "ping" > /dev/null; then - die "node_is_not_running!" 1 + exit 1 fi } @@ -457,6 +457,8 @@ if [ "$IS_ENTERPRISE" = 'yes' ]; then CONF_KEYS+=( 'license.key' ) fi +# Turn off debug as the ps output can be quite noisy +set +x if [ "$IS_BOOT_COMMAND" = 'yes' ]; then [ -f "$EMQX_ETC_DIR"/emqx.conf ] || die "emqx.conf is not found in $EMQX_ETC_DIR" 1 if [ "${EMQX_BOOT_CONFIGS:-}" = '' ]; then @@ -466,19 +468,21 @@ if [ "$IS_BOOT_COMMAND" = 'yes' ]; then export EMQX_BOOT_CONFIGS fi else - # Turn off debug as the ps output can be quite noisy - set +x # For non-boot commands, we need below runtime facts to connect to the running node: - # 1. The running node name. - # 2. The Erlang cookie in use by the running node name. - # 3. SSL options if the node is using TLS for Erlang distribution + # 1. The running node name; + # 2. The Erlang cookie in use by the running node name; + # 3. SSL options if the node is using TLS for Erlang distribution; + # 4. Erlang kernel application's net_ticktime config. # # There are 3 sources of truth to get those runtime information. # Listed in the order of preference: # 1. The boot command (which can be inspected from 'ps -ef' command output) - # 2. The generated app.