Connection refused to host

Problem:

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

Explanation:

In the distributed mode of JMeter, while connecting the master with the slave machines, sometimes master machine 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:
        java.net.ConnectException: Connection refused (Connection refused)

Error Screenshot:

Connection refused to host in JMeter
Figure 01: Error Screenshot

Solution:

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 host machine via RDC (Windows host) or Putty (Linux host)
  2. Navigate to the /bin folder of JMeter.
  3. Execute jmeter-server file on Windows host Or run the command ./jmeter-server on Linux host.
  4. Start the test once again

Leave a Reply

Your email address will not be published. Required fields are marked *