Closed UsernameUntaken closed 5 years ago
[root@izuf657neb0432diy535buz emqx]# ./bin/emqx_ctl plugins load emqx_kafka_bridge load plugin error: not_found =ALERT REPORT==== 25-Apr-2019::10:51:56.367197 === [Plugins] Plugin emqx_kafka_bridge not found [root@izuf657neb0432diy535buz emqx]#
You must put the code to -emqx_plugin(?MODULE).
in your emqx_kafka_bridge_app.erl. It can identify this application is a EMQ X plugin
/usr/local/emqx_tmp/emqx-rel/deps/emqx_kafka_bridge/src/emqx_kafka_bridge_app.erl
%%-------------------------------------------------------------------- %% Copyright (c) 2015-2017 Feng Lee feng@emqtt.io. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% http://www.apache.org/licenses/LICENSE-2.0 %% %% Unless required by applicable law or agreed to in writing, software %% distributed under the License is distributed on an "AS IS" BASIS, %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %% See the License for the specific language governing permissions and %% limitations under the License. %%--------------------------------------------------------------------
-module(emqx_kafka_bridge_app).
-behaviour(application).
%% Application callbacks -export([start/2, stop/1]).
start(_StartType, _StartArgs) -> {ok, Sup} = emqx_kafka_bridge_sup:start_link(), emqx_kafka_bridge:load(application:get_all_env()), {ok, Sup}.
stop(_State) -> emqx_kafka_bridge:unload().
@HJianBo
You must put the code to -emqx_plugin(?MODULE). in your emqx_kafka_bridge_app.erl. It can identify this application is a EMQ X plugin
这个插件是从github上引用的~~
Yes, but it is not adapt to EMQ X v3.1
Yes, but it is not adapt to EMQ X v3.1
就是说现在 3.1的版本扩展插件只是支持自己创建?不允许引入github的??
@UsernameUntaken
Hi, try to add the line -emqx_plugin(?MODULE).
to emqx_kafka_bridge_app.erl
. If it works, PR that repo or fork your own one.
@UsernameUntaken Hi, try to add the line -emqx_plugin(?MODULE). to emqx_kafka_bridge_app.erl. If it works, PR that repo or fork your own one.
你好~ 现在我尝试自己复制emqx_plugin_template创建EMQ插件,编译发布,也是加载不了,这是正常的吗? 冒昧问下,如果可以的话,麻烦您能给我提供下3.0版的压缩包吗~~ 万分感谢
@HJianBo @terry-xiaoyu
Hi, @UsernameUntaken We can't provide any packages for you.
Please paste more details or log to there when the new plugin loading failure.
And Have you followed the Plugin development guide?
@UsernameUntaken Hi, try to add the line -emqx_plugin(?MODULE). to emqx_kafka_bridge_app.erl. If it works, PR that repo or fork your own one. 谢谢,是我复制完又把原先的放上去覆盖了~~ 加上-emqx_plugin(?MODULE). 就可以加载了~~
Environment
Description
以前emq3.0的可以加载外部扩展插件,现在更新到最新的3.1,配置好怎么加载不了 A description of the issue emqx-rel/Makefile文件增加的 : DEPS += emqx_kafka_bridge 在下面这句上面增加的 DEPS += $(foreach dep,$(MAIN_APPS),$(call app_name,$(dep)))
dep_emqx_kafka_bridge = git https://github.com/bob403/emqx_kafka_bridge.git master 在下面这句上面增加的 $(foreach dep,$(MAINAPPS),$(eval dep$(call app_name,$(dep)) = $(CLONE_METHOD) https://github.com/emqx/$(dep) $(call app_vsn,$(dep))))
relx.config: {release, {emqx, "3.1"}, [ kernel, sasl, crypto, public_key, asn1, syntax_tools, ssl, xmerl, os_mon, inets, compiler, runtime_tools, {observer, load}, gproc, luerl, esockd, clique, cuttlefish, jsx, cowboy, pbkdf2, bcrypt, sqlparse, jpparse, emqx, getopt, {mnesia, load}, {ekka, load}, {emqx_sn, load}, {emqx_coap, load}, {emqx_lwm2m, load}, {emqx_recon, load}, {emqx_stomp, load}, {emqx_statsd, load}, {emqx_management, load}, {emqx_rule_engine, load}, {emqx_retainer, load}, {emqx_reloader, load}, {emqx_dashboard, load}, {emqx_delayed_publish, load}, {emqx_web_hook, load}, {emqx_lua_hook, load}, {emqx_auth_clientid, load}, {emqx_auth_username, load}, {emqx_auth_ldap, load}, {emqx_auth_http, load}, {emqx_auth_mongo, load}, {emqx_auth_mysql, load}, {emqx_auth_pgsql, load}, {emqx_auth_redis, load}, {emqx_auth_jwt, load}, {emqx_plugin_template, load}, {emqx_kafka_bridge, load}, {emqx_psk_file, load} ]}.
{include_src, false}.
{extended_start_script, false}.
{generate_start_script, false}.
{sys_config, false}.
{vm_args, false}.
{overlay_vars, "vars.config"}.
{overlay, [ {mkdir, "etc/"}, {mkdir, "log/"}, {mkdir, "data/"}, {mkdir, "data/mnesia"}, {mkdir, "data/configs"}, {mkdir, "data/scripts"}, {template, "bin/emqx_env", "bin/emqx_env"}, {template, "bin/emqx", "bin/emqx"}, {template, "bin/emqx_ctl", "bin/emqx_ctl"}, {template, "bin/emqx.cmd", "bin/emqx.cmd"}, {template, "bin/emqx_ctl.cmd", "bin/emqx_ctl.cmd"}, {copy, "rel/conf/plugins", "etc/"}, {copy, "deps/emqx/etc/certs", "etc/"}, {template, "rel/conf/emqx.conf", "etc/emqx.conf"}, {template, "rel/conf/vm.args", "etc/vm.args"}, {template, "rel/conf/ssl_dist.conf", "etc/ssl_dist.conf"}, {template, "rel/conf/plugins/emqx_coap.conf", "etc/plugins/emqx_coap.conf"}, {template, "rel/conf/plugins/emqx_lwm2m.conf", "etc/plugins/emqx_lwm2m.conf"}, {template, "rel/conf/plugins/emqx_psk_file.conf", "etc/plugins/emqx_psk_file.conf"}, {copy, "rel/conf/acl.conf", "etc/acl.conf"}, {copy, "data/loaded_plugins", "data/loaded_plugins"}, {copy, "bin/nodetool", "bin/nodetool"}, {copy, "rel/schema", "releases/{{rel_vsn}}/"}, {copy, "bin/install_upgrade_escript", "bin/install_upgrade_escript"}, {copy, "deps/cuttlefish/cuttlefish", "bin/"}, {copy, "deps/emqx_lwm2m/lwm2m_xml", "etc/"}, {copy, "deps/emqx_psk_file/etc/psk.txt", "etc/psk.txt"} ]}.