1

一般来说,我是 ejabberd 和 XMPP 的新手。我在运行 Mountain Lion 的 Mac 上设置了 ejabberd。不幸的是,当我尝试使用 Adium 客户端连接到本地 ejabberd 服务器时,它会给出错误“服务器关闭连接”。

编辑:我从process one website 中提供的 OS X 安装程序安装了 ejabberd 。

以下是 ejabberd 日志:

=ERROR REPORT==== 2013-09-19 01:47:35 ===
** State machine <0.2118.0> terminating 
** Last event in was {xmlstreamelement,
                         {xmlelement,"starttls",
                             [{"xmlns","urn:ietf:params:xml:ns:xmpp-tls"}],
                             []}}
** When State == wait_for_feature_request
**      Data  == {state,{socket_state,gen_tcp,#Port<0.15371>,<0.2117.0>},
                        ejabberd_socket,#Ref<0.0.0.48234>,false,"533022348",
                        {sasl_state,"jabber","localhost",[],
                                    #Fun<ejabberd_c2s.1.52538782>,
                                    #Fun<ejabberd_c2s.2.77839348>,
                                    #Fun<ejabberd_c2s.3.97921512>,undefined,
                                    undefined},
                        c2s,c2s_shaper,false,true,false,false,
                        [verify_none,
                         {certfile,"/Applications/ejabberd-2.1.13/conf/server.pem"}],
                        false,undefined,[],"localhost",[],undefined,
                        {pres_t,0},
                        {pres_f,0},
                        {pres_a,0},
                        {pres_i,0},
                        undefined,undefined,undefined,false,
                        {userlist,none,[],false},
                        unknown,unknown,
                        {{127,0,0,1},59697},
                        [],[]}
** Reason for termination = 
** {{case_clause,{error,{open_error,-11}}},
    [{tls,tcp_to_tls,2},
     {ejabberd_socket,starttls,3},
     {ejabberd_c2s,wait_for_feature_request,2},
     {p1_fsm,handle_msg,10},
     {proc_lib,init_p_do_apply,3}]}

=ERROR REPORT==== 2013-09-19 01:47:40 ===
** State machine <0.2120.0> terminating 
** Last event in was {xmlstreamelement,
                         {xmlelement,"starttls",
                             [{"xmlns","urn:ietf:params:xml:ns:xmpp-tls"}],
                             []}}
** When State == wait_for_feature_request
**      Data  == {state,{socket_state,gen_tcp,#Port<0.15373>,<0.2119.0>},
                        ejabberd_socket,#Ref<0.0.0.48243>,false,"89255482",
                        {sasl_state,"jabber","localhost",[],
                                    #Fun<ejabberd_c2s.1.52538782>,
                                    #Fun<ejabberd_c2s.2.77839348>,
                                    #Fun<ejabberd_c2s.3.97921512>,undefined,
                                    undefined},
                        c2s,c2s_shaper,false,true,false,false,
                        [verify_none,
                         {certfile,"/Applications/ejabberd-2.1.13/conf/server.pem"}],
                        false,undefined,[],"localhost",[],undefined,
                        {pres_t,0},
                        {pres_f,0},
                        {pres_a,0},
                        {pres_i,0},
                        undefined,undefined,undefined,false,
                        {userlist,none,[],false},
                        unknown,unknown,
                        {{127,0,0,1},59698},
                        [],[]}
** Reason for termination = 
** {{case_clause,{error,{open_error,-11}}},
    [{tls,tcp_to_tls,2},
     {ejabberd_socket,starttls,3},
     {ejabberd_c2s,wait_for_feature_request,2},
     {p1_fsm,handle_msg,10},
     {proc_lib,init_p_do_apply,3}]}

您能帮我了解导致此错误的原因吗?

4

1 回答 1

1

经过多次不成功的试验后,我怀疑基于过程一提供的安装程序的 ejabberd 设置可能缺少某些内容。所以,我卸载了 ejabberd 并从 mac 端口重新安装了它。

sudo port selfupdate
sudo port install ejabberd

完成上述安装后,我注册了一个 id 为lefam@localhost的管理员。最后,我可以使用 Adium 成功连接到服务器。

于 2013-09-19T17:19:16.303 回答