emqx版本:5.0.8
情况:我配置mysql认证(用户用户名密码认证),HTTP Server认证(用于证书认证),如果不用nginx代理,1883端口输入用户名密码之后会走mysql认证,8883端口配置证书(不再输入用户名密码)之后会走HTTP Server认证(这已经实现了);现在我想用nginx代理8883,但是出现了直连1883连接成功之后出现重新连接的情况,并且连接8883端口出现连接不上的情况,请问一下怎么解决
可以看下 EMQX 的 debug 级别日志,这个看起来像是 nginx 没有设置正确
我现在的情况是用nginx代理之后emqx 8883端口,需要输入用户名密码,但是我关闭nginx,开启emqx
ssl 8883的监听器, 再填入证书信息后是不需要填写用户名密码的;我如何配置既可以用nginx代理emqx,又可以填写证书不需要输入用户名密码
将日志等级设置为 debug, 先确定下为什么没有通过认证
2023-07-10T10:58:07.932000+08:00 [error] supervisor: ‘esockd_connection_sup - <0.2070.0>’, errorContext: connection_shutdown, reason: {ssl_error,{tls_alert,{unexpected_message,“TLS server: In state hello at tls_record.erl:564 generated SERVER ALERT: Fatal - Unexpected Message\n {unsupported_record_type,16}”}}}, offender: [{pid,<0.2827.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{enable_authn => true,limiter => #{bytes_in => #{capacity => 1099511627776,initial => 0,rate => infinity},client => #{bytes_in => #{capacity => 1099511627776,divisible => false,failure_strategy => force,initial => 0,low_watermark => 0,max_retry_time => 10000,rate => infinity},connection => #{capacity => 1099511627776,divisible => false,failure_strategy => force,initial => 0,low_watermark => 0,max_retry_time => 10000,rate => infinity},message_in => #{capacity => 1099511627776,divisible => false,failure_strategy => force,initial => 0,low_watermark => 0,max_retry_time => 10000,rate =>
2023-07-10T10:58:48.440000+08:00 [debug] line: 141, mfa: emqx_retainer_mnesia:store_retained/2, msg: message_retained, topic: $SYS/brokers/emqx@127.0.0.1/version
2023-07-10T10:58:48.441000+08:00 [debug] line: 141, mfa: emqx_retainer_mnesia:store_retained/2, msg: message_retained, topic: $SYS/brokers/emqx@127.0.0.1/sysdescr
2023-07-10T10:58:48.441000+08:00 [debug] line: 141, mfa: emqx_retainer_mnesia:store_retained/2, msg: message_retained, topic: $SYS/brokers
你的 upstream 端口是 1883, 这是 TCP 端口呀?
这是我将nginx修改之后的配置,nginx用8880代理8883端口,emqx开启ssl8883,mqttx连接8880并配置证书,MQTTX出现 Error: Cannot parse protocolId错误;
解决了吗