wulczer/tsung_ws

"Module could not be loaded" error

Opened this issue · 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 tsung_controller@lucid64.log 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 ?

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

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

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.