tsung_ws icon indicating copy to clipboard operation
tsung_ws copied to clipboard

"Module could not be loaded" error

Open ncolomer opened this issue 12 years ago • 3 comments

Hi Jan,

I'm facing an annoying "Module could not be loaded" error when running the benchmark according to the tutorial you described in the project's README.

Here is the stacktrace extracted from the [email protected] file :

=ERROR REPORT==== 27-Sep-2012::19:30:19 ===
** State machine <0.95.0> terminating 
** Last message in was {ssl,{sslsocket,5,<0.97.0>},
                            <<"HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: 13YSWplcdyC/rjZYDmr2CHpn3z4=\r\n\r\n">>}
** When State == wait_ack
**      Data  == {state_rcv,
                     {sslsocket,5,<0.97.0>},
                     {{0,0,0,0},0},
                     undefined,0,10000,"127.0.0.1",8080,ssl,
                     {proto_opts,negociate,10,600000,32768,32768,undefined,
                         undefined},
                     true,1,
                     {ts_request,parse,false,[],[],
                         {websocket_request,connect,"/ws",
                             "https://127.0.0.1/",<<>>},
                         false,undefined,undefined,undefined},
                     true,
                     {1348,767019,128147},
                     {1348,767019,120299},
                     10,11,false,
                     {1348,767019,128147},
                     {1348,767019,128147},
                     [],<<>>,
                     {websocket,initial,<<"13YSWplcdyC/rjZYDmr2CHpn3z4=">>,
                         undefined},
                     0,1,524288,524288,
                     {dyndata,
                         [{tsung_userid,"1"}],
                         {websocket_dyndata,undefined}},
                     ts_websocket,[],undefined,none}
** Reason for termination = 
** {'module could not be loaded',
       [{binary,longest_common_suffix,
            [[<<"HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: 13YSWplcdyC/rjZYDmr2CHpn3z4=\r\n\r\n">>,
              <<"\r\n\r\n">>]]},
        {ts_websocket,extract_accept,1},
        {ts_websocket,parse,2},
        {ts_client,handle_data_msg,2},
        {ts_client,handle_info,3},
        {gen_fsm,handle_msg,7},
        {proc_lib,init_p_do_apply,3}]}

This trace appears each time tsung attempts to connect through WebSocket.

I use the latest tsung 1.4.2 on an Ubuntu 10.04 64-bit VM.

Any idea ?

ncolomer avatar Sep 29 '12 09:09 ncolomer

Seven years later than you I encounter with the same problem :) I'm using Tsung 1.7.0 and erlang 18.3

nautics889 avatar Sep 07 '19 17:09 nautics889

Hey, I'm going to take a look at this soon, thanks for reporting!

wulczer avatar Nov 19 '19 09:11 wulczer

As mentioned in #6 Tsung 1.5.0 added native support for websocket connections, so you shouldn't need this extensions if you're using modern Tsung.

wulczer avatar Nov 26 '19 08:11 wulczer