Connection refused to host


  • How to solve “Connection refused to host” error in JMeter?
  • Connection error while running the JMeter test in distributed (remote) mode.


In the distributed mode of JMeter, while connecting the master with the slave machines, sometimes the master machine is unable to set up a connection with host (slave) machines and throws an error. The exact error statement is:

Connection refused to host: <slave machine IP>; nested exception is: Connection refused (Connection refused)

Error Screenshot:

Connection refused to host in JMeter
Figure 01: Error Screenshot


This error comes when jmeter-server service doesn’t run on the host (slave) machines. Follow the below steps to solve this issue:

  1. Login to the host machine via RDC (Windows host) or Putty (Linux host)
  2. Navigate to the /bin folder of JMeter.
  3. Execute jmeter-server file on the Windows host Or run the command ./jmeter-server on the Linux host.
  4. Start the test once again

You may be interested:

Leave a Comment