【问题标题】:Converse.js don't want to connect localhost ejabberdConverse.js 不想连接本地主机 ejabberd
【发布时间】:2016-03-18 08:30:52
【问题描述】:

我在我的调试机器上用下一个 ejabberd.cfg 配置了 ejabberd:

override_local.
{acl, admin, {user, "admin", "localhost"}}.
{hosts, ["localhost"]}.
{loglevel, 4}.
{listen,
 [
  {5222, ejabberd_c2s, [
            {access, c2s},
            {shaper, c2s_shaper},
            {max_stanza_size, 65536},
                        %%zlib,
            starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
               ]},

  {5269, ejabberd_s2s_in, [
               {shaper, s2s_shaper},
               {max_stanza_size, 131072}
              ]},
  {5280, ejabberd_http, [
                         {request_handlers, [
                                             {["xmpp-httpbind"], mod_http_bind}
                          ]},
                          http_bind,
                          http_poll,
                          web_admin
   ]}
]}.
{auth_method, internal}.
{shaper, normal, {maxrate, 1000}}.
{shaper, fast, {maxrate, 50000}}.
{acl, local, {user_regexp, ""}}.
{access, max_user_sessions, [{10, all}]}.
{access, max_user_offline_messages, [{5000, admin}, {100, all}]}. 
{access, local, [{allow, local}]}.
{access, c2s, [{deny, blocked},
           {allow, all}]}.
{access, c2s_shaper, [{none, admin},
              {normal, all}]}.
{access, s2s_shaper, [{fast, all}]}.
{access, announce, [{allow, admin}]}.
{access, configure, [{allow, admin}]}.
{access, muc_admin, [{allow, admin}]}.
{access, muc, [{allow, all}]}.
{access, register, [{allow, all}]}.
{access, pubsub_createnode, [{allow, all}]}.
{language, "en"}.
{modules,
 [
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]}, % requires mod_adhoc
  {mod_caps,     []},
  {mod_configure,[]}, % requires mod_adhoc
  {mod_admin_extra, []},
  {mod_disco,    []},
  {mod_irc,      []},
  {mod_last,     []},
  {mod_muc,      [
          %%{host, "conference.@HOST@"},
          {access, muc},
          {access_create, muc},
          {access_persistent, muc},
          {access_admin, muc_admin},
          {max_users, 500}
         ]},
  {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, [
          {welcome_message, {"Welcome!",
                     "Welcome to a Jabber service powered by Debian. "
                     "For information about Jabber visit "
                     "http://www.jabber.org"}},
          {access, register}
         ]},
  {mod_roster,   []},
  {mod_stats,    []},
  {mod_time,     []},
  {mod_vcard,    []},
  {mod_version,  []}
 ]}.

现在我可以通过 Pidgin 客户端成功登录和注册了。但是,当我按照here 的描述使用 bosh_service_url "http://localhost:5280/http-bind/" 启动 conversejs 客户端并尝试使用现有帐户登录时,converse js 会挂起并且什么也不做。注册也不可用。我哪里错了?

【问题讨论】:

    标签: ejabberd


    【解决方案1】:

    您在配置文件中将处理程序定义为“xmpp-httpbind”。

    您的 BOSH URL 端点应该是:“http://localhost:5280/xmpp-httpbind/

    【讨论】:

    • 在“获取注册表单”按钮单击“xmpp 提供者的域名”上的“localhost”值并以用户身份使用 admin@localhost 登录时挂起后仍然有“internal-server-error”跨度>
    • 您使用的是哪个 ejabberd 版本?你在 ejabberd 日志中有什么?
    猜你喜欢
    • 1970-01-01
    • 2018-04-19
    • 1970-01-01
    • 2012-03-22
    • 2020-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多