Highlighted
Contributor.. Contributor..
Contributor..
390 views

loadrunner winsock error in recording

Hi, may you advise me what is wrong here. I am trying recording a winsock app but the generated script is just like this:

Action()
{

    lrs_create_socket("socket0", "TCP", "LocalHost=6400", "Backlog=1", LrsLastArg);

    lrs_close_socket("socket0");

    return 0;
}

  • loadrunner 12.53
  • application is QT 5.5.1 based for windows 32-bit

in the script directory, the file ws_codgen.log is showing many errors:

WSFilter: Init: data wsSocketSort
SocketSort: 0: session id error
SocketSort
SocketSort: 1: session id error
SocketSort
SocketSort: 2: session id error
SocketSort
SocketSort: 3: session id - 1: wplus_listen
SocketSort: 3: bind port: 6400
SocketSort
SocketSort
SocketSort: 5: session id - 2: wplus_listen
SocketSort: 5: bind port: 6400
SocketSort: 5: port number already exists
SocketSort
SocketSort
SocketSort: 7: session id - 3: wplus_listen_ipng
SocketSort: 7: bind port: 6400
SocketSort: 7: port number already exists
SocketSort
SocketSort
SocketSort: 9: session id - 4: wplus_listen_ipng
SocketSort: 9: bind port: 6400
SocketSort: 9: port number already exists
SocketSort
SocketSort: 10: session id - 5: wplus_accept_ipng
SocketSort
SocketSort: 11: session id - 5: wplus__send_recv
SocketSort: 11: set winsock
SocketSort
SocketSort: 12: session id - 5: wplus__send_recv
SocketSort
SocketSort: 13: session id - 5: wplus__send_recv
SocketSort
SocketSort: 14: session id - 5: wplus__send_recv
SocketSort
SocketSort: 15: session id - 5: wplus__send_recv
SocketSort
SocketSort: 16: session id - 5: wplus__send_recv
SocketSort
SocketSort: 17: session id - 5: wplus__send_recv
SocketSort
SocketSort: 18: session id - 5: wplus__send_recv
SocketSort
SocketSort: 19: session id - 5: wplus__send_recv
SocketSort
SocketSort: 20: session id - 5: wplus__send_recv
SocketSort
SocketSort: 21: session id - 5: wplus__send_recv
SocketSort
SocketSort: 22: session id - 5: wplus__send_recv
SocketSort
SocketSort: 23: session id - 5: wplus__send_recv
SocketSort
SocketSort: 24: session id - 5: wplus__send_recv
SocketSort
SocketSort: 25: session id - 5: wplus__send_recv
SocketSort
SocketSort: 26: session id - 5: wplus__send_recv
SocketSort
SocketSort: 27: session id - 5: wplus__send_recv
SocketSort
SocketSort: 28: session id - 5: wplus__send_recv
SocketSort
SocketSort: 29: session id - 5: wplus__send_recv
SocketSort
SocketSort: 30: session id - 5: wplus__send_recv
SocketSort
SocketSort: 31: session id - 5: wplus__send_recv
SocketSort
SocketSort: 32: session id - 5: wplus__send_recv
WSFilter
WSFilter: 0: session id error
WSFilter
WSFilter: 0: session id error
WSFilter
WSFilter: 0: session id error
WSFilter
WSFilter: 0: session id - 1: wplus_listen
WSFilter: 0: add socket0
WSFilter
WSFilter: 1: session id 1: wplus_close_socket
WSFilter: 1: close socket0
WSFilter
WSFilter: 2: session id - 2: wplus_listen
WSFilter: 2: not winsock
WSFilter
WSFilter: 3: session id 2: wplus_close_socket
WSFilter: 3: not winsock
WSFilter
WSFilter: 4: session id - 3: wplus_listen
WSFilter: 4: not winsock
WSFilter
WSFilter: 5: session id 3: wplus_close_socket
WSFilter: 5: not winsock
WSFilter
WSFilter: 6: session id - 4: wplus_listen
WSFilter: 6: not winsock
WSFilter
WSFilter: 7: session id - 5: wplus_accept
WSFilter: 7: missing socket
WSFilter
WSFilter: 8: session id - 5: wplus_recv
WSFilter: 8: socket wasn't initialized
WSFilter
WSFilter: 9: session id - 5: wplus_send
WSFilter: 9: socket wasn't initialized
WSFilter
WSFilter: 10: session id - 5: wplus_recv
WSFilter: 10: socket wasn't initialized
WSFilter
WSFilter: 11: session id - 5: wplus_recv
WSFilter: 11: socket wasn't initialized
WSFilter
WSFilter: 12: session id - 5: wplus_send
WSFilter: 12: socket wasn't initialized
WSFilter
WSFilter: 13: session id - 5: wplus_recv
WSFilter: 13: socket wasn't initialized
WSFilter
WSFilter: 14: session id - 5: wplus_recv
WSFilter: 14: socket wasn't initialized
WSFilter
WSFilter: 15: session id - 5: wplus_recv
WSFilter: 15: socket wasn't initialized
WSFilter
WSFilter: 16: session id - 5: wplus_recv
WSFilter: 16: socket wasn't initialized
WSFilter
WSFilter: 17: session id - 5: wplus_recv
WSFilter: 17: socket wasn't initialized
WSFilter
WSFilter: 18: session id - 5: wplus_recv
WSFilter: 18: socket wasn't initialized
WSFilter
WSFilter: 19: session id - 5: wplus_recv
WSFilter: 19: socket wasn't initialized
WSFilter
WSFilter: 20: session id - 5: wplus_recv
WSFilter: 20: socket wasn't initialized
WSFilter
WSFilter: 21: session id - 5: wplus_recv
WSFilter: 21: socket wasn't initialized
WSFilter
WSFilter: 22: session id - 5: wplus_recv
WSFilter: 22: socket wasn't initialized
WSFilter
WSFilter: 23: session id - 5: wplus_send
WSFilter: 23: socket wasn't initialized
WSFilter
WSFilter: 24: session id - 5: wplus_recv
WSFilter: 24: socket wasn't initialized
WSFilter
WSFilter: 25: session id - 5: wplus_recv
WSFilter: 25: socket wasn't initialized
WSFilter
WSFilter: 26: session id - 5: wplus_send
WSFilter: 26: socket wasn't initialized
WSFilter
WSFilter: 27: session id - 5: wplus_send
WSFilter: 27: socket wasn't initialized
WSFilter
WSFilter: 28: session id - 5: wplus_recv
WSFilter: 28: socket wasn't initialized
WSFilter
WSFilter: 29: session id - 5: wplus_recv
WSFilter: 29: socket wasn't initialized

 

