[ grinder-Bugs-3413171 ] TCPProxy broken in The Grinder 3.5
SourceForge.net <[email protected]> Fri, 23 Sep 2011 06:28:10 +0100
| Newsgroups | gmane.comp.java.grinder.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #3413171, was opened at 2011-09-23 06:28 Message generated for change (Tracker Item Submitted) made by philipa You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=118598&aid=3413171&group_id=18598 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: TCPProxy Group: None Status: Open Resolution: None Priority: 7 Private: No Submitted By: Philip Aston (philipa) Assigned to: Philip Aston (philipa) Summary: TCPProxy broken in The Grinder 3.5 Initial Comment: On Tue, Sep 20, 2011 at 1:12 PM, Lonnie Choset <[email protected]> wrote: > > > > Hi, > > I'm having trouble recording with grinder-3.5 - it doesn't work (well) where > > grinder-3.4 DOES work. > > I've probably recorded over 100 scripts with 3.4 and don't remember similar > > symptoms. > > > > I tried on another system, I AM getting a script this time, but all the > > other errors are still in place and the recording takes a lot of time - > > something doesn't feel right. > > > > Any ideas? Am I missing something? > > > > Thanks, > > Lonnie > > > > > > environment (for the system where it doesn't work): > > - windows xp SP3 > > - Java: > > java version "1.6.0_26" > > Java(TM) SE Runtime Environment (build 1.6.0_26-b03) > > Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode) > > > > setGrinderEnv.bat: > > set GRINDERPATH=D:\grinder-3.5 > > set GRINDERPROPERTIES=.\grinder.properties > > set CLASSPATH=%GRINDERPATH%\lib\grinder.jar > > set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_17 > > > > startProxy.bat: > > call .\setGrinderEnv.bat > > > > java -cp %CLASSPATH% net.grinder.TCPProxy -console -http > %1 > > > > > > > > I successfully recorded going to www.google.com with 3.4, but when trying > > with 3.5, getting 'Internet Explorer cannot display the webpage' in the > > browser, the following errors in the cmd window: > > > > D:\grinder-3.5\projects>.\startProxy.bat ddddddd.py > > > > D:\grinder-3.5\projects>call .\setGrinderEnv.bat > > > > D:\grinder-3.5\projects>set GRINDERPATH=D:\grinder-3.5 > > > > D:\grinder-3.5\projects>set GRINDERPROPERTIES=.\grinder.properties > > > > D:\grinder-3.5\projects>set CLASSPATH=D:\grinder-3.5\lib\grinder.jar > > > > D:\grinder-3.5\projects>set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_17 > > > > D:\grinder-3.5\projects>java -cp D:\grinder-3.5\lib\grinder.jar > > net.grinder.TCPProxy -console -http 1>ddddddd.py > > 9/20/11 12:48:40 PM (tcpproxy): Initialising as an HTTP/HTTPS proxy with the > > parameters: > > Request filters: HTTPRequestFilter, HTTPResponseFilter > > Response filters: HTTPRequestFilter, HTTPResponseFilter > > Local address: localhost:8001 > > 9/20/11 12:48:41 PM (tcpproxy): Engine initialised, listening on port 8001 > > Exception in thread "HTTPProxyStreamDemultiplexer for > > Socket[addr=localhost/127.0.0.1,port=2108,localport=8001]" java.la > > ng.IllegalArgumentException: Unknown connection > > localhost:2108->www.google.com:80 > > at > > net.grinder.plugin.http.tcpproxyfilter.ConnectionCache.response(ConnectionCache.java:107) > > at > > net.grinder.plugin.http.tcpproxyfilter.HTTPResponseFilter.handle(HTTPResponseFilter.java:64) > > at > > net.grinder.tools.tcpproxy.CompositeFilter.handle(CompositeFilter.java:50) > > at > > net.grinder.tools.tcpproxy.AbstractFilterDecorator.handle(AbstractFilterDecorator.java:53) > > at > > net.grinder.tools.tcpproxy.HTTPMethodRelativeURIFilterDecorator.handle(HTTPMethodRelativeURIFilterDecorator.j > > ava:101) > > at > > net.grinder.tools.tcpproxy.AbstractTCPProxyEngine$OutputStreamFilterTee.handle(AbstractTCPProxyEngine.java:54 > > 8) > > at > > net.grinder.tools.tcpproxy.HTTPProxyTCPProxyEngine$HTTPProxyStreamDemultiplexer.interruptibleRun(HTTPProxyTCP > > ProxyEngine.java:532) > > at > > net.grinder.util.thread.InterruptibleRunnableAdapter.run(InterruptibleRunnableAdapter.java:59) > > at java.lang.Thread.run(Unknown Source) > > > > > > > > > > and the following in the script: > > > > D:\grinder-3.5\projects>more ddddddd.py > > # The Grinder 3.5 > > # HTTP script recorded by TCPProxy at Sep 20, 2011 12:48:40 PM > > > > 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) > > > > # These definitions at the top level of the file are evaluated once, > > # when the worker process is started. > > > > url0 = 'http://www.google.com:80' > > > > > > class TestRunner: > > """A TestRunner instance is created for each worker thread.""" > > > > def __call__(self): > > """This method is called for every run performed by the worker > > thread.""" > > > > # Empty recording! > > pass > > > > > > def instrumentMethod(test, method_name, c=TestRunner): > > """Instrument a method with the given Test.""" > > unadorned = getattr(c, method_name) > > import new > > method = new.instancemethod(test.wrap(unadorned), None, c) > > setattr(c, method_name, method) > > > > > > ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=118598&aid=3413171&group_id=18598 ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2