Unable to run Tests due to proxy issue

310 views
Skip to first unread message

dannym...@gmail.com

unread,
Mar 10, 2018, 4:14:14 AM3/10/18
to codename-taurus
Hi,

I have created a jmeter script. In the advanced tab of the 'HTTP Defaults' I have mentioned the proxy server, port, username/password. When I run this script through jmeter in the corporate network it runs without any issue. Also when I ran this test with this jmx file through Taurus, it ran without any issue (bxt myScript.jmx).

After this I converted the .jmx to .jmx.yaml through the tool jmx2yaml. In the .jmx.yaml script the proxy details were not mentioned. So I mentioned the same in the file .bzt-rc like below

# General Settings

settings:
  default-executor: jmeter  # if you prefer using other executor by default - change this option
  artifacts-dir: ~/bzt-artifacts/abc/%Y-%m-%d_%H-%M-%S.%f  # change the default place to store artifact files
  check-updates: false  # check for newer version of Taurus on startup
  check-interval: 1s  # interval for Taurus engine to check test status and do other actions
  proxy:  # custom proxy settings
    address: http://proxyserver:port  # proxy server address
    username: myUser  # username and password used if authentication is configured on proxy server
    password: myPass



Now when I run the command 'bzt myScript.jma.yaml', I get the below exception. Please can you help me solve this issue ?

java.net.UnknownHostException: 
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:318)
at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:114)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:697)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:455)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
at java.lang.Thread.run(Unknown Source)

I am using Taurus with Jmeter 4.0.

Regards,
Danny

Message has been deleted

dannym...@gmail.com

unread,
Mar 13, 2018, 3:06:36 AM3/13/18
to codename-taurus
Hi,

Please disregard the earlier post. I solved it by adding the below in the .bzt-rc file

# JMeter settings

modules:
  jmeter:
    properties:  # JMeter properties for every JMeter run
      prop_name: prop value
    system-properties:  # JMeter properties for every JMeter run
      http.proxyHost: www.proxy.com
      http.proxyPort: 1234
      http.proxyUser: user
      http.proxyPassword: pass
    memory-xmx: 4G  # allow JMeter to use up to 4G of memory
    path: ~/.bzt/jmeter-taurus/4.0/bin  # path to local jmeter installation
    version: 4.0  # version to use
    plugins:  # plugins to install
    - jpgc-json
    - jmeter-ftp
    - jpgc-casutg

Regards,
Danny
Reply all
Reply to author
Forward
0 new messages