emqx 啟動超時,重新再開又會成功,很不穩定

环境信息

  • EMQX 版本:5.0.6
  • 操作系统及版本:macos 11
  • 其他

问题描述

輸入指令 emqx start 有時候會超時,重新再跑一次又會成功,很不穩定

配置文件及日志

emqx.log.1

erlang.log.1

这个日志看起来和你的授权设置有关,麻烦提供下你的授权相关的配置

這是我的 emqx.conf

## NOTE:
## Configs in this file might be overridden by:
## 1. Environment variables which start with 'EMQX_' prefix
## 2. File $EMQX_NODE__DATA_DIR/configs/cluster-override.conf
## 3. File $EMQX_NODE__DATA_DIR/configs/local-override.conf
##
## The *-override.conf files are overwritten at runtime when changes
## are made from EMQX dashboard UI, management HTTP API, or CLI.
## All configuration details can be found in emqx.conf.example

node {
  name = "emqx@127.0.0.1"
  cookie = emqxsecretcookie
  data_dir = "data"
  etc_dir = "etc"
}

log {
  file_handlers.default {
    level = warning
    file = "log/emqx.log"
  }
}

cluster {
  name = emqxcl
  discovery_strategy = manual
}


listeners.tcp.default {
  bind = "0.0.0.0:1883"
  max_connections = 1024000
}

listeners.ssl.default {
  bind = "0.0.0.0:8883"
  max_connections = 512000
  ssl_options {
    keyfile = "etc/certs/key.pem"
    certfile = "etc/certs/cert.pem"
    cacertfile = "etc/certs/cacert.pem"
  }
}

listeners.ws.default {
  bind = "0.0.0.0:8083"
  max_connections = 1024000
  websocket.mqtt_path = "/mqtt"
}

listeners.wss.default {
  bind = "0.0.0.0:8084"
  max_connections = 512000
  websocket.mqtt_path = "/mqtt"
  ssl_options {
    keyfile = "etc/certs/key.pem"
    certfile = "etc/certs/cert.pem"
    cacertfile = "etc/certs/cacert.pem"
  }
}

# listeners.quic.default {
#  enabled = true
#  bind = "0.0.0.0:14567"
#  max_connections = 1024000
#  keyfile = "etc/certs/key.pem"
#  certfile = "etc/certs/cert.pem"
#}

dashboard {
    listeners.http {
        bind = 18083
    }
    default_username = "admin"
    default_password = "public"
}

# authorization {
#   deny_action = ignore
#   no_match = allow
#   sources =  [
#     {
#       type = file
#       enable = true
#       # This file is immutable to EMQX.
#       # Once new rules are created from dashboard UI or HTTP API,
#       # the file 'data/authz/acl.conf' is used instead of this one
#       path = "etc/acl.conf"
#     }
#   ]
# }

include emqx_enterprise.conf

exhook {
    servers = [
        {
            auto_reconnect = "10s"
            enable = true
            failed_action = "deny"
            name = "indochat"
            pool_size = 16
            request_timeout = "5s"
            url = "http://localhost:8081"
            ssl {
                enable = false
            }
        }
    ]
}

authorization {
  cache {
    enable = false
  }
  deny_action = ignore
  no_match = deny
  sources =  [
    {
      type = http
      enable = true

      method = post
      url = "http://localhost:8080/mqtt/authz/${clientid}"
			ssl {
	        enable = false
	    }
      body {
      }
      headers { 
      }
    }
  ]
}

cluster {
    discovery_strategy = etcd
    etcd {
        server = "http://localhost:2379"
        prefix = emqcl
        node_ttl = 1m
    }
}

node.name = "emqx@127.0.0.1"

这个可能是一个概率性的 bug, 我们这边会继续调查和尽快修复

1 个赞