常见日志报错及解决方法(二)

EMQX 客服发表于:2022年05月18日 11:10:16更新于:2022年05月24日 16:33:18

61.关键字: connections exceeds

日志原文:

[Alarm Handler] Alarm license_quota is activated, License: the number of connections exceeds 80%

告警原因:连接数达到了最大连接数的80%

解决方案

62.关键字: emqx shutdown for leave

日志原文:

[EMQ X] emqx shutdown for leave

错误原因 emq离开集群短暂的shutdown

解决方案

63.关键字: kiecked_an_unknown_session

日志原文:

[CM] kiecked_an_unknown_session gxe0s9xn8blhy

错误原因:用户主动、或者 EMQX 发起 kick 时,对应的会话不存在。一般可能是在踢之前,会话就已经关闭了

解决方案

64.关键字: /api

日志原文:

nmap@172.105.87.91:39602 [Auth http] Request auth path: /api/v1/pub/login/mqt, error: {shutdown,timeout}

错误原因:发送的http 认证请求被关掉了,HTTP 服务器端的认证连接超时

解决方案:检查http服务

65.关键字: Unexpected info

日志原文:

<<"f91fb3f8b5db66d5">>@113.110.226.205:42590 [Channel] Unexpected info: {#Ref<0.768214306.2804154369.213635>,0,105255}

错误原因:可能原因:1.开了http认证,http认证认证服务器没返回认证结果或者超过了延时时间,就会出现这个报错返回unexpected info,这种需要调整延时时间或者增大认证服务器数量 2.开了kafka 客户端配置了Kafka以后,当命中规则了以后,桥接消息到Kafka中,这个时候Kafka要回复一个ack命令到EMQ确认接收,如果没收到回复,就会出现这个报错返回unexpected info,当消息吞吐比较大的时候kafka没回复这种报错就会比较多,如果kafka配置的同步的话可以设置同步调用超时时间长一点,如果Kafka配置的异步的话性能就会好很多

解决方案

66.关键字: republish

日志原文:

GID_Emqx@@@bocker-1647351581@8.142.140.104:56250 [Session] Dropped msg due to mqueue is full: Message(Id=0005DA42149BC56083ABAA00523E017E, QoS=1, Topic=hub/s/event, From=<<"republish_1646187204095697295">>, Flags=[], Headers=#{republish_by => <<"republish_1646187204095697295">>})

错误原因:消息队列已经满了,订阅端消费能力不足导致

解决方案:增加订阅端消费能力

67.关键字: SELECT

日志原文:

V2103949@39.144.2.255:53822 SELECT clause exception for rule:1650b6e6 failed: {error,function_clause,[{emqx_rule_funcs,base64_decode,[undefined],[{file,"emqx_rule_funcs.erl"},{line,794}]},{emqx_rule_runtime,do_apply_func,3,[{file,"emqx_rule_runtime.erl"},{line,425}]},{emqx_rule_runtime,select_and_transform,3,[{file,"emqx_rule_runtime.erl"},{line,144}]},{emqx_rule_runtime,'-do_apply_rule/2-fun-3-',2,[{file,"emqx_rule_runtime.erl"},{line,120}]},{emqx_rule_runtime,do_apply_rule,2,[{file,"emqx_rule_runtime.erl"},{line,120}]},{emqx_rule_runtime,apply_rule_discard_result,2,[{file,"emqx_rule_runtime.erl"},{line,81}]},{emqx_rule_runtime,apply_rules,2,[{file,"emqx_rule_runtime.erl"},{line,54}]},{emqx_rule_events,on_message_publish,2,[{file,"emqx_rule_events.erl"},{line,97}]},{emqx_hooks,safe_execute,2,[{file,"emqx_hooks.erl"},{line,191}]},{emqx_hooks,do_run_fold,3,[{file,"emqx_hooks.erl"},{line,170}]},{emqx_broker,publish,1,[{file,"emqx_broker.erl"},{line,204}]},{emqx_channel,do_publish,3,[{file,"emqx_channel.erl"},{line,578}]},{emqx_connection,with_channel,3,[{file,"emqx_connection.erl"},{line,664}]},{emqx_connection,process_msg,2,[{file,"emqx_connection.erl"},{line,364}]},{emqx_connection,process_msg,2,[{file,"emqx_connection.erl"},{line,370}]},{emqx_connection,handle_recv,3,[{file,"emqx_connection.erl"},{line,328}]}]}

错误原因:规则引擎的sql写错了,base64_decode 的值,没有传过来

解决方案:检查写的sql

68.关键字: Pick ecpool

日志原文:

udi-nomancar-adv-gt-1695@119.139.198.128:2033 Pick ecpool worker error timeout

错误原因:进程池太忙了,反应不过来了

解决方案

69.关键字: MQTT/WS

日志原文:

47.99.107.131:40516 [MQTT/WS] Unexpected frame - text

错误原因:数据格式不正确

解决方案:检查数据格式

70.关键字: Producer

日志原文:

Producer location_notification-1: Failed to reconnect. Reason: noproc

错误原因:kafka进程挂掉了

解决方案:需要上下文定位原因

71.关键字: Bridge Connect

日志原文:

[Bridge Connect] Failed to connect with module=emqx_bridge_rpc, config=[{subscriptions,[]},{start_type,auto},{max_inflight_batches,32},{if_record_metrics,false},{forward_mountpoint,"bridge/emqx/${node}/"},{disk_cache,false},{batch_size,32},{address,'emqx2@127.0.0.1'}], reason:{unknown_error,{{badrpc,econnrefused},{gen_server,call,[<0.24134.1>,{{call,erlang,node,[]},undefined},15000]}}}

错误原因:RPC 调用失败,要么是网络不通,要么就是对端已经挂了

解决方案

72.关键字: Note 1292

日志原文:

Note 1292: Incorrect date value: '2022-03-26 20:25:00' for column 'freezingTime' at row 1, in insert into ht_analog_data (deviceName,Epn,Epp,I0,I2,DeviceTemp,Pa,Pb,Pc,DevResetTimes,Upt,Busot,Demand,IHb,Eqn,IHa,Udt,Eqp,IHc,Ua,Ub,Epn2,Uc,Epn1,Epn4,Qa,Epn3,Qb,Qc,Uab,Ul,Ia,LastDayMDt,Ib,Ic,THDUb,THDUa,THDUc,UblU0,COSc,COSb,COSa,F,UblU2,Ir,SignalIntensity,P,Q,Ubc,T1,T2,freezingTime,T3,T4,COS,Epp2,Epp1,Epp4,Epp3,LastDayMD,Uca,Ust )  VALUES  ('DA00013165',0.0199999996,-0.003,0.0160000008,0,20,-0.0020999999,0,0,0,171,156,-0.0020999999,0.003,0.0099999998,0.003,0,-0.003,0.003,159.9600067139,0.1299999952,0.0219999999,0.1800000072,-0.001,-0.001,-0.0014,-0.001,0,0,156.1399993896,0.150000006,0.0149999997,0,0.0160000008,0.0149999997,23.0799999237,22.4099998474,13.8900003433,99.7900009155,0,0,-0.8399000168,50.0299987793,99.9899978638,9.3000001907,29,-0.0020999999,-0.0014,0.0799999982,-273,-273,FROM_UNIXTIME('1648297500000'/1000),-273,-273,-0.8399000168,-0.001,-0.001,-0.001,-0.001,0,156.2100067139,59)

错误原因:数据格式不正确或者长度太长

解决方案:检查数据格式

73.关键字: not_leader_for_partition

日志原文:

Producer vehicleStatus-0: Connection <0.8252.769> down. Reason: not_leader_for_partition

错误原因:重新对主题leader发生过重新选举导致主题leader节点发生变更

解决方案

74.关键字: mqtt bridge

日志原文:

Get mqtt bridge status timeout: {timeout,<0.12606.2>}

错误原因:mqtt桥接超时

解决方案:检查连接

75.关键字: PUBCOMP

日志原文:

S-W012145000037@112.32.42.108:27627 [Channel] The PUBCOMP PacketId 12578 is not found

错误原因:PUBCOMP发布完成报文PacketId 12578未找到

解决方案

76.关键字: RuleEngine

日志原文:

[RuleEngine MySql] insert failed reason: {1265,<<"01000">>,<<"Data truncated for column 'JSVOC' at row 1">>}

错误原因:插入的数据格式不对或者长度太长

解决方案:检查插入数据

77.关键字: Unexpected incoming

日志原文:

1002@117.132.192.208:34428 [Channel] Unexpected incoming: {mqtt_packet,{mqtt_packet_header,0,false,0,false},undefined,undefined}

错误原因:mqtt包报头有问题

解决方案

78.关键字: Auth from mnesia failed

日志原文:

[27784,38451,22235,38498]@58.220.83.118:57540 [Mnesia] Auth from mnesia failed: #{clientid => <<230,178,136,233,152,179,229,155,155,233,153,162>>,cn => undefined,dn => undefined,is_bridge => false,is_superuser => false,mountpoint => undefined,password => <<"wx147258369">>,peerhost => {58,220,83,118},protocol => mqtt,sockport => 1883,username => <<"admin">>,zone => external}

错误原因:mnesia认证失败

解决方案:检查用户名及密码

79.关键字: Parse failed for function_clause

日志原文: 

183.136.225.14:47598 [MQTT] , Parse failed for function_clause, [{emqx_frame,parse_packet,[{mqtt_packet_header,4,false,3,true},<<"T / HTTP/1.1\r\nHost: 120.79.96.1:1883\r\nUser-Agent: Mozilla/5.0 (Macint">>,#{max_size => 1048576,strict_mode => false,version => 4}],[{file,"emqx_frame.erl"},{line,224}]},{emqx_frame,parse_frame,4,[{file,"emqx_frame.erl"},{line,201}]},{emqx_connection,parse_incoming,3,[{file,"emqx_connection.erl"},{line,625}]},{emqx_connection,handle_msg,2,[{file,"emqx_connection.erl"},{line,618}]},{emqx_connection,process_msg,2,[{file,"emqx_connection.erl"},{line,364}]},{emqx_connection,handle_recv,3,[{file,"emqx_connection.erl"},{line,328}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,236}]}], Frame data:<<"GET / HTTP/1.1\r\nHost: 120.79.96.1:1883\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n">>

错误原因:发布的报文不合法

解决方案:检查报文

80.关键字: Warning 1265

日志原文:

Warning 1265: Data truncated for column 'temp' at row 1, Warning 1265: Data truncated for column 'hum' at row 1, in insert into , temp_hum(up_timestamp, client_id, temp, hum)  VALUES  , (FROM_UNIXTIME(1647761018341/1000), 'diaocheguanli1', 'undefined', 'undefined')

错误原因:插入的数据格式有问题或者长度太长

解决方案:检查数据格式

81.关键字: Warning 1292

日志原文:

Warning 1292: Truncated incorrect DOUBLE value: 'undefined', in INSERT INTO monitor_data_H621382_2022 (id, cod, nh3n, turb, ec, ph, dio, temp, vol, gps, monitor_dt, create_dt, state)  VALUES  ('H621382', ROUND(7.0591, 2), abs(ROUND(1.025, 2)), ROUND(10.93, 2), ROUND(0.71, 2), ROUND(8.22, 2), ROUND(4.2, 2), ROUND(13.67, 2),ROUND('undefined', 2), '0,0', FROM_UNIXTIME(1648004224), now(), '1')

错误原因:插入数据的格式不正确

解决方案:检查插入的数据

82.关键字: Note 1292

日志原文:

Note 1292: Incorrect date value: '2022-03-26 20:25:00' for column 'freezingTime' at row 1, in insert into ht_analog_data (deviceName,Epn,Epp,I0,I2,DeviceTemp,Pa,Pb,Pc,DevResetTimes,Upt,Busot,Demand,IHb,Eqn,IHa,Udt,Eqp,IHc,Ua,Ub,Epn2,Uc,Epn1,Epn4,Qa,Epn3,Qb,Qc,Uab,Ul,Ia,LastDayMDt,Ib,Ic,THDUb,THDUa,THDUc,UblU0,COSc,COSb,COSa,F,UblU2,Ir,SignalIntensity,P,Q,Ubc,T1,T2,freezingTime,T3,T4,COS,Epp2,Epp1,Epp4,Epp3,LastDayMD,Uca,Ust )  VALUES  ('DA00013165',0.0199999996,-0.003,0.0160000008,0,20,-0.0020999999,0,0,0,171,156,-0.0020999999,0.003,0.0099999998,0.003,0,-0.003,0.003,159.9600067139,0.1299999952,0.0219999999,0.1800000072,-0.001,-0.001,-0.0014,-0.001,0,0,156.1399993896,0.150000006,0.0149999997,0,0.0160000008,0.0149999997,23.0799999237,22.4099998474,13.8900003433,99.7900009155,0,0,-0.8399000168,50.0299987793,99.9899978638,9.3000001907,29,-0.0020999999,-0.0014,0.0799999982,-273,-273,FROM_UNIXTIME('1648297500000'/1000),-273,-273,-0.8399000168,-0.001,-0.001,-0.001,-0.001,0,156.2100067139,59)

错误原因:插入数据库格式不对或者长度不对

解决方案:检查数据

83.关键字: Unexpected frame error

日志原文:

dsdrtewww@190.63.200.38:59643 [Channel] Unexpected frame error: function_clause

错误原因:Unexpected frame(意外帧)发送报文有问题

解决方案

84.关键字: Unexpected Event

日志原文:

emqtt(client_0005D9E0FEF4159A7246160028FA0000): State: connected, Unexpected Event: (cast, {mqtt_packet,{mqtt_packet_header,5,false,0,false},{mqtt_packet_puback,11795,16,#{}},undefined})

错误原因:mqtt包qos1的消息报文不正确

解决方案

85.关键字: Reason: sock_closed

日志原文:

Generic server <0.11510.2> terminating. Reason: sock_closed. Last message: {tcp_closed,#Port<0.18637>}. State: {state,gen_tcp,undefined,<<>>,undefined,on_message,undefined,{[],[]},undefined,undefined,undefined,undefined,[],information_redacted,[],undefined,undefined,undefined,undefined,#{database => "tsdb",ecpool_worker_id => 1,host => {10,0,123,45},port => 5432}}.

错误原因:sock_closed,然后tcp_closed连接断开,网络原因。

解决方案

86.关键字:error,badarith

image.png

错误原因:查询不到Kafka topic分区

解决方案:

    您需要登录后才可以回复