6

I am running a Jmeter script on a web-application which is hosted on IIS and using ADFS authentication mechanism. For each request in Jmeter,it fails due to "Java.Net.SocketException ".

What I have done is: Used HTTP Authentication manager to provide credentials for each user from CSV data config element.But seems like still Jmeter is not logging-in.

Followed the documentation of Jmeter HTTP authorization manager but it looks like it's not login to the application

In the Jmeter log files -I see is :

org.apache.commons.httpclient.auth.AuthChallengeProcessor: ntlm authentication scheme selected 
2014/05/22 16:34:22 INFO  - org.apache.commons.httpclient.HttpMethodDirector: No credentials available for NTLM <any realm>@DomainName:PortNumber ..
2014/05/22 16:34:31 INFO  - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP request retry count = 1 
2014/05/22 16:34:31 INFO  - jmeter.protocol.http.sampler.HTTPHC4Impl: Setting up HTTPS TrustAll scheme 
2014/05/22 16:34:32 INFO  - org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$4: I/O exception (java.net.SocketException) caught when processing request: Connection reset 
2014/05/22 16:34:32 INFO  - org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$4: Retrying request 
2014/05/22 16:34:32 INFO  - org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$4: I/O exception (java.net.SocketException) caught when processing request: Connection reset 
2014/05/22 16:34:32 INFO  - org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$4: Retrying request 
_________________
java.net.SocketException: Connection reset
    at sun.reflect.GeneratedConstructorAccessor64.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
    at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.readResponse(HTTPJavaImpl.java:264)
    at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:520)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at sun.security.ssl.InputRecord.readFully(Unknown Source)
    at sun.security.ssl.InputRecord.read(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
    at sun.security.ssl.AppInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)

Can above exception occur due to authentication failure ?

Please suggest to resolve this issue.

Thanks in advance!!

4
  • Verify that there is not an opened session with same login and password used in jmeter test it's maybe the reason Commented May 23, 2014 at 15:37
  • @lmen - Thank-you for the suggestion.. I closed all the opened session with used login and password in Jmeter test..and re-started Jmeter and again executed the same test but I am getting the same error.. Commented May 23, 2014 at 20:52
  • You are welcome, So verify your network connection, also verify that you are accessing to the right url with the write port number. did you use http(s) script recorder to record actions in the browser? Commented May 23, 2014 at 21:20
  • I will definitely verify the connection ,url and port details and let you know what happens and No, I have not used HTTP(s) script recorder to record actions in the browser .@lmen - Thank-you for your quick reply and help.. Commented May 27, 2014 at 12:32

2 Answers 2

2

After some days of troubleshooting - I found that each of my requests was failing because of login failure.

So when Jmeter login fails at that time it does not get Security token in response and for every request security token is sent as a cookie.

So When that cookie is empty at that time server asks for credentials and Jmeter request was failing because of Java.Net.SocketException.

The example security token is -

Cookie Data:

Token=Vodu/2j9Hg5Z59PxJ3qAGMGOqFUrcGezGku3X6xn8QYMPdgxfVGEY+IPeO3PwPTDep0DaahTZflE+9UTE426w3p/pp1EiwL0IyJ5lkmIaQUz6byZX0+sEUnUoDhhr+ej5Myu2xkoICDfhwR5XSlBw53OlO9L7rLr/rbFK+JXkS/OKQydShS9J2eULIwy1RgXZaqLi/zn5KlNxaF/vnM9j/TECcPUfcq3nQaCornwXetxIhtWCQfZYZBh57iypzyreqnm6VRS93FNkjq8jQ4XYWZ2BA4xlrLhkXmZCcsTNQ2M2TEJfieFMwOHvTEdQcZ4WZVTvCccgv2YFkA2vcM2tnm9Fi6gQuiOR5lDYutat7zHoskQ1bCeJbeNUL2NO7Ixu/4l9Btoxoj2+E/ceP44RAYwDLVFingMLwpajKKTQHBN64gTEkfJg5VzBTpsIs7k+XnJsvNhS4ZzUXbtdPM9yyeO5nVhFQPFST6i/9zxt0kPCN4tfU0GjLp5jNkXca/hMZEyxv0vxSSnaPoNVbmd7sougchupFWyfRVDZg0oq34EU1BK57H7Jwcficliv3EO3alTDGihtEwjdjCH187L2YfEUXqum3uGurccsAwk0M/GUsUWAZQzziDnvH+weK9yV5hvUEEyIVBc4ja8WrtxMBT+Opfr1VZbD3nKtTwP1EWtf+eegcmGWbH4WRxFwVaBcGO7iz+75zUHBoRkq+W2o8fBTgFk4zGFmIxVH/qnMbNU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RurwdUz2qGz6JPdu3WyrLzkUnvEh3+zDxZqnbbKbpYFQXQrkm97oBQjNDjs9uWKnz7TjPET1qlLMksDgr/dfDmspzOXNyxtncFB7po9hyfSreNJ9oZcTJ77Q3RjgxzZa8tny5MQxzKHpzaBmUDjBMGGfqRpR6bjMe98/5bxgdMitVEcUHxWBQP/gTmFWSmHVoorFvpL1G0GIRdNDC7q8B6JcLoScPEK8EYyt/S9Lsf8TfOKxjU0hrptZ3k8NxCIGnQpU2/n2hJhLV5DodP2aYknZ0KEgzO9IuoVbcFMcnhTahnJm6mynr5GWUzEcgZ5FhuinhiuhOB79XdXm+6Z9kp8FdFGgxctJd2U72; .ASPXAUTH=E2EF9B7E3395B09FE1988C1A20BA2DD5A395FF15E40C5BA0C078038D799CC8A234602A4788565EBB30804E91154713FBB8E935FF1868871697C6B9681F8D181F2104BDDDAF645A87307FE7B6434D2F749BA6684F49E301FDA40703D0C8B4CAFBE2837D1BB84EE7A0DA66ABA5D61D074EBC985CBA6C5F3E94053878E4AD942393A71F5563259F4A584C3789F523174B3B
Sign up to request clarification or add additional context in comments.

Comments

1

You may have improper configuration of your HTTP Authorization Manager

As per AD FS 2.0: How to Change the Local Authentication Type ADFS can be configured to support following authentication types:

  1. Integrated Windows authentication (IWA) - NTLM or Kerberos
  2. Forms-based authentication (FBA)
  3. Transport layer security client authentication
  4. Basic authentication

Points 1 and 4 can be handled via HTTP Authorization Manager. See Windows Authentication with Apache JMeter guide for how-to.

Point 2 can be handled via correlation (i.e. Regular Expression Extractor)

Point 3 I believe it can be handled via Keystore Configuration

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.