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$Worker.run(AsynchSampleSender.java:148) Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is: java.net.ConnectException: 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
127.0.1.1 <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.
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.
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
Pingback: JMeter remote testing back-ends through tunneling « iPROFS Technology Blog
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: java.net.ConnectException: Connection timed out (Connection timed out)