On replay why do I get the error "WebTcpipConnect(WinSock: 10061 - Connection refused, 127.0.0.1")?
When recording against certain TCP/IP based applications, for example a browser generating http, the following traffic may be recorded e.g.:
WebTcpipConnect(hWeb0, "127.0.0.1", 55486);
In the above example the generated TCP/IP traffic is application-internal communication within the client (identifiable by the internal loop back address 127.0.0.1) and should be commented out. During replay this will most likely generate errors as the client will probably not be open, be in the necessary state to accept connections, or will not accept connections from multiple virtual users.
If the client-side request/calls are not removed from the script then it can lead to replay errors such as:
WebTcpipConnect(WinSock: 10061 - Connection refused, 127.0.0.1:55486)
To resolve the error you should either delete the calls from the script or suppress the recording of the client only TCP/IP traffic. Using the above example the port number that needs to be suppressed is 55486, therefore you should go to:
SETTINGS | SYSTEM | RECORDER | PROXIES | SOCKS | EDIT | SUPPRESS RECORDING
and enter the port number.
Please note: If the client side port allocation is dynamic then you can suppress a port range e.g. 55000-65535.
If the port mentioned in the loop back address is 5152 specifically
WebTcpipConnect(hWeb0, "127.0.0.1", 5152);
Then it is possible to disable the "During replay why do I get the error "WebTcpipConnect (WinSock: 10061 - Connection refused, 127.0.0.1") on port 5152 specifically?" service which is causing this.
Additionally there is an option in the settings to exclude local traffic which stops loopback and local IP traffic being redirected through the recorder. This will also stop these TCP/IP functions being captured.
Settings | System | Recorder | Application Profile | IE | Web Settings | Exclude Local Traffic.