Possible to have Hobbit retain and use cookies?
We have an issue in using Hobbit to monitor a system of WebLogic and Oracle application servers. Hobbit is monitoring each of our 4 WebLogic servers on a regular (30/60 second) basis. By default, WebLogic creates a unique HTTPSession when each request is served; this is keyed with a JSESSIONID cookie which is sent back with the reply. A browser, or our load generator (Grinder) retains the cookie.
Hobbit seems to be discarding these cookies; the result is that each request is generating a new Session. This has little performance overhead, but serves to confuse our WebLogic statistics; we can not tell how many 'real' users there are logged on to our system, because they are masked by 700+ 'hobbit' sessions.
It is possible to have Hobbit retain these cookies and send with subsequent requests to the same URL?
Martin
Hi,
Martin Rogers wrote :
It is possible to have Hobbit retain these cookies and send with subsequent requests to the same URL?
I had the exact same problem, hobbit created lots of sessions. Look at the cookie feature in bbtest-net manpage. You will have to write the cookie manually, but then it will be reused for all requests. For some sites, providing a forged cookie works (so I use "session=hobbitmonitor" as a cookie).
Regards,
-- Charles Goyard - charles.goyard at orange-ftgroup.com - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
Thanks for that rapid reply!
However we've looked at that option and if I understand it correctly that would allow us to create a cookie in advance and read it from the file. The problem we have is that we have 4 weblogic servers, each of which will generate a cookie automatically on the first request from Hobbit and return it with the http response. Writing the cookie in advance is not an option as it would not be recognised as a valid session cookie by any of the weblogic instances.
What we need Hobbit to do is to read the cookie on the first response and use it on subsequent calls to that domain.. i.e. to emulate a browser.
Is it possible to do that without a code change? (our last resort!)
Regards, Martin
On Wed, Mar 12, 2008 at 11:33 AM, Charles Goyard < charles.goyard at orange-ftgroup.com> wrote:
Hi,
Martin Rogers wrote :
It is possible to have Hobbit retain these cookies and send with
subsequent
requests to the same URL?
I had the exact same problem, hobbit created lots of sessions. Look at the cookie feature in bbtest-net manpage. You will have to write the cookie manually, but then it will be reused for all requests. For some sites, providing a forged cookie works (so I use "session=hobbitmonitor" as a cookie).
Regards,
-- Charles Goyard - charles.goyard at orange-ftgroup.com - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Martin Rogers wrote :
What we need Hobbit to do is to read the cookie on the first response and use it on subsequent calls to that domain.. i.e. to emulate a browser.
Is it possible to do that without a code change? (our last resort!)
No, you cannot do that. But you can grab a valid cookie and put in (manually, alas) in the cookie file. If your cookies expire, then it's another problem.
Try injecting an invalid cookie, just for fun, it sometimes work. Some CRMs will happily add the new cookie into their databases.
Regards,
-- Charles Goyard - charles.goyard at orange-ftgroup.com - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
On Wednesday 12 March 2008 12:48:20 Martin Rogers wrote:
Thanks for that rapid reply!
However we've looked at that option and if I understand it correctly that would allow us to create a cookie in advance and read it from the file. The problem we have is that we have 4 weblogic servers, each of which will generate a cookie automatically on the first request from Hobbit and return it with the http response. Writing the cookie in advance is not an option as it would not be recognised as a valid session cookie by any of the weblogic instances.
What we need Hobbit to do is to read the cookie on the first response and use it on subsequent calls to that domain.. i.e. to emulate a browser.
Is it possible to do that without a code change? (our last resort!)
It is not possible with Hobbit only at present, but it is quite trivial to write a script that uses curl, that would work.
We test our webmail systems, which require a login (returning a cookie), and an inbox view (which requires the cookie) this way.
Regards, Buchan
On Wed, Mar 12, 2008 at 8:14 AM, Buchan Milne <bgmilne at staff.telkomsa.net> wrote:
On Wednesday 12 March 2008 12:48:20 Martin Rogers wrote:
Is it possible to do that without a code change? (our last resort!)
It is not possible with Hobbit only at present, but it is quite trivial to write a script that uses curl, that would work.
We test our webmail systems, which require a login (returning a cookie), and an inbox view (which requires the cookie) this way.
I'd second that - I'm doing about 1500 tests spread over about 600 hosts, all using curl with cookies, though I generally delete the cookie file at the top of the script to avoid "open session" confusion. There's no reason not to keep on using the same cookie file, though. Something like:
curl -s -S -L -b cookiejar -c cookiejar -o file.html http://server.domain.com
may be all you need.
Ralph Mitchell
Thanks for all the many responses and suggestions, I am impressed by the community around this product! I will probably have an opportunity to test this out over the next couple of days; we do not have direct control over the 'real' hobbit servers, so will have to duplicate in our test setup.
Martin
On Wed, Mar 12, 2008 at 3:13 PM, Ralph Mitchell <ralphmitchell at gmail.com> wrote:
On Wed, Mar 12, 2008 at 8:14 AM, Buchan Milne <bgmilne at staff.telkomsa.net> wrote:
On Wednesday 12 March 2008 12:48:20 Martin Rogers wrote:
Is it possible to do that without a code change? (our last resort!)
It is not possible with Hobbit only at present, but it is quite trivial to write a script that uses curl, that would work.
We test our webmail systems, which require a login (returning a cookie), and an inbox view (which requires the cookie) this way.
I'd second that - I'm doing about 1500 tests spread over about 600 hosts, all using curl with cookies, though I generally delete the cookie file at the top of the script to avoid "open session" confusion. There's no reason not to keep on using the same cookie file, though. Something like:
curl -s -S -L -b cookiejar -c cookiejar -o file.html http://server.domain.com
may be all you need.
Ralph Mitchell
On Wed, Mar 12, 2008 at 11:22:22AM +0100, Martin Rogers wrote:
We have an issue in using Hobbit to monitor a system of WebLogic and Oracle application servers. Hobbit is monitoring each of our 4 WebLogic servers on a regular (30/60 second) basis. By default, WebLogic creates a unique HTTPSession when each request is served; this is keyed with a JSESSIONID cookie which is sent back with the reply. A browser, or our load generator (Grinder) retains the cookie.
Hobbit seems to be discarding these cookies; the result is that each request is generating a new Session. This has little performance overhead, but serves to confuse our WebLogic statistics; we can not tell how many 'real' users there are logged on to our system, because they are masked by 700+ 'hobbit' sessions.
It is possible to have Hobbit retain these cookies and send with subsequent requests to the same URL?
I've given the cookie-handling code an overhaul, and added support for session cookies as long as they appear in the HTTP headers - that is true for most cases, but I have seen some webpages where cookies are set through Javascript code. Cannot handle that...
Regards, Henrik
participants (5)
-
bgmilne@staff.telkomsa.net
-
charles.goyard@orange-ftgroup.com
-
henrik@hswn.dk
-
martin.e.rogers@googlemail.com
-
ralphmitchell@gmail.com