JMeter issue running in Remote Mode on Ubuntu

I do a lot of performance testing with JMeter and every now and again you get thrown a curve ball. I was trying set up a remote performance testing cluster and when invoking the servers with JMeter RMI calls the tests were executing but the valuable results were not coming back to the client. Looking at the log…

…(jmeter-server.log on server machine) I could see that the connection back failed. I must add, that I am using Ubuntu in a headless mode to do these things and it looks like a Linux/Debian only issue.

The log output was:

ERROR - jmeter.JMeter: Uncaught exception: org.apache.jorphan.util.JMeterError: Could not return sample
 at org.apache.jmeter.samplers.AsynchSampleSender$
Caused by: java.rmi.ConnectException: Connection refused to host:; nested exception is: Connection refused

After searching the web for quite a bit there was little to go on. Eventually I figured out that the issue is actually on the client side and not the server-side as you would anticipate by the error log. Google didn’t quite help as much as I would have liked it to so I thought I’d just do a blog post o that others can find a clearer answer.

The solution is to go into the /etc/hosts file and find the entry that looks something like     <server-name1> <server-name2>

Comment this line out with a # or delete it completely.

Please note though that I don’t know if this has any other implications. The line was added to deal with issues in Debian when using Gnome.

I hope this helps someone else that runs into the same issue and sorry to the non technical people out there for this post.


4 thoughts on “JMeter issue running in Remote Mode on Ubuntu

  1. Hi Oliver – I quite like the idea of running tests using headless Ubuntu. In past I’ve run the tests on Windows based cluster and noticed that it slows the JMeter-master machine. We had to get a grunty machine to cope with that. Eventually we’ve moved on to an internal VM farm.

  2. Hi Farid,
    My experiences with JMeter and Windows have been sketchy at best. Windows just does not have the resiliency in their networking stack. Linux is more predictable and can be controlled more fine grained. Never mind that you have shell scripts, cron, PHP, Python and ruby in easy reach. I’d keep my fingers off Windows bar during test design phase (but you can use a Mac or Linux desktop for that too).
    Cheers Oliver

  3. Pingback: JMeter remote testing back-ends through tunneling « iPROFS Technology Blog

  4. Hi Oliver,
    I have been encountering issue related to connection refused to Client host from server and error message seen on jmeter-server.log. I have provided below steps that were followed to configure the jmeter distribution setup. Can you review and through some-light on this issue?

    1. Client and servers on same VPC, subnet and same version of Jmeter i.e. 3.1.
    2. All servers & Client instances were with Linux Operating system.
    3. Set Client.rmi.localport =60000 on Client EC2 instances
    4. set remote_hosts with server IPs
    5. Set server.rmi.localhost=50000 on Server EC2 instances
    6. jmeter-server was started on server instances
    7. create a security group with 60000, 4445 & 22 ports for Master (client) instance.
    8. Create a security group with 50000, 1099,22, 80,443 ports server instances.

    ERROR – jmeter.samplers.RemoteListenerWrapper: testStarted(host) java.rmi.ConnectException: Connection refused to host: (Host Private IP); nested exception is: Connection timed out (Connection timed out)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s