启动了http认证,但是却和我的服务器总是连接超时

环境

  • EMQX 版本:5.3.0
  • 操作系统版本:Alibaba Cloud 3

重现此问题的步骤

我启动了http的客户端认证,进行了如下配置:


系统上也显示了已连接,但是当我用客户端去连接的时候总是连接失败,这是我认证端的后端代码,我是用flask写的,目前就是做了一个测试,没有添加任何验证代码:

。然后这是我的后端日志,显示的是连接超时:
2023-12-11T11:34:28.129780+08:00 [warning] msg: start_resource_failed, mfa: emqx_resource_manager:start_resource/2(495), id: <<“emqx_authn_http:9350”>>, reason: econnrefused
2023-12-11T11:34:43.348588+08:00 [warning] msg: alarm_is_deactivated, mfa: emqx_alarm:do_actions/3(424), name: <<“emqx_authn_http:9350”>>
2023-12-11T11:57:09.271669+08:00 [warning] msg: http_connector_do_request_failed, mfa: emqx_bridge_http_connector:on_query/3(327), peername: 120.244.193.51:22421, clientid: emqx_NzAzOD, connector: <<“emqx_authn_http:9350”>>, reason: timeout
2023-12-11T11:57:09.271930+08:00 [error] msg: send_error, mfa: emqx_resource_buffer_worker:handle_query_result_pure/3(902), peername: 120.244.193.51:22421, clientid: emqx_NzAzOD, id: <<“emqx_authn_http:9350”>>, reason: {recoverable_error,timeout}
2023-12-11T12:11:30.663669+08:00 [warning] msg: http_connector_do_request_failed, mfa: emqx_bridge_http_connector:on_query/3(327), peername: 120.244.193.51:22395, clientid: emqx_NzAzOD, connector: <<“emqx_authn_http:9389”>>, reason: timeout
2023-12-11T12:11:30.663919+08:00 [error] msg: send_error, mfa: emqx_resource_buffer_worker:handle_query_result_pure/3(902), peername: 120.244.193.51:22395, clientid: emqx_NzAzOD, id: <<“emqx_authn_http:9389”>>, reason: {recoverable_error,timeout}

求助各位我应该怎么办?

econnrefused 是 emqx 跟 https 之间网络没通,一般是服务没启动或者网络问题。

timeout 一般是因为服务端没有及时回复应答,但如果系统运行一段时间后大量出现,并且能在重新启用认证之后恢复,就是这个问题: