http-bind crashes on connection attempt

I have been tring to get JWChat working with ejabberd and it looks like http-bind crashes when I try to connect with ejabberd. I tried Gajim too using a BOSH connection and get the same results. I have upgraded to ejabberd 2.1.5-1.el5 but it did not help. If anyone can help it would be very much appreciated. Here is what I see in the erlang.log file:

=CRASH REPORT==== 17-Aug-2010::17:52:21 ===
  crasher:
    pid: <0.15440.1>
    registered_name: []
    exception exit: {function_clause,
                        [{prim_inet,sockname,
                             [{http_bind,<0.15439.1>,
                                  {{xxx,xxx,xx,xx},59211}}]},
                         {ejabberd_net,gethostname,1},
                         {ejabberd_c2s,init,1},
                         {p1_fsm,init_it,6},
                         {proc_lib,init_p_do_apply,3}]}
      in function  p1_fsm:init_it/6
    initial call: gen:init_it/6
    ancestors: [ejabberd_c2s_sup,ejabberd_sup,<0.35.0>]
    messages: []
    links: [<0.205.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 233
    stack_size: 23
    reductions: 156
  neighbours:

=CRASH REPORT==== 17-Aug-2010::17:52:26 ===
  crasher:
    pid: <0.15438.1>
    registered_name: []
    exception exit: {noproc,
                        {gen_fsm,sync_send_all_state_event,
                            [<0.15439.1>,
                             {http_put,194748385308246,
                                 [{"xmlns",
                                   "http://jabber.org/protocol/httpbind"},
                                  {"newkey",
                                   "303bee2538191d77ac81c2d7cfde3e1487de969f"},
                                  {"hold","1"},
                                  {"ver","1.6"},
                                  {"ack","1"},
                                  {"route","jabber.uark.edu:5222"},
                                  {"wait","30"},
                                  {"content","text/xml; charset=utf-8"},
                                  {"to","my.jabber.server"},
                                  {"xml:lang","en"},
                                  {"rid","194748385308246"},
                                  {"xmpp:version","1.0"},
                                  {"xmlns:xmpp","urn:xmpp:xbosh"}],
                                 [],306,1,
                                 {"my.jabber.server","1.0"},
                                 {xxx,xxx,xx,xx},59211}},
                             30000]}}
      in function  gen_fsm:sync_send_all_state_event/3
      in call from ejabberd_http_bind:http_put/7
      in call from ejabberd_http_bind:handle_http_put/7
      in call from ejabberd_http:process/2
      in call from ejabberd_http:process_request/1
      in call from ejabberd_http:process_header/2
      in call from lists:foldl/3
      in call from ejabberd_http:receive_headers/1
    initial call: ejabberd_http:init/2
    ancestors: [ejabberd_http_sup,ejabberd_sup,<0.35.0>]
    messages: []
    links: [#Port<0.91831>,<0.209.0>,#Port<0.91830>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 4181
    stack_size: 23
    reductions: 2222
  neighbours:

=SUPERVISOR REPORT==== 17-Aug-2010::17:52:26 ===
     Supervisor: {local,ejabberd_http_sup}
     Context:    child_terminated
     Reason:     {noproc,
                     {gen_fsm,sync_send_all_state_event,
                         [<0.15439.1>,
                          {http_put,194748385308246,
                              [{"xmlns","http://jabber.org/protocol/httpbind"},
                               {"newkey",
                                "303bee2538191d77ac81c2d7cfde3e1487de969f"},
                               {"hold","1"},
                               {"ver","1.6"},
                               {"ack","1"},
                               {"route","jabber.uark.edu:5222"},
                               {"wait","30"},
                               {"content","text/xml; charset=utf-8"},
                               {"to","jabber.uark.edu"},
                               {"xml:lang","en"},
                               {"rid","194748385308246"},
                               {"xmpp:version","1.0"},
                               {"xmlns:xmpp","urn:xmpp:xbosh"}],
                              [],306,1,
                              {"jabber.uark.edu","1.0"},
                              {{130,184,12,20},59211}},
                          30000]}}
     Offender:   [{pid,<0.15438.1>},
                  {name,undefined},
                  {mfa,
                      {ejabberd_http,start_link,
                          [{gen_tcp,#Port<0.91830>},
                           [inet,
                            {request_handlers,[{["web"],mod_http_fileserver}]},
                            http_bind,http_poll,web_admin,tls,
                            {certfile,"/etc/pki/tls/certs/server.pem"},
                            {ip,{0,0,0,0}}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]

It works for me using: Gajim

It works for me using:

  • Gajim 0.13.1. Proxy: Type: BOSH; URL BOSH: http://localhost:5280/http-bind
  • ejabberd 2.1.5 compiled from source code with Erlang R13B04, configured with
    {listen, [
      {5280, ejabberd_http, [
                             http_bind,
                             web_admin
                            ]}
    
    ]}.
    

I see in the log:

=INFO REPORT==== 24-Aug-2010::00:39:06 ===
I(<0.490.0>:ejabberd_listener:232) : (#Port<0.4298>) Accepted connection {{127,0,0,1},46053} -> {{127,0,0,1},5280}

=INFO REPORT==== 24-Aug-2010::00:39:06 ===
I(<0.494.0>:ejabberd_http:138) : started: {gen_tcp,#Port<0.4298>}

INFO REPORT==== 24-Aug-2010::00:39:07 ===
I(<0.496.0>:ejabberd_c2s:716) : ({socket_state,ejabberd_http_bind,{http_bind,<0.495.0>,
{127,0,0,1},46053}},ejabberd_http_bind}) Accepted authentication for badlop by
ejabberd_auth_internal

=INFO REPORT==== 24-Aug-2010::00:39:07 ===
I(<0.496.0>:ejabberd_c2s:839) : ({socket_state,ejabberd_http_bind,{http_bind,<0.495.0>,
{127,0,0,1},46053}},ejabberd_http_bind}) Opened session for badlop@localhost/Gajim

=INFO REPORT==== 24-Aug-2010::00:39:39 ===
I(<0.490.0>:ejabberd_listener:232) : (#Port<0.4357>) Accepted connection
{{127,0,0,1},46060} -> {{127,0,0,1},5280}

http-bind problem fixed with ejabberd 2.1.5-4.el5

Badlop,
Thanks for your reply. I was running ejabberd 2.1.5-1.el5 in Red Hat Enterprise Linux, 64 bit. I installed ejabberd from the EPEL repository. lemenkov took a look at this issue and released ejabberd 2.1.5-4.el5. I updated to that version and the http-bind issue is fixed. Thanks lemenkov!

Syndicate content