Menu

#253 Recording TCP in-app traffic - No current request

3.12
open
nobody
1
2015-09-30
2015-09-30
Kirill
No

Hello, I am start to learning The Grinder not long ago. I need to record binary in-app traffic. This application use TCP protocol and i use socket connection.

There are my recording params:
"call setGrinderEnv.cmd
java -cp %CLASSPATH% net.grinder.TCPProxy -console -http -remotehost (server) -remoteport (port) -localport 8001 > grinder.py"

Error in console:
"C:\grinder>call setGrinderEnv.cmd

C:\grinder>set GRINDERPATH=C:\grinder

C:\grinder>set GRINDERPROPERTIES=C:\grinder\grinder.properties

C:\grinder>set CLASSPATH=C:\grinder\lib\grinder.jar;C:\grinder\lib\grinder.jar;

C:\grinder>java -cp C:\grinder\lib\grinder.jar;C:\grinder\lib\grinder.jar; net.g
rinder.TCPProxy -console -http -remotehost keys.ascon.ru -remoteport 55555 -loca
lport 8001 1>grinder.py
15:46:25.215 [main] INFO : Initialising as a TCP port forwarder with the paramet
ers:
Request filters: HTTPRequestFilter
Response filters: HTTPResponseFilter
Local address: localhost:8001
Remote address: (server):(port)
15:46:26.067 [main] INFO : Engine initialised, listening on port 8001
15:46:37.789 [Filter thread for (server):(port)] ERROR: UNE
XPECTED - No current request"
So much times this error. After this I pressed stop button, and check the grinder.py:
"# The Grinder 3.11

HTTP script recorded by TCPProxy at 30.09.2015 15:46:25

from net.grinder.script import Test
from net.grinder.script.Grinder import grinder
from net.grinder.plugin.http import HTTPPluginControl, HTTPRequest
from HTTPClient import NVPair
connectionDefaults = HTTPPluginControl.getConnectionDefaults()
httpUtilities = HTTPPluginControl.getHTTPUtilities()

To use a proxy server, uncomment the next line and set the host and port.

connectionDefaults.setProxyServer("localhost", 8001)

def createRequest(test, url, headers=None):
"""Create an instrumented HTTPRequest."""
request = HTTPRequest(url=url)
if headers: request.headers=headers
test.record(request, HTTPRequest.getHttpMethodFilter())
return request

These definitions at the top level of the file are evaluated once,

when the worker process is started.

class TestRunner:
"""A TestRunner instance is created for each worker thread."""

def call(self):
"""Called for every run performed by the worker thread."""
# Empty recording!
pass"

Can you help me? I can send the server and port if this is really necessary.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB