Problem with cookies

View: New views
5 Messages — Rating Filter:   Alert me  

Problem with cookies

by Cris J. Holdorph :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using Grinder 3.2 with Jython 2.2.1 and JDK 1.6.0.16.

I took the script for cookies from here:

http://grinder.sourceforge.net/g3/script-gallery.html#cookies

And tried to run it with "http://support.phpbb.net/" as the URL being
requested with the attached grinder.properties file (scrubbed to protect
my ip address and file path information)

I am not seeing any cookies being printed to the window where I started
the Agent.  Instead I just see the thread start/stop information.

11/5/09 12:19:22 PM (agent): received a start message
11/5/09 12:19:22 PM (agent): Worker process command line: java
'-Dpython.home=/home/myusername/jython2.2.1' '-Dpython.cachedir=/tmp'
-classpath '/home/myusername/grinder-3.2/lib/grinder.jar:'
net.grinder.engine.process.WorkerProcessEntryPoint
11/5/09 12:19:22 PM (agent): worker loadtester01.uchicago.edu-3 started
11/5/09 12:19:22 PM (process loadtester01.uchicago.edu-3): starting threads
11/5/09 12:19:23 PM (process loadtester01.uchicago.edu-3): finished
11/5/09 12:19:24 PM (agent): finished, waiting for console signal

It's like cookies are not working in my environment.  Anyone have any
ideas?

---- Cris J H

#
# Sample grinder.properties
#
#
# The properties can be specified in three ways.
#  - In the console. A properties file in the distribution directory
#    can be selected in the console.
#  - As a Java system property in the command line used to start the
#    agent. (e.g. java -Dgrinder.threads=20 net.grinder.Grinder).
#  - In an agent properties file. A local properties file named
#    "grinder.properties" can be placed in the working directory of
#    each agent, or a different file name passed as an agent command
#    line argument.
#
# Properties present in a console selected file take precedence over
# agent command line properties, which in turn override those in
# an agent properties file.
#
# Any line which starts with a ; (semi-colon) or a # (hash) is a
# comment and is ignored. In this example we will use a # for
# commentary and a ; for parts of the config file that you may wish to
# enable
#
# Please refer to
# http://net.grinder.sourceforge.net/g3/properties.html for further
# documentation.


#
# Commonly used properties
#

# The file name of the script to run.
#
# Relative paths are evaluated from the directory containing the
# properties file. The default is "grinder.py".
grinder.script = showmecookie.py

# The number of worker processes each agent should start. The default
# is 1.
grinder.processes = 1
#grinder.processes = 2

# The number of worker threads each worker process should start. The
# default is 1.
#grinder.threads = 1
grinder.threads = 1

# The number of runs each worker process will perform. When using the
# console this is usually set to 0, meaning "run until the console
# sneds a stop or reset signal". The default is 1.
#grinder.runs = 1
grinder.runs = 1

# The IP address or host name that the agent and worker processes use
# to contact the console. The default is all the network interfaces
# of the local machine.
#; grinder.consoleHost = consolehost
grinder.consoleHost = 192.168.1.2

# The IP port that the agent and worker processes use to contact the
# console. Defaults to 6372.
; grinder.consolePort



#
# Less frequently used properties
#


### Logging ###

# The directory in which worker process logs should be created. If not
# specified, the agent's working directory is used.
grinder.logDirectory = log

# The number of archived logs from previous runs that should be kept.
# The default is 1.
grinder.numberOfOldLogs = 2

# Overrides the "host" string used in log filenames and logs. The
# default is the host name of the machine running the agent.
; grinder.hostID = myagent

# Set to false to disable the logging of output and error steams for
# worker processes. You might want to use this to reduce the overhead
# of running a client thread. The default is true.
; grinder.logProcessStreams = false


### Script sleep time ####

# The maximum time in milliseconds that each thread waits before
# starting. Unlike the sleep times specified in scripts, this is
# varied according to a flat random distribution. The actual sleep
# time will be a random value between 0 and the specified value.
# Affected by grinder.sleepTimeFactor, but not
# grinder.sleepTimeVariation. The default is 0ms.
; grinder.initialSleepTime=500

# Apply a factor to all the sleep times you've specified, either
# through a property of in a script. Setting this to 0.1 would run the
# script ten times as fast. The default is 1.
; grinder.sleepTimeFactor=0.01

# The Grinder varies the sleep times specified in scripts according to
# a Normal distribution. This property specifies a fractional range
# within which nearly all (99.75%) of the times will lie. E.g., if the
# sleep time is specified as 1000 and the sleepTimeVariation is set to
# 0.1, then 99.75% of the actual sleep times will be between 900 and
# 1100 milliseconds. The default is 0.2.
; grinder.sleepTimeVariation=0.005


### Worker process control ###

# If set, the agent will ramp up the number of worker processes,
# starting the number specified every
# grinder.processesIncrementInterval milliseconds. The upper limit is
# set by grinder.processes. The default is to start all worker
# processes together.
; grinder.processIncrement = 1

# Used in conjunction with grinder.processIncrement, this property
# sets the interval in milliseconds at which the agent starts new
# worker processes. The value is in milliseconds. The default is 60000
# ms.
; grinder.processIncrementInterval = 10000

# Used in conjunction with grinder.processIncrement, this property
# sets the initial number of worker processes to start. The default is
# the value of grinder.processIncrement.
; process.initialProcesses = 1

# The maximum length of time in milliseconds that each worker process
# should run for. grinder.duration can be specified in conjunction
# with grinder.runs, in which case the worker processes will terminate
# if either the duration time or the number of runs is exceeded. The
# default is to run forever.
; grinder.duration = 60000

# If set to true, the agent process spawns engines in threads rather
# than processes, using special class loaders to isolate the engines.
# This allows the engine to be easily run in a debugger. This is
# primarily a tool for debugging The Grinder engine, but it might also
# be useful to advanced users. The default is false.
; grinder.debug.singleprocess = true


### Java ###

# Use an alternate JVM for worker processes. The default is "java" so
# you do not need to specify this if java is in your PATH.
; grinder.jvm = /opt/jrockit/jrockit-R27.5.0-jdk1.5.0_14/bin/java

# Use to adjust the classpath used for the worker process JVMs.
# Anything specified here will be prepended to the classpath used to
# start the Grinder processes.
; grinder.jvm.classpath = /tmp/myjar.jar

# Additional arguments to worker process JVMs.
#; grinder.jvm.arguments = -Dpython.cachedir=/tmp
grinder.jvm.arguments = -Dpython.home=/home/myusername/jython2.2.1 -Dpython.cachedir=/tmp


### Console communications ###

# (See above for console address properties).

# If you are not using the console, and don't want the agent to try to
# contact it, set grinder.useConsole = false. The default is true.
; grinder.useConsole = false

# The period at which each process sends updates to the console. This
# also controls the frequency at which the data files are flushed.
# The default is 500 ms.
; grinder.reportToConsole.interval = 100


### Statistics ###

# Set to false to disable reporting of timing information to the
# console; other statistics are still reported. See
# http://grinder.sourceforge.net/faq.html#timing for why you might
# want to do this. The default is true.
; grinder.reportTimesToConsole = false

# If set to true, System.nanoTime() is used for measuring time instead
# of System.currentTimeMills(). The Grinder will still report times in
# milliseconds. The precision of these methods depends on the JVM
# implementation and the operating system. Setting to true requires
# J2SE 5 or later. The default is false.
; grinder.useNanoTime = true




















# HTTP example which shows how to access HTTP cookies.
#
# The HTTPClient library handles cookie interaction and removes the
# cookie headers from responses. If you want to access these cookies,
# one way is to define your own CookiePolicyHandler. This script defines
# a CookiePolicyHandler that simply logs all cookies that are sent or
# received.
#
# The script also demonstrates how to query what cookies are cached for
# the current thread, and how add and remove cookies from the cache.
#
# If you really want direct control over the cookie headers, you
# can disable the automatic cookie handling with:
#    HTTPPluginControl.getConnectionDefaults().useCookies = 0

from net.grinder.script.Grinder import grinder
from net.grinder.script import Test
from net.grinder.plugin.http import HTTPRequest, HTTPPluginControl
from HTTPClient import Cookie, CookieModule, CookiePolicyHandler
from java.util import Date

log = grinder.logger.output

# Set up a cookie handler to log all cookies that are sent and received.
class MyCookiePolicyHandler(CookiePolicyHandler):
    def acceptCookie(self, cookie, request, response):
        log("accept cookie: %s" % cookie)
        return 1

    def sendCookie(self, cookie, request):
        log("send cookie: %s" % cookie)
        return 1

CookieModule.setCookiePolicyHandler(MyCookiePolicyHandler())

test1 = Test(1, "Request resource")
request1 = test1.wrap(HTTPRequest())


class TestRunner:
    def __call__(self):
        # The cache of cookies for each  worker thread will be reset at
        # the start of each run.

        result = request1.GET("http://support.phpbb.net/")

        # If the first response set any cookies for the domain,
        # they willl be sent back with this request.
        result2 = request1.GET("http://support.phpbb.net/")

        # Now let's add a new cookie.
        threadContext = HTTPPluginControl.getThreadHTTPClientContext()

        expiryDate = Date()
        expiryDate.year += 10

        cookie = Cookie("key", "value","localhost", "/", expiryDate, 0)

        CookieModule.addCookie(cookie, threadContext)

        result = request1.GET("http://support.phpbb.net/")

        # Get all cookies for the current thread and write them to the log
        cookies = CookieModule.listAllCookies(threadContext)
        for c in cookies: log("retrieved cookie: %s" % c)

        # Remove any cookie that isn't ours.
        for c in cookies:
            if c != cookie: CookieModule.removeCookie(c, threadContext)

        result = request1.GET("http://support.phpbb.net/")


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Re: Problem with cookies

by Philip Aston-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Try adding

    grinder.jvm.arguments=-DHTTPClient.log.mask=16

to grinder.properties. This will cause the HTTPClient library to be
verbose about its cookie handling.

