当前位置: 首页 > 知识库问答 >
问题:

发送JMETER请求到IP地址错误

席俊驰
2023-03-14

在JMETER中,高级选项下的Http请求,我选择了'IP/Hostname'并添加了IP地址。我还将目标IP添加到计算机中的“高级TCP/IP设置”中,但仍然得到以下错误:

java.net.BindException: Cannot assign requested address: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.Socket.bind(Unknown Source)
at 

在org.apache.http.conn.socket.plainConnectionSocketFactory.connectSocket(plainConnectionSocketFactory.java:72)在org.apache.http.impl.conn.defaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)在org.apache.jmeter.protocol.http.sampler.httperDefaulthTtpClientConnectionOperator.java:142)在在org.apache.http.impl.execchain.mainclientexec.execute(mainclientexec.java:394)在org.apache.http.impl.execchain.protocolexec.execute(mainclientexec.java:237)在org.apache.http.impl.execchain.retryexec.execute(protocolexec.java:185)在org.apache.http.impl.execchain.retryexec.execute(retryexec.java:89)在org.apache.http.impl.execchain.redirectexec.execute(retryexec.java:110)在he.http.impl.client.closeableh在org.apache.jmeter.protocol.httpp.sampler.httphc4impl.executeRequest(httphc4impl.java:832),在org.apache.jmeter.protocol.httpp.sampler.httphc4impl.sample.sample.httpsampler.java:570),在org.apache.jmeter.protocol.httppsampler.java:67,在org.apache.jmeter.httppsampler.httppsampler.httpsampler.httpsampler.sample.sample(httpsamplerbase.sample(httpsamplerbase.java:1231)he.jmeter.protocol.http.sampler.httpsamplerbase.sample(httpsamplerbase.java:1220)在org.apache.jmeter.threads.jmeterThread.doSample(jmeterThread.java:622)在org.apache.jmeter.threads.jmeterThread.executesAmplePackage(jmeterThread.java:546)在org.apache.jmeter.threads.jmeterThread.jmeterThread.jmeterThread.processSampler(jmeterThread.java:486)在

是任何人都可以帮助如何解决这个问题,以及是什么可能导致这个错误。

谢谢你。

共有1个答案

司徒志
2023-03-14

按照BindException描述:

试图将套接字绑定到本地地址和端口时发生错误的信号。通常,端口正在使用,或者无法分配请求的本地地址。

您所做的是更改源IP地址(又名IP欺骗),该技术将您的IP地址替换为另一个(或别名),允许JMeter模拟来自不同IP地址的请求,因为默认情况下它将只使用一个IP

 类似资料:
  • 我在本地网络的另一台计算机上启动了一个Apache web服务器,该服务器的根文件夹中有一个.php文件,因此我可以使用“192.168.1.5/connect.php?param1=value1&param2=value2”这样的地址从浏览器发送请求。我真的需要从我的Java代码(通过使用HttpUrlConnection),但由于某种原因,它只适用于url,而不适用上面提到的IP地址。有没有一

  • 问题内容: 我对本机Ajax请求调用有一个奇怪的问题。 我正在创建Ajax对象并发送请求,如下所示: .... 当我使用类似的URL访问servlet时,则无法在客户端得到响应。但是我可以在服务器端看到响应。 与我调用请求的方式非常相似 我的网址是,那么我也无法在客户端看到响应。 我知道解决问题的最佳方法。 我可以用 那么我的本地主机或IP地址都没有问题。 但是我仍然认为为什么ajax请求中的本地

  • 我有一个restful请求,需要使用JMeter将其发送到webservice。以下是我的建议: 异常:服务器11.92.0.91在org.apache.commons.httpclient.httpmethodbase.readstatusline(httpmethodbase.java:1976)在org.apache.commons.httpclient.httpmethodbase.jav

  • 我使用PHPMailer发送电子邮件,我使用此代码添加要发送到的电子邮件地址: 它适用于一封电子邮件,但不适用于多封电子邮件。 我听到一个错误,说 您必须提供至少一个收件人电子邮件地址。

  • 我写了一个小的协议栈来连接KNX/IP路由器。机制如下: null

  • 问题内容: 我正在使用python中的请求库发出HTTP请求,但我需要来自响应http请求的服务器的IP地址,因此,我试图避免进行两次调用(可能与响应的IP地址不同)请求。 那可能吗?是否有任何python http库允许我这样做? ps:我还需要发出HTTPS请求并使用经过身份验证的代理。 更新1: 例: 然后,我想知道响应中的方法或属性将哪些IP地址请求连接到了。在其他库中,我可以通过找到袜子