我在vernemq中启用插件时收到此错误
>>> chr(222)
'\xde'
>>> chr(222).isalpha()
False
>>> 222 < 128
False
>>>
我用来启用插件的命令是:
RPC to 'dev1@127.0.0.1' failed: {'EXIT',
{{{badmatch,
{error,
{http_to_mqtt,
{{shutdown,
{failed_to_start_child,
http_to_mqtt_web,
{'EXIT',
{{case_clause,
{error,
{undef,
[{httpd_util,rfc1123_date,[],[]},
{mochiweb_clock,handle_info,2,
[{file,
"src/mochiweb_clock.erl"},
{line,88}]},
{mochiweb_clock,init,1,
[{file,
"src/mochiweb_clock.erl"},
{line,69}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},
{line,306}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},
{line,237}]}]}}},
[{mochiweb_http,ensure_started,1,
[{file,"src/mochiweb_http.erl"},
{line,76}]},
{mochiweb_http,start,1,
[{file,"src/mochiweb_http.erl"},
{line,68}]},
{supervisor,do_start_child,2,
[{file,"supervisor.erl"},
{line,314}]},
{supervisor,start_children,3,
[{file,"supervisor.erl"},
{line,297}]},
{supervisor,init_children,2,
[{file,"supervisor.erl"},
{line,263}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},
{line,306}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},
{line,237}]}]}}}},
{http_to_mqtt_app,start,
[normal,[]]}}}}},
[{vmq_plugin_mgr,start_plugin,1,
[{file,
"/Users/sunnyjain/Desktop/vernemq/_build/default/lib/vmq_plugin/src/vmq_plugin_mgr.erl"},
{line,489}]},
{vmq_plugin_mgr,start_plugins,1,
[{file,
"/Users/sunnyjain/Desktop/vernemq/_build/default/lib/vmq_plugin/src/vmq_plugin_mgr.erl"},
{line,471}]},
{vmq_plugin_mgr,load_plugins,2,
[{file,
"/Users/sunnyjain/Desktop/vernemq/_build/default/lib/vmq_plugin/src/vmq_plugin_mgr.erl"},
{line,410}]},
{vmq_plugin_mgr,update_plugins,2,
[{file,
"/Users/sunnyjain/Desktop/vernemq/_build/default/lib/vmq_plugin/src/vmq_plugin_mgr.erl"},
{line,354}]},
{vmq_plugin_mgr,handle_plugin_call,2,
[{file,
"/Users/sunnyjain/Desktop/vernemq/_build/default/lib/vmq_plugin/src/vmq_plugin_mgr.erl"},
{line,183}]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,607}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,639}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,237}]}]},
{gen_server,call,
[vmq_plugin_mgr,
{enable_plugin,http_to_mqtt,
[{paths,
["/Users/sunnyjain/Desktop/practice/http_to_mqtt"]}]},
infinity]}}}
如果我的PATH变量包含以下路径,那么我没有收到上述错误
vmq-admin plugin enable -n http_to_mqtt -p /Users/sunnyjain/Desktop/http_to_mqtt
但是当我改变路径
时/Users/sunnyjain/Desktop/vernemq/_build/default/rel/vernemq/bin
然后我收到了错误。有人能告诉我为什么错误即将到来以及“默认”节点的启用插件与“dev1”节点启用它的方式有何不同。插件如何依赖于节点。
答案 0 :(得分:2)
此错误即将发生,因为inets应用程序未启动。
要在vernemq中启用inets,您可以键入以下命令
vmq-admin plugin enable -n inets --path /usr/local/lib/erlang/lib/inets-5.10.6
这将删除错误。