title: Adium connect to local ejabberd server on OS X Mountain Lion
body: <p>I am new in ejabberd and XMPP in general. I have setup ejabberd on a mac running Mountain Lion.
  Unfortunately when I try to connect to the local ejabberd server using Adium client, it gives the error "<strong>Server closed the connection</strong>".</p>
  
  <p>EDIT: I installed ejabberd from the <a href="http://www.process-one.net/en/ejabberd/downloads/" rel="nofollow">installer for OS X provided in process one website</a>.</p>
  
  <p>Below is the ejabberd log:</p>
  
  <pre><code>=ERROR REPORT==== 2013-09-19 01:47:35 ===
  ** State machine &lt;0.2118.0&gt; 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&lt;0.15371&gt;,&lt;0.2117.0&gt;},
                          ejabberd_socket,#Ref&lt;0.0.0.48234&gt;,false,"533022348",
                          {sasl_state,"jabber","localhost",[],
                                      #Fun&lt;ejabberd_c2s.1.52538782&gt;,
                                      #Fun&lt;ejabberd_c2s.2.77839348&gt;,
                                      #Fun&lt;ejabberd_c2s.3.97921512&gt;,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 &lt;0.2120.0&gt; 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&lt;0.15373&gt;,&lt;0.2119.0&gt;},
                          ejabberd_socket,#Ref&lt;0.0.0.48243&gt;,false,"89255482",
                          {sasl_state,"jabber","localhost",[],
                                      #Fun&lt;ejabberd_c2s.1.52538782&gt;,
                                      #Fun&lt;ejabberd_c2s.2.77839348&gt;,
                                      #Fun&lt;ejabberd_c2s.3.97921512&gt;,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}]}
  </code></pre>
  
  <p>Can you help me to understand what is causing this error?</p>