环境信息
- EMQX 版本:EMQX 5.0.2
- 操作系统及版本:Ubuntu 18.04
- 其他
问题描述
客户端通过emqx传输图片,图片转换为base64,消息大小为3M左右,频率是1s一次,mqtt连接会自动断开,然后又自动重连
配置文件及日志
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 = “/var/lib/emqx”
etc_dir = “/etc/emqx”
}
log {
file_handlers.default {
#level = warning
level = info
file = “/var/log/emqx/emqx.log”
}
}
cluster {
name = emqxcl
discovery_strategy = manual
}
listeners.tcp.default {
bind = “0.0.0.0:2883”
max_connections = 1024000
tcp_options {
send_timeout = 90
}
}
listeners.ssl.default {
bind = “0.0.0.0:8883”
max_connections = 512000
ssl_options {
keyfile = “/etc/emqx/certs/key.pem”
certfile = “/etc/emqx/certs/cert.pem”
cacertfile = “/etc/emqx/certs/cacert.pem”
}
}
listeners.ws.default {
bind = “0.0.0.0:28083”
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/emqx/certs/key.pem”
certfile = “/etc/emqx/certs/cert.pem”
cacertfile = “/etc/emqx/certs/cacert.pem”
}
}
listeners.quic.default {
enabled = true
bind = “0.0.0.0:14567”
max_connections = 1024000
keyfile = “/etc/emqx/certs/key.pem”
certfile = “/etc/emqx/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/emqx/acl.conf”
}
]
}
include emqx_enterprise.conf
mqtt {
max_packet_size = 5120000
}
mqtt_quic_listener {
idle_timeout = 600s
}
send_timeout = 60s
send_timeout_close = false
日志如下:
2022-07-06T08:06:41.247442+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2252, source: file, topic: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, username: <<>>
2022-07-06T08:06:51.501000+00:00 [info] clientid: C001, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2253, source: file, topic: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, username: <<>>
2022-07-06T08:06:52.633393+00:00 [info] clientid: C001, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2253, source: file, topic: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, username: <<>>
2022-07-06T08:06:52.895425+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2252, source: file, topic: test_4f2f429a-41c8-44d5-aa17-076ef304e0ce, username: <<>>
2022-07-06T08:06:54.608710+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2252, source: file, topic: test_4f2f429a-41c8-44d5-aa17-076ef304e0ce, username: <<>>
2022-07-06T08:06:54.885193+00:00 [warning] line: 405, message: <<“connection congested: #{buffer => 4096,clientid => <<“adc05252-93b7-4cb8-8aae-d2e78d7e1e5a”>>,conn_state => connected,connected_at => 1657094800666,high_msgq_watermark => 8192,high_watermark => 1048576,memory => 88960,message_queue_len => 0,peername => <<“112.94.31.119:2252”>>,pid => <<”<0.19052.0>">>,proto_name => <<“MQTT”>>,proto_ver => 4,recbuf => 6291456,recv_cnt => 486,recv_oct => 1803396"…>>, mfa: emqx_alarm:do_actions/3, msg: alarm_is_activated, name: <<“conn_congestion/adc05252-93b7-4cb8-8aae-d2e78d7e1e5a/”>>
2022-07-06T08:06:55.538110+00:00 [warning] line: 158, mfa: emqx_sys_mon:handle_info/2, msg: busy_port, portinfo: [{port,#Port<0.440>},{name,“tcp_inet”},{links,[<0.19052.0>]},{id,3520},{connected,<0.19052.0>},{input,0},{output,1803358},{os_pid,undefined}], procinfo: [{pid,<0.19052.0>},{memory,155928},{total_heap_size,19329},{heap_size,1598},{stack_size,34},{min_heap_size,233},{proc_lib_initial_call,{emqx_connection,init,[‘Argument__1’,‘Argument__2’,‘Argument__3’,‘Argument__4’]}},{initial_call,{proc_lib,init_p,5}},{current_stacktrace,[{erlang,port_command,3,[]},{esockd_transport,async_send,3,[{file,“esockd_transport.erl”},{line,153}]},{emqx_connection,send,2,[{file,“emqx_connection.erl”},{line,868}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,466}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,472}]},{emqx_connection,handle_recv,3,[{file,“emqx_connection.erl”},{line,428}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,236}]}]},{registered_name,[]},{status,suspended},{message_queue_len,0},{group_leader,<0.1911.0>},{priority,normal},{trap_exit,false},{reductions,191116},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
2022-07-06T08:08:05.038883+00:00 [warning] line: 411, mfa: emqx_alarm:do_actions/3, msg: alarm_is_deactivated, name: <<“conn_congestion/adc05252-93b7-4cb8-8aae-d2e78d7e1e5a/”>>
2022-07-06T08:08:05.039243+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, line: 636, mfa: emqx_connection:terminate/2, msg: terminate, peername: 112.94.31.119:2252, reason: {shutdown,einval}
2022-07-06T08:08:07.869135+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2254, source: file, topic: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, username: <<>>
2022-07-06T08:08:07.869504+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2254, source: file, topic: test_4f2f429a-41c8-44d5-aa17-076ef304e0ce, username: <<>>
2022-07-06T08:08:27.075973+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2254, source: file, topic: test_4f2f429a-41c8-44d5-aa17-076ef304e0ce, username: <<>>
2022-07-06T08:08:33.910857+00:00 [warning] line: 405, message: <<“connection congested: #{buffer => 4096,clientid => <<“adc05252-93b7-4cb8-8aae-d2e78d7e1e5a”>>,conn_state => connected,connected_at => 1657094885343,high_msgq_watermark => 8192,high_watermark => 1048576,memory => 89048,message_queue_len => 1,peername => <<“112.94.31.119:2254”>>,pid => <<”<0.19113.0>">>,proto_name => <<“MQTT”>>,proto_ver => 4,recbuf => 3028649,recv_cnt => 904,recv_oct => 2807287"…>>, mfa: emqx_alarm:do_actions/3, msg: alarm_is_activated, name: <<“conn_congestion/adc05252-93b7-4cb8-8aae-d2e78d7e1e5a/”>>
2022-07-06T08:08:36.653747+00:00 [warning] line: 158, mfa: emqx_sys_mon:handle_info/2, msg: busy_port, portinfo: [{port,#Port<0.442>},{name,“tcp_inet”},{links,[<0.19113.0>]},{id,3536},{connected,<0.19113.0>},{input,0},{output,2807156},{os_pid,undefined}], procinfo: [{pid,<0.19113.0>},{memory,163920},{total_heap_size,20317},{heap_size,2586},{stack_size,34},{min_heap_size,233},{proc_lib_initial_call,{emqx_connection,init,[‘Argument__1’,‘Argument__2’,‘Argument__3’,‘Argument__4’]}},{initial_call,{proc_lib,init_p,5}},{current_stacktrace,[{erlang,port_command,3,[]},{esockd_transport,async_send,3,[{file,“esockd_transport.erl”},{line,153}]},{emqx_connection,send,2,[{file,“emqx_connection.erl”},{line,868}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,466}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,472}]},{emqx_connection,handle_recv,3,[{file,“emqx_connection.erl”},{line,428}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,236}]}]},{registered_name,[]},{status,suspended},{message_queue_len,1},{group_leader,<0.1911.0>},{priority,normal},{trap_exit,false},{reductions,234012},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
2022-07-06T08:08:44.244252+00:00 [warning] line: 411, mfa: emqx_alarm:do_actions/3, msg: alarm_is_deactivated, name: <<“conn_congestion/adc05252-93b7-4cb8-8aae-d2e78d7e1e5a/”>>
2022-07-06T08:08:44.244512+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, line: 636, mfa: emqx_connection:terminate/2, msg: terminate, peername: 112.94.31.119:2254, reason: {shutdown,einval}
2022-07-06T08:08:45.224205+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2255, source: file, topic: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, username: <<>>
2022-07-06T08:08:45.224485+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2255, source: file, topic: test_4f2f429a-41c8-44d5-aa17-076ef304e0ce, username: <<>>
2022-07-06T08:08:52.022018+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, line: 636, mfa: emqx_connection:terminate/2, msg: terminate, peername: 112.94.31.119:2255, reason: {shutdown,tcp_closed}
2022-07-06T08:09:25.628524+00:00 [info] clientid: mqttx_673abe20, line: 636, mfa: emqx_connection:terminate/2, msg: terminate, peername: 45.138.210.42:48259, reason: {shutdown,keepalive_timeout}
2022-07-06T08:14:42.367582+00:00 [info] clientid: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, ipaddr: {112,94,31,119}, line: 324, mfa: emqx_authz:authorize/5, msg: authorization_permission_allowed, peername: 112.94.31.119:2256, source: file, topic: adc05252-93b7-4cb8-8aae-d2e78d7e1e5a, username: <<>>