【问题标题】:MongooseIM create_room command not knownMongooseIM create_room 命令未知
【发布时间】:2016-02-22 08:21:20
【问题描述】:

我是 MongooseIM 的新人。 我已经设置了服务器并且能够在两个用户之间交换消息。 现在我正在尝试设置服务器以启用 MUC。

我在 ejabberd.conf 文件中启用了 mod_muc。 在执行 create_room 命令时,错误提示:

mongooseimctl create_room test

command “create_room” not known

有什么我可能会丢失的东西。 我查了ejabberdctl command "create_room" not known,但那里的解决方案没有奏效。有没有特定于 MongooseIM 的东西?

启用的模块:

%%%.   =======
%%%'   MODULES

%%
%% Modules enabled in all ejabberd virtual hosts.
%% For list of possible modules options, check documentation.
%%
{modules,
 [
  {mod_admin_extra, [{submods, [node, accounts, sessions, vcard,
                                roster, last, private, stanza, stats]}]},
  {mod_adhoc, []},
  {mod_disco, []},
  {mod_last, []},
  {mod_stream_management, [
                           % default 100
                           % size of a buffer of unacked messages
                           % {buffer_max, 100}

                           % default 1 - server sends the ack request after each stanza
                           % {ack_freq, 1}

                           % default: 600 seconds
                           % {resume_timeout, 600}
                          ]},
  {mod_muc, [
             {host, "muc.@HOST@"},
             {access, all},
             {access_create, all}
            ]},
  {mod_muc_log,
        [
        {outdir, "/tmp/muclogs"},
        {access_log, muc}
        ]},
  {mod_offline, [{access_max_user_messages, max_user_offline_messages}]},
  {mod_privacy, []},
  {mod_private, []},
% {mod_private, [{backend, mnesia}]},
% {mod_private, [{backend, odbc}]},
  {mod_register, [
                  %%
                  %% Set the minimum informational entropy for passwords.
                  %%
                  %%{password_strength, 32},

                  %%
                  %% After successful registration, the user receives
                  %% a message with this subject and body.
                  %%
                  {welcome_message, {""}},

                  %%
                  %% When a user registers, send a notification to
                  %% these XMPP accounts.
                  %%
                  %{registration_watchers, ["admin@localhost"]},

                  %%
                  %% Only clients in the server machine can register accounts
                  %%
                  {ip_access, [
                               {allow, "0.0.0.0/0"}]},

                  %%
                  %% Local c2s or remote s2s users cannot register accounts
                  %%
                  %%{access_from, deny},

                  {access, register}
                 ]},
  {mod_roster, []},
  {mod_sic, []},
  {mod_vcard, [%{matches, 1},
%{search, true},
%{host, directory.@HOST@}
]},

更新:移至 ejabberd。在 ejabberd 中启用的模块:

%%%   =======
%%%   MODULES

%%
%% Modules enabled in all ejabberd virtual hosts.
%%
{modules,
 [
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]}, % requires mod_adhoc
  {mod_caps,     []},
  {mod_configure,[]}, % requires mod_adhoc
  {mod_admin_extra, []},
  {mod_disco,    []},
  %%{mod_echo,   [{host, "echo.localhost"}]},
  {mod_irc,      []},
  %% NOTE that mod_http_fileserver must also be enabled in the
  %% "request_handlers" clause of the "ejabberd_http" listener
  %% configuration (see the "LISTENING PORTS" section above).
  %%{mod_http_fileserver, [
  %%                       {docroot, "/var/www"},
  %%                       {accesslog, "/var/log/ejabberd/access.log"}
  %%                      ]},
  {mod_last,     []},
  {mod_muc,      [
                  %%{host, "conference.@HOST@"},
                  {access, muc},
                  {access_create, muc},
                  {access_persistent, muc},
                  {access_admin, muc_admin},
                  {max_users, 500}
                 ]},
  %%{mod_muc_log,[]},
  {mod_offline,  [{access_max_user_messages, max_user_offline_messages}]},
  {mod_privacy,  []},
  {mod_private,  []},
  {mod_proxy65,  [
                  {access, local},
                  {shaper, c2s_shaper}
                 ]},
  {mod_pubsub,   [ % requires mod_caps
                  {access_createnode, pubsub_createnode},
                  {pep_sendlast_offline, false},
                  {last_item_cache, false},
                  %%{plugins, ["default", "pep"]}
                  {plugins, ["flat", "hometree", "pep"]}  % pep requires mod_caps
                 ]},
  {mod_register, [
                  %%
                  %% After successful registration, the user receives
                  %% a message with this subject and body.
                  %%
                  {welcome_message, {"Welcome!",
                                     "Welcome to a Jabber service powered by Debian. "
                                     "For information about Jabber visit "
                                     "http://www.jabber.org"}},
                  %% Replace it with 'none' if you don't want to send such message:
                  %%{welcome_message, none},

                  %%
                  %% When a user registers, send a notification to
                  %% these Jabber accounts.
                  %%
                  %%{registration_watchers, ["admin1@example.org"]},

                  {access, register}
                 ]},
  {mod_roster,   []},
  %%{mod_service_log,[]},
  %%{mod_shared_roster,[]},
  {mod_stats,    []},
  {mod_time,     []},
  {mod_vcard,    []},
  {mod_version,  []}
 ]}.

【问题讨论】:

    标签: xmpp ejabberd mongoose-im


    【解决方案1】:

    正如您引用的链接中提到的,我认为您必须使用 ejabberd 才能从该 API(以及更多)中受益。

    【讨论】:

    • 我现在正在使用 ejabberd。 Mod_muc 和 mod_admin_extra : [] 已启用。我仍然没有在 ejabberdctl 中看到 create_room 选项。在 ejabberd 中启用了模块的更新帖子
    • 谢谢!我从源代码构建了 ejabberd 并启用了 mod_muc_admin 并且现在能够创建房间。 :)
    【解决方案2】:

    创建房间需要使用REST API,请查看官方文档-https://mongooseim.readthedocs.io/en/2.0.0/REST-API。另请注意本页末尾的 Swagger Doc

    【讨论】:

      猜你喜欢
      • 2015-09-13
      • 2014-03-08
      • 1970-01-01
      • 1970-01-01
      • 2023-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多