Also, try running The Grinder output through the TCPProxy (see
http://grinder.sourceforge.net/faq.html#use-the-tcpproxy), and checking
that the server is indeed trying to set a cookie.

- Phil

Cris J. Holdorph wrote:

> I am using Grinder 3.2 with Jython 2.2.1 and JDK 1.6.0.16.
>
> I took the script for cookies from here:
>
> http://grinder.sourceforge.net/g3/script-gallery.html#cookies
>
> And tried to run it with "http://support.phpbb.net/" as the URL being
> requested with the attached grinder.properties file (scrubbed to
> protect my ip address and file path information)
>
> I am not seeing any cookies being printed to the window where I
> started the Agent.  Instead I just see the thread start/stop information.
>
> 11/5/09 12:19:22 PM (agent): received a start message
> 11/5/09 12:19:22 PM (agent): Worker process command line: java
> '-Dpython.home=/home/myusername/jython2.2.1' '-Dpython.cachedir=/tmp'
> -classpath '/home/myusername/grinder-3.2/lib/grinder.jar:'
> net.grinder.engine.process.WorkerProcessEntryPoint
> 11/5/09 12:19:22 PM (agent): worker loadtester01.uchicago.edu-3 started
> 11/5/09 12:19:22 PM (process loadtester01.uchicago.edu-3): starting
> threads
> 11/5/09 12:19:23 PM (process loadtester01.uchicago.edu-3): finished
> 11/5/09 12:19:24 PM (agent): finished, waiting for console signal
>
> It's like cookies are not working in my environment.  Anyone have any
> ideas?
>
> ---- Cris J H
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ------------------------------------------------------------------------
>
> _______________________________________________
> grinder-use mailing list
> grinder-use@...
> https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Re: Problem with cookies

by Cris J. Holdorph :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I definitely know the server is setting cookies by using Live HTTP
Headers (firefox extension) and looking at the results.

Here's the output with that flag (same script as previous email):

11/5/09 12:47:36 PM (agent): worker thirl-0 started
11/5/09 12:47:38 PM (process thirl-0): starting threads
{Grinder thread 0} [12:47:38.466] CookM: Received and parsed 3 cookies:
{Grinder thread 0} [12:47:38.466] CookM: Cookie 0: phpbb3_rcvnu_u=1;
expires=Fri Nov 05 12:47:37 MST 2010; path=/; domain=support.phpbb.net
{Grinder thread 0} [12:47:38.467] CookM: Cookie 1: phpbb3_rcvnu_k=;
expires=Fri Nov 05 12:47:37 MST 2010; path=/; domain=support.phpbb.net
{Grinder thread 0} [12:47:38.467] CookM: Cookie 2:
phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; expires=Fri Nov 05
12:47:37 MST 2010; path=/; domain=support.phpbb.net
{Grinder thread 0} [12:47:38.527] CookM: Sending cookies
'phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; phpbb3_rcvnu_k=;
phpbb3_rcvnu_u=1'
{Grinder thread 0} [12:47:38.639] CookM: Sending cookies
'phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; phpbb3_rcvnu_k=;
phpbb3_rcvnu_u=1'
{Grinder thread 0} [12:47:38.821] CookM: Received and parsed 3 cookies:
{Grinder thread 0} [12:47:38.822] CookM: Cookie 0: phpbb3_rcvnu_u=1;
expires=Fri Nov 05 12:47:38 MST 2010; path=/; domain=support.phpbb.net
{Grinder thread 0} [12:47:38.822] CookM: Cookie 1: phpbb3_rcvnu_k=;
expires=Fri Nov 05 12:47:38 MST 2010; path=/; domain=support.phpbb.net
{Grinder thread 0} [12:47:38.822] CookM: Cookie 2:
phpbb3_rcvnu_sid=c35bf4530510ea2acd282b4fc50078b8; expires=Fri Nov 05
12:47:38 MST 2010; path=/; domain=support.phpbb.net
11/5/09 12:47:38 PM (process thirl-0): finished
11/5/09 12:47:39 PM (agent): finished, waiting for console signal

So this debug output makes it seem like it's seeing/receiving/sending
some cookies, but I'm neither seeing the prints from the script related
to cookies and I'm not seeing the cookies being sent on the server side.

---- Cris J H

Philip Aston wrote:

> Try adding
>
>     grinder.jvm.arguments=-DHTTPClient.log.mask=16
>
> to grinder.properties. This will cause the HTTPClient library to be
> verbose about its cookie handling.
>
> Also, try running The Grinder output through the TCPProxy (see
> http://grinder.sourceforge.net/faq.html#use-the-tcpproxy), and checking
> that the server is indeed trying to set a cookie.
>
> - Phil
>
> Cris J. Holdorph wrote:
>  
>> I am using Grinder 3.2 with Jython 2.2.1 and JDK 1.6.0.16.
>>
>> I took the script for cookies from here:
>>
>> http://grinder.sourceforge.net/g3/script-gallery.html#cookies
>>
>> And tried to run it with "http://support.phpbb.net/" as the URL being
>> requested with the attached grinder.properties file (scrubbed to
>> protect my ip address and file path information)
>>
>> I am not seeing any cookies being printed to the window where I
>> started the Agent.  Instead I just see the thread start/stop information.
>>
>> 11/5/09 12:19:22 PM (agent): received a start message
>> 11/5/09 12:19:22 PM (agent): Worker process command line: java
>> '-Dpython.home=/home/myusername/jython2.2.1' '-Dpython.cachedir=/tmp'
>> -classpath '/home/myusername/grinder-3.2/lib/grinder.jar:'
>> net.grinder.engine.process.WorkerProcessEntryPoint
>> 11/5/09 12:19:22 PM (agent): worker loadtester01.uchicago.edu-3 started
>> 11/5/09 12:19:22 PM (process loadtester01.uchicago.edu-3): starting
>> threads
>> 11/5/09 12:19:23 PM (process loadtester01.uchicago.edu-3): finished
>> 11/5/09 12:19:24 PM (agent): finished, waiting for console signal
>>
>> It's like cookies are not working in my environment.  Anyone have any
>> ideas?
>>
>> ---- Cris J H
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> grinder-use mailing list
>> grinder-use@...
>> https://lists.sourceforge.net/lists/listinfo/grinder-use
>>    
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> grinder-use mailing list
> grinder-use@...
> https://lists.sourceforge.net/lists/listinfo/grinder-use
>
>  


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Re: Problem with cookies

by Philip Aston-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It does look like it's doing the right thing. It corresponds to
receiving 3 after the first request, sending 3 back for the second,
sending 3 back for the third (the cookie added by the script won't be
sent because it has the wrong domain), and sending nothing back for the
fourth request (as the script discards all the cookies).

You are looking in the .out file for the policy handler output, right?

I do suggest setting up the TCPProxy to display the interaction - it
will show whether The Grinder is sending cookies. I'd be very surprised
if it wasn't.

- Phil


Cris J. Holdorph wrote:

> I definitely know the server is setting cookies by using Live HTTP
> Headers (firefox extension) and looking at the results.
>
> Here's the output with that flag (same script as previous email):
>
> 11/5/09 12:47:36 PM (agent): worker thirl-0 started
> 11/5/09 12:47:38 PM (process thirl-0): starting threads
> {Grinder thread 0} [12:47:38.466] CookM: Received and parsed 3 cookies:
> {Grinder thread 0} [12:47:38.466] CookM: Cookie 0: phpbb3_rcvnu_u=1;
> expires=Fri Nov 05 12:47:37 MST 2010; path=/; domain=support.phpbb.net
> {Grinder thread 0} [12:47:38.467] CookM: Cookie 1: phpbb3_rcvnu_k=;
> expires=Fri Nov 05 12:47:37 MST 2010; path=/; domain=support.phpbb.net
> {Grinder thread 0} [12:47:38.467] CookM: Cookie 2:
> phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; expires=Fri Nov 05
> 12:47:37 MST 2010; path=/; domain=support.phpbb.net
> {Grinder thread 0} [12:47:38.527] CookM: Sending cookies
> 'phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; phpbb3_rcvnu_k=;
> phpbb3_rcvnu_u=1'
> {Grinder thread 0} [12:47:38.639] CookM: Sending cookies
> 'phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; phpbb3_rcvnu_k=;
> phpbb3_rcvnu_u=1'
> {Grinder thread 0} [12:47:38.821] CookM: Received and parsed 3 cookies:
> {Grinder thread 0} [12:47:38.822] CookM: Cookie 0: phpbb3_rcvnu_u=1;
> expires=Fri Nov 05 12:47:38 MST 2010; path=/; domain=support.phpbb.net
> {Grinder thread 0} [12:47:38.822] CookM: Cookie 1: phpbb3_rcvnu_k=;
> expires=Fri Nov 05 12:47:38 MST 2010; path=/; domain=support.phpbb.net
> {Grinder thread 0} [12:47:38.822] CookM: Cookie 2:
> phpbb3_rcvnu_sid=c35bf4530510ea2acd282b4fc50078b8; expires=Fri Nov 05
> 12:47:38 MST 2010; path=/; domain=support.phpbb.net
> 11/5/09 12:47:38 PM (process thirl-0): finished
> 11/5/09 12:47:39 PM (agent): finished, waiting for console signal
>
> So this debug output makes it seem like it's seeing/receiving/sending
> some cookies, but I'm neither seeing the prints from the script related
> to cookies and I'm not seeing the cookies being sent on the server side.
>
> ---- Cris J H
>
> Philip Aston wrote:
>  
>> Try adding
>>
>>     grinder.jvm.arguments=-DHTTPClient.log.mask=16
>>
>> to grinder.properties. This will cause the HTTPClient library to be
>> verbose about its cookie handling.
>>
>> Also, try running The Grinder output through the TCPProxy (see
>> http://grinder.sourceforge.net/faq.html#use-the-tcpproxy), and checking
>> that the server is indeed trying to set a cookie.
>>
>> - Phil
>>
>> Cris J. Holdorph wrote:
>>  
>>    
>>> I am using Grinder 3.2 with Jython 2.2.1 and JDK 1.6.0.16.
>>>
>>> I took the script for cookies from here:
>>>
>>> http://grinder.sourceforge.net/g3/script-gallery.html#cookies
>>>
>>> And tried to run it with "http://support.phpbb.net/" as the URL being
>>> requested with the attached grinder.properties file (scrubbed to
>>> protect my ip address and file path information)
>>>
>>> I am not seeing any cookies being printed to the window where I
>>> started the Agent.  Instead I just see the thread start/stop information.
>>>
>>> 11/5/09 12:19:22 PM (agent): received a start message
>>> 11/5/09 12:19:22 PM (agent): Worker process command line: java
>>> '-Dpython.home=/home/myusername/jython2.2.1' '-Dpython.cachedir=/tmp'
>>> -classpath '/home/myusername/grinder-3.2/lib/grinder.jar:'
>>> net.grinder.engine.process.WorkerProcessEntryPoint
>>> 11/5/09 12:19:22 PM (agent): worker loadtester01.uchicago.edu-3 started
>>> 11/5/09 12:19:22 PM (process loadtester01.uchicago.edu-3): starting
>>> threads
>>> 11/5/09 12:19:23 PM (process loadtester01.uchicago.edu-3): finished
>>> 11/5/09 12:19:24 PM (agent): finished, waiting for console signal
>>>
>>> It's like cookies are not working in my environment.  Anyone have any
>>> ideas?
>>>
>>> ---- Cris J H
>>> ------------------------------------------------------------------------
>>>      


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Re: Problem with cookies

by Cris J. Holdorph :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Phil, I found that difference between where the log messages were
going and the extra debugging from the -D was.  Looks like everything
cookie wise is as normal as you expected.  The problem appears to be
elsewhere.  I'm suspecting a URL encoding issue.

Thanks for the help,

---- Cris J H

Philip Aston wrote:

> It does look like it's doing the right thing. It corresponds to
> receiving 3 after the first request, sending 3 back for the second,
> sending 3 back for the third (the cookie added by the script won't be
> sent because it has the wrong domain), and sending nothing back for the
> fourth request (as the script discards all the cookies).
>
> You are looking in the .out file for the policy handler output, right?
>
> I do suggest setting up the TCPProxy to display the interaction - it
> will show whether The Grinder is sending cookies. I'd be very surprised
> if it wasn't.
>
> - Phil
>
>
> Cris J. Holdorph wrote:
>  
>> I definitely know the server is setting cookies by using Live HTTP
>> Headers (firefox extension) and looking at the results.
>>
>> Here's the output with that flag (same script as previous email):
>>
>> 11/5/09 12:47:36 PM (agent): worker thirl-0 started
>> 11/5/09 12:47:38 PM (process thirl-0): starting threads
>> {Grinder thread 0} [12:47:38.466] CookM: Received and parsed 3 cookies:
>> {Grinder thread 0} [12:47:38.466] CookM: Cookie 0: phpbb3_rcvnu_u=1;
>> expires=Fri Nov 05 12:47:37 MST 2010; path=/; domain=support.phpbb.net
>> {Grinder thread 0} [12:47:38.467] CookM: Cookie 1: phpbb3_rcvnu_k=;
>> expires=Fri Nov 05 12:47:37 MST 2010; path=/; domain=support.phpbb.net
>> {Grinder thread 0} [12:47:38.467] CookM: Cookie 2:
>> phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; expires=Fri Nov 05
>> 12:47:37 MST 2010; path=/; domain=support.phpbb.net
>> {Grinder thread 0} [12:47:38.527] CookM: Sending cookies
>> 'phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; phpbb3_rcvnu_k=;
>> phpbb3_rcvnu_u=1'
>> {Grinder thread 0} [12:47:38.639] CookM: Sending cookies
>> 'phpbb3_rcvnu_sid=ad6f4a25f0b59ba73bbd3b7d93bffdde; phpbb3_rcvnu_k=;
>> phpbb3_rcvnu_u=1'
>> {Grinder thread 0} [12:47:38.821] CookM: Received and parsed 3 cookies:
>> {Grinder thread 0} [12:47:38.822] CookM: Cookie 0: phpbb3_rcvnu_u=1;
>> expires=Fri Nov 05 12:47:38 MST 2010; path=/; domain=support.phpbb.net
>> {Grinder thread 0} [12:47:38.822] CookM: Cookie 1: phpbb3_rcvnu_k=;
>> expires=Fri Nov 05 12:47:38 MST 2010; path=/; domain=support.phpbb.net
>> {Grinder thread 0} [12:47:38.822] CookM: Cookie 2:
>> phpbb3_rcvnu_sid=c35bf4530510ea2acd282b4fc50078b8; expires=Fri Nov 05
>> 12:47:38 MST 2010; path=/; domain=support.phpbb.net
>> 11/5/09 12:47:38 PM (process thirl-0): finished
>> 11/5/09 12:47:39 PM (agent): finished, waiting for console signal
>>
>> So this debug output makes it seem like it's seeing/receiving/sending
>> some cookies, but I'm neither seeing the prints from the script related
>> to cookies and I'm not seeing the cookies being sent on the server side.
>>
>> ---- Cris J H
>>
>> Philip Aston wrote:
>>  
>>    
>>> Try adding
>>>
>>>     grinder.jvm.arguments=-DHTTPClient.log.mask=16
>>>
>>> to grinder.properties. This will cause the HTTPClient library to be
>>> verbose about its cookie handling.
>>>
>>> Also, try running The Grinder output through the TCPProxy (see
>>> http://grinder.sourceforge.net/faq.html#use-the-tcpproxy), and checking
>>> that the server is indeed trying to set a cookie.
>>>
>>> - Phil
>>>
>>> Cris J. Holdorph wrote:
>>>  
>>>    
>>>      
>>>> I am using Grinder 3.2 with Jython 2.2.1 and JDK 1.6.0.16.
>>>>
>>>> I took the script for cookies from here:
>>>>
>>>> http://grinder.sourceforge.net/g3/script-gallery.html#cookies
>>>>
>>>> And tried to run it with "http://support.phpbb.net/" as the URL being
>>>> requested with the attached grinder.properties file (scrubbed to
>>>> protect my ip address and file path information)
>>>>
>>>> I am not seeing any cookies being printed to the window where I
>>>> started the Agent.  Instead I just see the thread start/stop information.
>>>>
>>>> 11/5/09 12:19:22 PM (agent): received a start message
>>>> 11/5/09 12:19:22 PM (agent): Worker process command line: java
>>>> '-Dpython.home=/home/myusername/jython2.2.1' '-Dpython.cachedir=/tmp'
>>>> -classpath '/home/myusername/grinder-3.2/lib/grinder.jar:'
>>>> net.grinder.engine.process.WorkerProcessEntryPoint
>>>> 11/5/09 12:19:22 PM (agent): worker loadtester01.uchicago.edu-3 started
>>>> 11/5/09 12:19:22 PM (process loadtester01.uchicago.edu-3): starting
>>>> threads
>>>> 11/5/09 12:19:23 PM (process loadtester01.uchicago.edu-3): finished
>>>> 11/5/09 12:19:24 PM (agent): finished, waiting for console signal
>>>>
>>>> It's like cookies are not working in my environment.  Anyone have any
>>>> ideas?
>>>>
>>>> ---- Cris J H
>>>> ------------------------------------------------------------------------
>>>>      
>>>>        
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> grinder-use mailing list
> grinder-use@...
> https://lists.sourceforge.net/lists/listinfo/grinder-use
>
>  


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use