簡體   English   中英

使用JMeter的NTLM身份驗證正在接收SocketException

[英]NTLM Authentication with JMeter is receiving a SocketException

我正在嘗試使用JMeter(版本2.13)進行負載測試SSO請求。 我按照教程進行操作,並設置了一個HTTP授權管理器,其用戶名,密碼,域和機制= BASIC_DIGEST。

當我將HTTP請求的代理服務器設置設置為Server Name或IP = 127.0.0.1和Port Number = 8888時,我可以看到我的請求通過了fiddler,並在其中得到兩個401響應,然后成功。 這將作為單個成功請求顯示在JMeter視圖結果樹中。 但是,當我刪除代理服務器設置時,請求失敗,並且得到以下響應:

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.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:436)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
    at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:107)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:517)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:331)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
    at java.lang.Thread.run(Unknown Source)

日志查看器也這樣說:

org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$6: I/O exception (java.net.SocketException) caught when connecting to the target host: Connection reset

我一直在嘗試各種方法來在沒有代理設置的情況下實現此目的,包括使用HttpClient4實現,在user.properties中設置以下內容

hc.parameters.file=hc.parameters

以及httpclient.parameters中的以下內容

http.protocol.reject-relative-redirect$Boolean=true

我還將注意到,當我通過Fiddler運行測試時,會提示我是否要忽略遠程證書錯誤

Session #106: The remote server (server name here) presented a certificate that did not validate, due to RemoteCertificateChainErrors.
0 - Unknown error.

我假定這不會使JMeter的任何區別,因為我的是JMeter的HTTP取樣器配置為接受所有證書。

任何幫助啟動和運行(沒有Fiddler)的幫助將不勝感激。

問題是我試圖連接到必需的TLS版本1.0的安全憑據存儲。 我不得不告訴JMeter通過更新jmeter.properties文件來使用它:

https.default.protocol=TLS
https.socket.protocols=TLSv1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM