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.