superfeedr/ejabberd-websockets — Issue #7: Always empty response from ws-xmpp
Author: forrest-ua
Created: 2012-01-10 17:11:02+00:00
State: open

Hi,

I have installed from apt:
* ejabberd v. 2.1.6-2.1
* erlang v. 1:14.b.2-dfsg-3ubuntu2

ejabberd works normally, when I try to run demo from this package:
1) state freezing in "Connecting"
2) js log display this:
connecting...
Connection handler:
Connecting
Logger:_doDisconnect was called

and that's all

3) in ejabberd.log request is showed

=INFO REPORT==== 2012-01-10 19:03:35 ===
I(<0.621.0>:ejabberd_websocket:372) : Processing request:{wsrequest,
[{"Sec-WebSocket-Version",
"8"},
{"Sec-Websocket-Key",
"taXd18myYgyjKdl3Z1ZGmw=="},
{"Sec-WebSocket-Protocol",
"xmpp"},
{"Sec-Websocket-Origin",
"http://localhost"},
{'Host',
"localhost:5288"},
{'Connection',
"Upgrade"},
{'Upgrade',
"websocket"}],
undefined,false,
'GET',
["ws-xmpp"],
#Port<0.3924>,
gen_tcp,undefined}:{state,
gen_tcp,
#Port<0.3924>,
'GET',
{1,
1},
{abs_path,
"/ws-xmpp"},
undefined,
true,
undefined,
"en",
[{["ws-xmpp"],
mod_websocket}],
"localhost:5288",
undefined,
undefined,
[{"Sec-WebSocket-Version",
"8"},
{"Sec-Websocket-Key",
"taXd18myYgyjKdl3Z1ZGmw=="},
{"Sec-WebSocket-Protocol",
"xmpp"},
{"Sec-Websocket-Origin",
"http://localhost"},
{'Host',
"localhost:5288"},
{'Connection',
"Upgrade"},
{'Upgrade',
"websocket"}],
false,
<<>>,
undefined,
[]}

4) periodically but not all the time in erlang.log I see such crash reports:

=CRASH REPORT==== 10-Jan-2012::14:21:40 ===
crasher:
initial call: ejabberd_websocket:init/2
pid: <0.504.0>
registered_name: []
exception exit: {noproc,
{gen_fsm,sync_send_all_state_event,
[undefined,
{wsr,#Port<0.3908>,gen_tcp,undefined,
[{xmlstreamend,"stream:stream"}]}]}}
in function gen_fsm:sync_send_all_state_event/2
in call from ejabberd_xmpp_websocket:process_request/5
in call from ejabberd_websocket:process_header/2
in call from ejabberd_websocket:receive_headers/1
ancestors: [ejabberd_websocket_sup,ejabberd_sup,<0.37.0>]
messages: []
links: [#Port<0.3908>,<0.366.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 987
stack_size: 24
reductions: 329
neighbours:

=SUPERVISOR REPORT==== 10-Jan-2012::14:21:40 ===
Supervisor: {local,ejabberd_websocket_sup}
Context: child_terminated
Reason: {noproc,
{gen_fsm,sync_send_all_state_event,
[undefined,
{wsr,#Port<0.3908>,gen_tcp,undefined,
[{xmlstreamend,"stream:stream"}]}]}}
Offender: [{pid,<0.504.0>},
{name,undefined},
{mfargs,{ejabberd_websocket,start_link,undefined}},
{restart_type,temporary},
{shutdown,brutal_kill},
{child_type,worker}]

Please, could you give me some advice about this?