opensubscriber
   Find in this group all groups
 
Unknown more information…

j : jmeter-user@jakarta.apache.org 11 September 2009 • 12:25AM -0400

Re: Missing cookie
by Deepak Shetty

REPLY TO AUTHOR
 
REPLY TO GROUP




hi
a. Can you try using the HTTpClient Httpsampler? (i remember something to
the effect that NTLM worked only with HTTPClient version..
b. Your cookie is being set on a 401 response as well as the retry is
automatic(which may be why it isnt getting stored in the cookie manager( .
Would it be possible for you to make a request to a non secure page so that
you can get the session cookie working correctly and then make the secured
request? Also the cookie specifies a path as /Scooby whereas your request
has it Scooby/home.htm can you change that to /Scooby/home.htm (shouldnt
make a diff i think , but doesnt hurt to try )

regards
deepak

On Thu, Sep 10, 2009 at 9:00 AM, <Benoit.Coppens@ucb....> wrote:

> Hi,
>
> I try to use JMeter (latest version) with a website built with
> Spring-Security where user authentication is managed by NTLM.
>
> When JMeter requests the URL, the server answers that it is waiting an NTLM
> authentication.
> In its response, the server provides also cookie with the JSESSION id.
> When JMeter answers with the NTLM authentication, the JSESSION cookie is
> missing.
> Why?
>
> Here are the headers:
>
> ***************
> GET /ScoobyDoo/home.htm HTTP/1.1
> Connection: keep-alive
> Authorization: Basic RTExODYxNjppcmxhMjAwOQ==
> User-Agent: Java/1.6.0_10
> Host: 10.1.38.144
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> HTTP/1.1 401 Unauthorized
> Date: Thu, 10 Sep 2009 15:45:06 GMT
> Server: Apache/2.2.11 (Win32) mod_jk/1.2.27 PHP/5.2.5
> Set-Cookie: JSESSIONID=BE6CB49D5CA9B2E885A6540CDF4A50E3; Path=/ScoobyDoo
> WWW-Authenticate: NTLM
> Connection: Keep-Alive, Keep-Alive
> Content-Length: 0
> Keep-Alive: timeout=5, max=100
> Content-Type: text/html
>
> GET /ScoobyDoo/home.htm HTTP/1.1
> Connection: keep-alive
> Authorization: NTLM
> TlRMTVNTUAABAAAAB7IIoggACAAxAAAACQAJACgAAAAFASgKAAAAD0JFTDAwMTk4OFVDQi1DT1JQ
> User-Agent: Java/1.6.0_10
> Host: 10.1.38.144
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> ***************
>
> And here is my JMeter config:
>
> *****************
> <?xml version="1.0" encoding="UTF-8"?>
> <jmeterTestPlan version="1.2" properties="2.1">
>  <hashTree>
>    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="DDR"
> enabled="true">
>      <stringProp name="TestPlan.comments"></stringProp>
>      <boolProp name="TestPlan.functional_mode">false</boolProp>
>      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
>      <elementProp name="TestPlan.user_defined_variables"
> elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments"
> testname="User Defined Variables" enabled="true">
>        <collectionProp name="Arguments.arguments"/>
>      </elementProp>
>      <stringProp name="TestPlan.user_define_classpath"></stringProp>
>    </TestPlan>
>    <hashTree>
>      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
> testname="Thread Group" enabled="true">
>        <elementProp name="ThreadGroup.main_controller"
> elementType="LoopController" guiclass="LoopControlPanel"
> testclass="LoopController" testname="Loop Controller" enabled="true">
>          <boolProp name="LoopController.continue_forever">false</boolProp>
>          <stringProp name="LoopController.loops">2</stringProp>
>        </elementProp>
>        <stringProp name="ThreadGroup.num_threads">2</stringProp>
>        <stringProp name="ThreadGroup.ramp_time">2</stringProp>
>        <longProp name="ThreadGroup.start_time">1252584792000</longProp>
>        <longProp name="ThreadGroup.end_time">1252584792000</longProp>
>        <boolProp name="ThreadGroup.scheduler">false</boolProp>
>        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
>        <stringProp name="ThreadGroup.duration"></stringProp>
>        <stringProp name="ThreadGroup.delay"></stringProp>
>      </ThreadGroup>
>      <hashTree>
>        <AuthManager guiclass="AuthPanel" testclass="AuthManager"
> testname="HTTP Authorization Manager" enabled="true">
>          <collectionProp name="AuthManager.auth_list">
>            <elementProp name="" elementType="Authorization">
>              <stringProp name="Authorization.url">http://10.1.38.144/
> </stringProp>
>              <stringProp name="Authorization.username">E118616</stringProp>
>              <stringProp
> name="Authorization.password">password</stringProp>
>              <stringProp name="Authorization.domain">UCB-CORP</stringProp>
>              <stringProp name="Authorization.realm"></stringProp>
>            </elementProp>
>          </collectionProp>
>        </AuthManager>
>        <hashTree/>
>        <ConfigTestElement guiclass="HttpDefaultsGui"
> testclass="ConfigTestElement" testname="HTTP Request Defaults"
> enabled="true">
>          <elementProp name="HTTPsampler.Arguments" elementType="Arguments"
> guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined
> Variables" enabled="true">
>            <collectionProp name="Arguments.arguments"/>
>          </elementProp>
>          <stringProp name="HTTPSampler.domain">10.1.38.144</stringProp>
>          <stringProp name="HTTPSampler.port"></stringProp>
>          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>          <stringProp name="HTTPSampler.response_timeout"></stringProp>
>          <stringProp name="HTTPSampler.protocol"></stringProp>
>          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>          <stringProp name="HTTPSampler.path"></stringProp>
>        </ConfigTestElement>
>        <hashTree/>
>        <CookieManager guiclass="CookiePanel" testclass="CookieManager"
> testname="HTTP Cookie Manager" enabled="true">
>          <collectionProp name="CookieManager.cookies"/>
>          <boolProp name="CookieManager.clearEachIteration">false</boolProp>
>        </CookieManager>
>        <hashTree/>
>        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler"
> testname="AskMIKe Request" enabled="true">
>          <elementProp name="HTTPsampler.Arguments" elementType="Arguments"
> guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined
> Variables" enabled="true">
>            <collectionProp name="Arguments.arguments"/>
>          </elementProp>
>          <stringProp name="HTTPSampler.domain"></stringProp>
>          <stringProp name="HTTPSampler.port"></stringProp>
>          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>          <stringProp name="HTTPSampler.response_timeout"></stringProp>
>          <stringProp name="HTTPSampler.protocol"></stringProp>
>          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>          <stringProp
> name="HTTPSampler.path">ScoobyDoo/home.htm</stringProp>
>          <stringProp name="HTTPSampler.method">GET</stringProp>
>          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
>          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
>          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
>          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
>          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
>          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
>          <stringProp name="HTTPSampler.mimetype"></stringProp>
>          <boolProp name="HTTPSampler.monitor">false</boolProp>
>          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
>        </HTTPSampler>
>        <hashTree/>
>        <ResultCollector guiclass="ViewResultsFullVisualizer"
> testclass="ResultCollector" testname="View Results Tree" enabled="true">
>          <boolProp name="ResultCollector.error_logging">false</boolProp>
>          <objProp>
>            <name>saveConfig</name>
>            <value class="SampleSaveConfiguration">
>              <time>true</time>
>              <latency>true</latency>
>              <timestamp>true</timestamp>
>              <success>true</success>
>              <label>true</label>
>              <code>true</code>
>              <message>true</message>
>              <threadName>true</threadName>
>              <dataType>true</dataType>
>              <encoding>false</encoding>
>              <assertions>true</assertions>
>              <subresults>true</subresults>
>              <responseData>false</responseData>
>              <samplerData>false</samplerData>
>              <xml>true</xml>
>              <fieldNames>false</fieldNames>
>              <responseHeaders>false</responseHeaders>
>              <requestHeaders>false</requestHeaders>
>              <responseDataOnError>false</responseDataOnError>
>
>  <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
>              <assertionsResultsToSave>0</assertionsResultsToSave>
>              <bytes>true</bytes>
>            </value>
>          </objProp>
>          <stringProp name="filename">C:\Temp\resultTree.jtl</stringProp>
>        </ResultCollector>
>        <hashTree/>
>      </hashTree>
>    </hashTree>
>  </hashTree>
> </jmeterTestPlan>
> *****************
>
> How to solve this issue?
>
> Thanks a lot,
> Benoit Coppens
> Senior Consultant, Global IT Medical Information
> UCB Pharma S.A. Belgium
> All4IT
> Chemin du Foriest, 1420 Braine-l'Alleud, Belgium
> Tel: +32 2 386 25 71
> Fax: +32 2 386 32 44
> Email: benoit.coppens@ucb....
> Web-site: http://www.ucb.com/
>
> --------------------------------------------------------
>
> Legal Notice: This electronic mail and its attachments are intended solely
> for the person(s) to whom they are addressed and contain information which
> is confidential or otherwise protected from disclosure, except for the
> purpose for which they are intended. Dissemination, distribution, or
> reproduction by anyone other than the intended recipients is prohibited and
> may be illegal. If you are not an intended recipient, please immediately
> inform the sender and return the electronic mail and its attachments and
> destroy any copies which may be in your possession. UCB screens electronic
> mails for viruses but does not warrant that this electronic mail is free of
> any viruses. UCB accepts no liability for any damage caused by any virus
> transmitted by this electronic mail. (Ref: #*UG1107)
> --------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jaka...
> For additional commands, e-mail: jmeter-user-help@jaka...
>
>

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.