下图是按您的提示操作后的输出结果,其中application:get_all_env(emqx_auth_mongo).输出的是[],recon_trace:calls({emqx_auth_mongo,‘_’,return_trace},1000).输出的是0。另外,我把emqx.log.1的输出日志也附上,其中的数据是对应从emqx启动,到输入您的要求输入的指令,最后启动客户端请求整个操作过程。请查看,谢谢!
/------------------------------------------------------------------------------------------------------/
emqx.log.1
2023-06-05T09:41:56.782000+08:00 [notice] alarm_handler: {set,{{disk_almost_full,“E:\”},[]}}
2023-06-05T09:41:56.908000+08:00 [info] event=server_setup_successfully driver=tcp socket=“#Port<0.7>”
2023-06-05T09:41:56.916000+08:00 [info] ‘$kind’: gen_rpc_dispatcher_start, file: gen_rpc_dispatcher.erl, line: 52, mfa: {gen_rpc_dispatcher,init,0}, pid: <0.166.0>
2023-06-05T09:41:56.979000+08:00 [notice] alarm_handler: {clear,lc_mem_alarm}
2023-06-05T09:41:57.004000+08:00 [notice] alarm_handler: {clear,lc_runq_alarm}
2023-06-05T09:42:03.880000+08:00 [debug] Adding Defaults
2023-06-05T09:42:03.880000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:03.880000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:03.881000+08:00 [debug] Validation
2023-06-05T09:42:03.881000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:03.882000+08:00 [debug] “emqx_management.application” in Translations to drop…
2023-06-05T09:42:03.882000+08:00 [debug] Running translation for emqx_management.listeners
2023-06-05T09:42:03.883000+08:00 [debug] Applied Translations
2023-06-05T09:42:03.892000+08:00 [info] [Plugins] Started plugins: [emqx_plugin_libs,jiffy,minirest,emqx_management]
2023-06-05T09:42:03.892000+08:00 [info] [Plugins] Load plugin emqx_management successfully
2023-06-05T09:42:03.895000+08:00 [debug] Adding Defaults
2023-06-05T09:42:03.895000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:03.895000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:03.895000+08:00 [debug] Validation
2023-06-05T09:42:03.895000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:03.895000+08:00 [debug] Applied Translations
2023-06-05T09:42:03.896000+08:00 [info] [Plugins] Started plugins: [recon,emqx_recon]
2023-06-05T09:42:03.896000+08:00 [info] [Plugins] Load plugin emqx_recon successfully
2023-06-05T09:42:03.908000+08:00 [debug] Adding Defaults
2023-06-05T09:42:03.908000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:03.908000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:03.909000+08:00 [debug] Validation
2023-06-05T09:42:03.909000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:03.909000+08:00 [debug] Applied Translations
2023-06-05T09:42:03.911000+08:00 [info] [Plugins] Started plugins: [emqx_retainer]
2023-06-05T09:42:03.911000+08:00 [info] [Plugins] Load plugin emqx_retainer successfully
2023-06-05T09:42:03.916000+08:00 [debug] Adding Defaults
2023-06-05T09:42:03.916000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:03.916000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:03.917000+08:00 [debug] Validation
2023-06-05T09:42:03.917000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:03.917000+08:00 [debug] Applied Translations
2023-06-05T09:42:03.917000+08:00 [info] [Plugins] Started plugins: [emqx_telemetry]
2023-06-05T09:42:03.918000+08:00 [info] [Plugins] Load plugin emqx_telemetry successfully
2023-06-05T09:42:03.933000+08:00 [debug] Adding Defaults
2023-06-05T09:42:03.933000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:03.933000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:03.934000+08:00 [debug] Validation
2023-06-05T09:42:03.934000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:03.934000+08:00 [debug] Running translation for emqx_rule_engine.events
2023-06-05T09:42:03.935000+08:00 [debug] Applied Translations
2023-06-05T09:42:04.207000+08:00 [info] [Plugins] Started plugins: [jose,rulesql,getopt,emqx_rule_engine]
2023-06-05T09:42:04.207000+08:00 [info] [Plugins] Load plugin emqx_rule_engine successfully
2023-06-05T09:42:04.246000+08:00 [debug] Adding Defaults
2023-06-05T09:42:04.247000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:04.247000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:04.248000+08:00 [debug] Validation
2023-06-05T09:42:04.248000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:04.248000+08:00 [debug] Running translation for emqx_dashboard.listeners
2023-06-05T09:42:04.249000+08:00 [debug] Applied Translations
2023-06-05T09:42:04.259000+08:00 [info] [Plugins] Started plugins: [emqx_dashboard]
2023-06-05T09:42:04.259000+08:00 [info] [Plugins] Load plugin emqx_dashboard successfully
2023-06-05T09:42:04.280000+08:00 [debug] Adding Defaults
2023-06-05T09:42:04.280000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:04.280000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:04.281000+08:00 [debug] Validation
2023-06-05T09:42:04.281000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:04.281000+08:00 [debug] Running translation for emqx_auth_redis.options
2023-06-05T09:42:04.281000+08:00 [debug] Running translation for emqx_auth_redis.server
2023-06-05T09:42:04.282000+08:00 [debug] Running translation for emqx_auth_redis.query_timeout
2023-06-05T09:42:04.282000+08:00 [debug] Running translation for emqx_auth_redis.password_hash
2023-06-05T09:42:04.282000+08:00 [debug] Applied Translations
2023-06-05T09:42:04.291000+08:00 [info] [Plugins] Started plugins: [ecpool,eredis,eredis_cluster,emqx_auth_redis]
2023-06-05T09:42:04.291000+08:00 [info] [Plugins] Load plugin emqx_auth_redis successfully
2023-06-05T09:42:04.339000+08:00 [debug] Adding Defaults
2023-06-05T09:42:04.339000+08:00 [debug] Right Hand Side Substitutions
2023-06-05T09:42:04.340000+08:00 [debug] Applying Datatypes
2023-06-05T09:42:04.341000+08:00 [debug] Validation
2023-06-05T09:42:04.341000+08:00 [debug] Applied 1:1 Mappings
2023-06-05T09:42:04.341000+08:00 [debug] Running translation for emqx_auth_mongo.server
2023-06-05T09:42:04.342000+08:00 [debug] “mongodb.cursor_timeout” in Translations to drop…
2023-06-05T09:42:04.342000+08:00 [debug] Running translation for emqx_auth_mongo.auth_query
2023-06-05T09:42:04.343000+08:00 [debug] Running translation for emqx_auth_mongo.super_query
2023-06-05T09:42:04.343000+08:00 [debug] Running translation for emqx_auth_mongo.acl_query
2023-06-05T09:42:04.343000+08:00 [debug] Applied Translations
2023-06-05T09:42:04.402000+08:00 [info] [Plugins] Started plugins: [pbkdf2,bson,poolboy,mongodb,emqx_auth_mongo]
2023-06-05T09:42:04.403000+08:00 [info] [Plugins] Load plugin emqx_auth_mongo successfully
2023-06-05T09:42:04.405000+08:00 [info] [Modules] Load emqx_mod_acl_internal module successfully.
2023-06-05T09:42:04.405000+08:00 [info] [Modules] Load emqx_mod_presence module successfully.
2023-06-05T09:42:06.382000+08:00 [debug] file: emqx_telemetry.erl, line: 359, mfa: {emqx_telemetry,report_telemetry,1}, msg: telemetry_data_reported, pid: <0.456.0>
2023-06-05T09:47:04.760000+08:00 [debug] 127.0.0.1:52182 [MQTT] RECV <<16,50,0,4,77,81,84,84,5,194,0,60,5,17,0,0,0,0,0,1,49,0,17,73,111,116,65,112,112,49,47,101,73,70,107,117,84,72,66,56,0,10,72,97,106,120,72,122,117,56,109,115>>
2023-06-05T09:47:04.760000+08:00 [debug] 127.0.0.1:52182 [MQTT] RECV CONNECT(Q0, R0, D0, ClientId=1, ProtoName=MQTT, ProtoVsn=5, CleanStart=true, KeepAlive=60, Username=IotApp1/eIFkuTHB8, Password=)
2023-06-05T09:47:04.762000+08:00 [debug] 1@127.0.0.1:52182 [Redis] Auth ignored, Client: #{clientid => <<“1”>>,is_bridge => false,is_superuser => false,mountpoint => undefined,password => <<"“>>,peerhost => {127,0,0,1},protocol => mqtt,sockport => 1883,username => <<“IotApp1/eIFkuTHB8”>>,zone => external}
2023-06-05T09:47:04.766000+08:00 [debug] 1@127.0.0.1:52182 [MongoDB] Auth ignored, Client: #{clientid => <<“1”>>,is_bridge => false,is_superuser => false,mountpoint => undefined,password => <<”******">>,peerhost => {127,0,0,1},protocol => mqtt,sockport => 1883,username => <<“IotApp1/eIFkuTHB8”>>,zone => external}
2023-06-05T09:47:04.766000+08:00 [warning] 1@127.0.0.1:52182 [Channel] Client 1 (Username: ‘IotApp1/eIFkuTHB8’) login failed for not_authorized
2023-06-05T09:47:04.766000+08:00 [debug] 1@127.0.0.1:52182 [MQTT] SEND CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=135)
2023-06-05T09:47:04.767000+08:00 [info] 1@127.0.0.1:52182 file: emqx_connection.erl, line: 544, mfa: {emqx_connection,terminate,2}, msg: terminate, pid: <0.1529.0>, reason: {shutdown,not_authorized}