outcome from recording events are:

------------------------------------------------------------------------------------------
| HP - LoadRunner Recording Log File |
| Date Generated : Mon Jul 11 15:31:56 2016 |
------------------------------------------------------------------------------------------

[Op#: 1]------------------------------------------------------------------------------
Record Section : Action

[Op#: 2]------------------------------------------------------------------------------
Start Record : 1

[Op#: 3]------------------------------------------------------------------------------
Api Event (0) : Id=WPLUS Proc=2898:0f18 Start=6748468 End=6748468 Duration=0 msec
Operation Name : wplus_gethostbyname
Argument# 1 IN : [name] = "Ayounis"
Argument# 2 IN : [ipaddress] = 192.168.1.70 (4601a8c0)
Return Value : (void)

[Op#: 4]------------------------------------------------------------------------------
Api Event (1) : Id=WPLUS Proc=2898:0828 Start=6748734 End=6748734 Duration=0 msec
Operation Name : wplus_gethostbyname_ipng
Argument# 1 IN : [name] = "Ayounis"
Argument# 2 IN : [family] = 23
Argument# 3 IN : [flowinfo] = 0
Argument# 4 IN : [addr] = Array[0:16]{ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" }
Argument# 5 IN : [scope_id] = 0
Return Value : (void)

[Op#: 5]------------------------------------------------------------------------------
Api Event (2) : Id=WPLUS Proc=2898:0828 Start=6748734 End=6748734 Duration=0 msec
Operation Name : wplus_gethostbyname_ipng
Argument# 1 IN : [name] = "Ayounis"
Argument# 2 IN : [family] = 23
Argument# 3 IN : [flowinfo] = 0
Argument# 4 IN : [addr] = Array[0:16]{ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" }
Argument# 5 IN : [scope_id] = 0
Return Value : (void)

[Op#: 6]------------------------------------------------------------------------------
Api Event (3) : Id=WPLUS Proc=2898:28c8 Start=6748812 End=6748812 Duration=0 msec
Operation Name : wplus_listen
Argument# 1 IN : [session_id] = ->1
Argument# 1 OUT : [session_id] = ->1
Argument# 2 IN : [ipaddress] = ->0.0.0.0 (00000000)
Argument# 2 OUT : [ipaddress] = ->0.0.0.0 (00000000)
Argument# 3 IN : [portnum] = ->6400
Argument# 3 OUT : [portnum] = ->6400
Argument# 4 IN : [flags] = 1
Return Value : (void)

[Op#: 7]------------------------------------------------------------------------------
Api Event (4) : Id=WPLUS Proc=2898:28c8 Start=6748812 End=6748812 Duration=0 msec
Operation Name : wplus_close
Argument# 1 IN : [session_id] = 1
Return Value : (void)

[Op#: 8]------------------------------------------------------------------------------
Api Event (5) : Id=WPLUS Proc=2898:28c8 Start=6748812 End=6748812 Duration=0 msec
Operation Name : wplus_listen
Argument# 1 IN : [session_id] = ->2
Argument# 1 OUT : [session_id] = ->2
Argument# 2 IN : [ipaddress] = ->127.0.0.1 (0100007f)
Argument# 2 OUT : [ipaddress] = ->127.0.0.1 (0100007f)
Argument# 3 IN : [portnum] = ->6400
Argument# 3 OUT : [portnum] = ->6400
Argument# 4 IN : [flags] = 1
Return Value : (void)

[Op#: 9]------------------------------------------------------------------------------
Api Event (6) : Id=WPLUS Proc=2898:28c8 Start=6748812 End=6748812 Duration=0 msec
Operation Name : wplus_close
Argument# 1 IN : [session_id] = 2
Return Value : (void)

[Op#: 10]------------------------------------------------------------------------------
Api Event (7) : Id=WPLUS Proc=2898:28c8 Start=6748812 End=6748812 Duration=0 msec
Operation Name : wplus_listen_ipng
Argument# 1 IN : [session_id] = 3
Argument# 2 IN : [family] = 23
Argument# 3 IN : [flowinfo] = 0
Argument# 4 IN : [addr] = Array[0:16]{ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }
Argument# 5 IN : [scope_id] = 0
Argument# 6 IN : [portnum] = ->6400
Argument# 6 OUT : [portnum] = ->6400
Argument# 7 IN : [flags] = 1
Return Value : (void)

[Op#: 11]------------------------------------------------------------------------------
Api Event (8) : Id=WPLUS Proc=2898:28c8 Start=6748812 End=6748828 Duration=16 msec
Operation Name : wplus_close
Argument# 1 IN : [session_id] = 3
Return Value : (void)

[Op#: 12]------------------------------------------------------------------------------
Api Event (9) : Id=WPLUS Proc=2898:28c8 Start=6748828 End=6748828 Duration=0 msec
Operation Name : wplus_listen_ipng
Argument# 1 IN : [session_id] = 4
Argument# 2 IN : [family] = 23
Argument# 3 IN : [flowinfo] = 0
Argument# 4 IN : [addr] = Array[0:16]{ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }
Argument# 5 IN : [scope_id] = 0
Argument# 6 IN : [portnum] = ->6400
Argument# 6 OUT : [portnum] = ->6400
Argument# 7 IN : [flags] = 1
Return Value : (void)

[Op#: 13]------------------------------------------------------------------------------
Api Event (10) : Id=WPLUS Proc=2898:28c8 Start=6775171 End=6775171 Duration=0 msec
Operation Name : wplus_accept_ipng
Argument# 1 IN : [session_id] = 5
Argument# 2 IN : [family] = 23
Argument# 3 IN : [flowinfo] = 0
Argument# 4 IN : [addr] = Array[0:16]{ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }
Argument# 5 IN : [scope_id] = 0
Argument# 6 IN : [local_portnum] = 6400
Argument# 7 IN : [remote_family] = 0
Argument# 8 IN : [remote_flowinfo] = 0
Argument# 9 IN : [remote_addr6] = Array[0:16]{ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }
Argument# 10 IN : [remote_scope_id] = 0
Argument# 11 IN : [remote_portnum] = 0
Return Value : (void)

0 Likes
1 Reply
Highlighted
Honored Contributor.
Honored Contributor.

Re: loadrunner winsock error in recording

Hi,

The argument of backlog indicates that teh application you've recorded is doing listen and wait for incoming connections.

But there is no lrs_accept_connection function on that socket till the close.

 

In the recording log ther eis socket number that is identified as not socket that accept a connection. I don't know why and I would suggest you open a support case to understand the reason behid it as all of the received data is happening as a result of this accept connection.

Maybe it is localhost that is getting excluded.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.