http服务认证隔一段时间就认证不了,更新一下设置或者停用启用就又正常可以认证

环境

  • EMQX 版本:5.0.26
  • 操作系统版本:Linux i-CD7660FE 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

重现此问题的步骤

2023-07-04T15:24:58.697587+08:00 [warning] msg: http_connector_do_request_failed, mfa: emqx_connector_http:on_query/3, line: 298, peername: 10.12.48.242:32242, clientid: 188D669A4E8DXSSV.123456|, connector: <<“emqx_authn_http:92”>>, reason: timeout
2023-07-04T15:24:58.698178+08:00 [error] msg: send_error, mfa: emqx_resource_buffer_worker:handle_query_result_pure/3, line: 863, peername: 10.12.48.242:32242, clientid: 188D669A4E8DXSSV.123456|, id: <<“emqx_authn_http:92”>>, reason: {recoverable_error,timeout}
2023-07-04T15:25:12.667533+08:00 [warning] msg: http_connector_do_request_failed, mfa: emqx_connector_http:on_query/3, line: 298, peername: 10.12.48.242:32244, clientid: 188D669A4E8DXSSV.123456|, connector: <<“emqx_authn_http:92”>>, reason: timeout
2023-07-04T15:25:12.668106+08:00 [error] msg: send_error, mfa: emqx_resource_buffer_worker:handle_query_result_pure/3, line: 863, peername: 10.12.48.242:32244, clientid: 188D669A4E8DXSSV.123456|, id: <<“emqx_authn_http:92”>>, reason: {recoverable_error,timeout}
2023-07-04T15:25:26.677533+08:00 [warning] msg: http_connector_do_request_failed, mfa: emqx_connector_http:on_query/3, line: 298, peername: 10.12.48.242:32247, clientid: 188D669A4E8DXSSV.123456|, connector: <<“emqx_authn_http:92”>>, reason: timeout
2023-07-04T15:25:26.678123+08:00 [error] msg: send_error, mfa: emqx_resource_buffer_worker:handle_query_result_pure/3, line: 863, peername: 10.12.48.242:32247, clientid: 188D669A4E8DXSSV.123456|, id: <<“emqx_authn_http:92”>>, reason: {recoverable_error,timeout}
2023-07-04T15:25:40.685590+08:00 [warning] msg: http_connector_do_request_failed, mfa: emqx_connector_http:on_query/3, line: 298, peername: 10.12.48.242:32252, clientid: 188D669A4E8DXSSV.123456|, connector: <<“emqx_authn_http:92”>>, reason: timeout
2023-07-04T15:25:40.686153+08:00 [error] msg: send_error, mfa: emqx_resource_buffer_worker:handle_query_result_pure/3, line: 863, peername: 10.12.48.242:32252, clientid: 188D669A4E8DXSSV.123456|, id: <<“emqx_authn_http:92”>>, reason: {recoverable_error,timeout}

预期行为

实际行为

看日志的报错是reason: timeout,检查下你的 http 服务是不是有时候请求延迟很高呢?

只要停用再启用http认证,就会变正常这应该不是http服务问题吧?是不是连接池里没有可用连接?

方便贴下你 http 认证的配置参数么

请问一下,这个连接池是保持的长连接吗?可以配置成短连接吗

麻烦问下,问题最后怎么解决的啊?我也遇到类似的问题。已确认http服务是没有问题的,是正常请求了的,但是emqx日志就是提示超时