title: jmeter won't keep cookies across thread groups
body: <p>(there seem so be various problems regarding the CookieManager, but I could not find my problem while searching)</p>
  
  <p>I'm trying to figure out why the Cookie Manager isn't keeping my cookie, but I'm running out of ideas.</p>
  
  <p>Using jmeter <em>2.13</em></p>
  
  <p>I have the following Test Plan setup:</p>
  
  <pre><code>- HTTP Headers
  - HTTP Cookie Manager ("clear each iteration" is NOT checked, policy=compatibility, tried both implementation options)
  - Thread group 1
      -- perform login (returns a Set-Cookie header as expected)
  - Thread groups 2-n
      -- send http queries using cookies from login (this is the plan!)
  </code></pre>
  
  <p>Each request returns 200, there are no redirects anywhere (except where the second thread redirects to the login page because it is missing the cookie)</p>
  
  <p>My problem: 
  prior to entering Thread Group 2, the log says that the CookieManager has cleared all cookies. I can't see why - isn't it supposed to keep them, since the header Manager is a top-level element?</p>
  
  <p>here is the section of the log that shows this (the line in question is marked with ######):</p>
  
  <pre><code>    2015/06/30 16:19:55 INFO  - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : TEST LOOP 0 - login 
      2015/06/30 16:19:55 INFO  - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group TEST LOOP 0 - login. 
      2015/06/30 16:19:55 INFO  - jmeter.engine.StandardJMeterEngine: Thread will continue on error 
      2015/06/30 16:19:55 INFO  - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false 
      2015/06/30 16:19:55 DEBUG - jmeter.protocol.http.control.CookieManager: Clear all cookies from store 
      2015/06/30 16:19:55 INFO  - jmeter.threads.ThreadGroup: Started thread group number 1 
      2015/06/30 16:19:55 INFO  - jmeter.engine.StandardJMeterEngine: Waiting for thread group: TEST LOOP 0 - login to finish before starting next group 
      2015/06/30 16:19:55 INFO  - jmeter.threads.JMeterThread: Thread started: TEST LOOP 0 - login 1-1 
      2015/06/30 16:19:55 DEBUG - jmeter.protocol.http.control.HC3CookieHandler: Found 0 cookies for [url edited] 
      2015/06/30 16:19:56 DEBUG - jmeter.protocol.http.control.HC3CookieHandler: Received Cookie: JSESSIONID_PUBLIC=swfw6xfdo0es18e5ux1xhad6a;Path=/url/edited;HttpOnly From: [url edited] 
      2015/06/30 16:19:56 DEBUG - jmeter.protocol.http.control.CookieManager: Add cookie to store server-edited   TRUE    /url/edited FALSE   0   JSESSIONID_PUBLIC   swfw6xfdo0es18e5ux1xhad6a 
      2015/06/30 16:19:56 INFO  - jmeter.threads.JMeterThread: Thread is done: TEST LOOP 0 - login 1-1 
      2015/06/30 16:19:56 INFO  - jmeter.threads.JMeterThread: Thread finished: TEST LOOP 0 - login 1-1 
      2015/06/30 16:19:56 DEBUG - jmeter.protocol.http.sampler.HTTPHC4Impl: Thread Finished 
      2015/06/30 16:19:56 INFO  - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 2 : TEST LOOP 1 - search, high frequency, Ssd-Requests 
      2015/06/30 16:19:56 INFO  - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group TEST LOOP 1 - search, high frequency, Ssd-Requests. 
      2015/06/30 16:19:56 INFO  - jmeter.engine.StandardJMeterEngine: Thread will continue on error 
      2015/06/30 16:19:56 INFO  - jmeter.threads.ThreadGroup: Starting thread group number 2 threads 1 ramp-up 20 perThread 20000.0 delayedStart=false 
      ##### 2015/06/30 16:19:56 DEBUG - jmeter.protocol.http.control.CookieManager: Clear all cookies from store ######
      2015/06/30 16:19:56 INFO  - jmeter.threads.ThreadGroup: Started thread group number 2 
      2015/06/30 16:19:56 INFO  - jmeter.engine.StandardJMeterEngine: All thread groups have been started 
      2015/06/30 16:19:56 INFO  - jmeter.threads.JMeterThread: Thread started: TEST LOOP 1 - search, high frequency, Ssd-Requests 2-1 
  </code></pre>
  
  <p>I've tried changing some settings in jmeter.properties:</p>
  
  <pre><code> CookieManager.save.cookies=true
  </code></pre>
  
  <p>as well as</p>
  
  <pre><code>CookieManager.check.cookies=false
  </code></pre>
  
  <p>but neither seems to work.</p>
  
  <p>My first theory was that it has to do with the fact that the cookie in question has no expiry added, but I do not see an error when adding it - just that it gets deleted again when it should not.</p>