Search code examples
jmetermaster-slaveconnection-refused

Unable to do master-slave setup on AWS instances. When i run jmeter script from master i get an exception


. I am getting below error, firewalls have been disabled on both servers

Connection refused to host: 10.XX.XX.XXX; nested exception is: 
    java.net.ConnectException: Connection refused (Connection refused)
  1. I have set below on slave in jmeter.properties

    server_port=1099 server.rmi.localport=50000

  2. Master has below setting in jmeter.properties

    remote_hosts= slave.ip,master.ip (as i want to use master as slave as well) client.rmi.localport=60000

I have generated the rmi_keystore.jks file and placed that on slave server bin folder.

After that i started the slave server to listen by using

./jmeter-server -Djava.rmi.server.hostname=10.xx.xx.xxx

It then starts the slave server.

After that i run the script from master in non-gui mode.

./jmeter -n -t pathtoscript.jmx -l logfilepath.csv -r
Creating summariser <summary>
Created the tree successfully using pathtoscript.jmx
Configuring remote engine: 10.xx.xx.xxx
Connection refused to host: 10.xx.xx.xxx; nested exception is: 
    java.net.ConnectException: Connection refused (Connection refused)
Failed to configure 10.xx.xx.xxx (this is slave ip)
Configuring remote engine: 10.xx.xx.xxx (this is my master ip)
Connection refused to host: 10.xx.xx.xxx; nested exception is: 
    java.net.ConnectException: Connection refused (Connection refused)
Failed to configure 10.xx.xx.xxx (this is my master ip)
Stopping remote engines
Remote engines have been stopped
Error in NonGUIDriver java.lang.RuntimeException: Following remote engines could not be configured:[10.xx.xx.xxx, 10.xx.xx.xxx]

Solution

  • My issue is resolved.

    Slave command: ./jmeter-server -Dserver.rmi.localport=50000 -Dserver_port=1099 -Djava.rmi.server.hostname="Slaveipaddress" -Jserver.rmi.ssl.disable=true

    Master command: ./jmeter -n -t script.jmx -RSlaveipaddress -l results.jtl -Jserver.rmi.ssl.disable=true

    Also make sure if you have any plugins in script it should be present on both master and slave as well as data file (if reading data from file) should be present on the same location on both master and slave