使用jdk 1.8的jmeter 2.11中的所有HTTP请求中的连接拒绝异常 [英] Connection refused exception in all HTTP requests in jmeter 2.11 with jdk 1.8
问题描述
我有一个非常简单的jmeter项目.我只是向我的Web服务wsdl文件发送了一个 HTTP GET请求,以验证一切是否正常.但是,myinternal.server.local/ws/calc 网络服务请求和myinternal.server.local/ws/calc?wsdl的HTTP GET均失败,并带有以下例外;
I have a very plain jmeter project. I just send an HTTP GET request to my webservice wsdl file to verify if everything is working fine. However both the myinternal.server.local/ws/calc webservice request and HTTP GET to myinternal.server.local/ws/calc?wsdl fail with following exceptions;
Non HTTP response code: org.apache.http.conn.HttpHostConnectException
Non HTTP response message: Connection to https://myinternal.server.local
我确定Web服务能够正常工作,因为我可以通过SOAP UI调用它,并且当 https://myinternal.server.local/ws/calc?wsdl 被调用.
I am sure that webservice works because I can invoke it with via SOAP UI and IE displays the wsdl when https://myinternal.server.local/ws/calc?wsdl is called.
HTTP请求返回
org.apache.http.conn.HttpHostConnectException: Connection to https://myinternal.server.local refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
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.sample(HTTPHC4Impl.java:286)
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(Thread.java:722)
Caused by: java.net.ConnectException: connect: Connection timed out
选择SOAP/XML-RPC请求后,它将返回
When SOAP/XML-RPC Request is selected then it returns
Caused by: java.net.ConnectException: connect: Connection timed out
我正在使用Jmeter 2.11 @ 64位Windows-7的JDK 1.8.0_20(64位)
I am on JDK 1.8.0_20 (64-bit) with jmeter 2.11 @64 bit Windows-7
您能想到根本原因是什么吗?
Can you think of what the root cause can be?
此致
推荐答案
请按照以下步骤操作:
- 使用"模板"
- 选择"构建SOAP Web服务测试计划",并选择点击"创建"按钮.
- 然后编辑值以指向您自己的wsdl,并根据需要修正请求xml.
- Use the "templates"
- select "Building a SOAP WebService Test Plan" & click on "Create" button.
- then edit the values to point to your own wsdl, and fix up the request xml as required.
对于https,您可能需要在HTTP Request默认值中指定端口443,但是我发现SOAP/RPC采样器在不使用默认元素的情况下处理https.
只需在采样器中指定整个URL.如果该协议不是默认端口,则可以在URL中包括该端口.
For https you will probably need to specify port 443 in the HTTP Request defaults, but I have found the SOAP/RPC sampler handles https without using the default element.
Just specify the entire URL in the sampler. You can include the port in the URL if it is non-default for the protocol.
这篇关于使用jdk 1.8的jmeter 2.11中的所有HTTP请求中的连接拒绝异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!