Hi,

Recently I upgraded from Apache JMeter 2.13 to JMeter 3.3 and have encountered 
some difficulties with the Cookie Manager, which I wanted to ask about.

For a scenario that worked fine in v2.13 when I switched to v3.3, I noticed 
that I was receiving errors in the error log of the following ilk:

************************************************************************************************
ERROR o.a.j.p.h.c.HC4CookieHandler: Unable to add the cookie
org.apache.http.cookie.MalformedCookieException: Blank or null value for domain 
attribute
                at 
org.apache.http.impl.cookie.BasicDomainHandler.parse(BasicDomainHandler.java:60)
 ~[httpclient-4.5.5.jar:4.5.5]
                at 
org.apache.http.impl.cookie.RFC6265CookieSpec.parse(RFC6265CookieSpec.java:181) 
~[httpclient-4.5.5.jar:4.5.5]
                at 
org.apache.jmeter.protocol.http.control.HC4CookieHandler.addCookieFromHeader(HC4CookieHandler.java:125)
 [ApacheJMeter_http.jar:4.0 r1823414]
                at 
org.apache.jmeter.protocol.http.control.CookieManager.addCookieFromHeader(CookieManager.java:361)
 [ApacheJMeter_http.jar:4.0 r1823414]
                at 
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.saveConnectionCookies(HTTPHC4Impl.java:1583)
 [ApacheJMeter_http.jar:4.0 r1823414]
                at 
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:528)
 [ApacheJMeter_http.jar:4.0 r1823414]
                at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
 [ApacheJMeter_http.jar:4.0 r1823414]
                at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
 [ApacheJMeter_http.jar:4.0 r1823414]
                at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
 [ApacheJMeter_http.jar:4.0 r1823414]
                at 
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
 [ApacheJMeter_core.jar:4.0 r1823414]
                at 
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416) 
[ApacheJMeter_core.jar:4.0 r1823414]
                at 
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250) 
[ApacheJMeter_core.jar:4.0 r1823414]
                at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
***************************************************************************************************

The scenario runs to completion and is stepping through appropriately but each 
time an HTTP request is made, another error is added to the log.

Research revealed that others have encountered this, with the suggestion of 
changing "CookieManager.check.cookies=false" in the jmeter.properties file. The 
error still persisted however.  Another suggestion was to change the 
implementation in the Cookie manager but this is not an option in newer 
versions of JMeter (available in 2.13 but not 3.3 or 4.0).  Coincidentally when 
I changed the implementation in JMeter 2.13 from "HC3CookieHandler" to 
"HC4CookieHandler" I got the same errors in there too.

It might be worth noting that this only occurs with tests for a specific 
project.  Other projects moved from JMeter 2.13 to JMeter 3.3 seamlessly.  The 
concern is that for larger tests at higher volumes, although the scenarios 
work, the JMeter log fills up with these error messages for every single hit.  
I am wondering if there is a way around this and why it only seems to occur in 
most recent versions of JMeter?

Finally the cookie that is being returned is along the lines of the following.

".ASPXAUTH={token}; path=/; expires=Sun, 18-Feb-2018 12:32:10 GMT; domain="

Regards

Steven

Reply via email to