0

I have very recently started to look at Jmeter for non-functional testing web applications and have found numerous articles, tutorials etc including this Where can I find good JMeter tutorials? which has lots of links to useful information, which is great, but none of these are really solving my issue.

I have built my first test plan in Jmeter, but when I run it I get an error:

Error initialising remote server: 127.0.0.1

Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect

So my question is, do I need to set my java.rmi.server.hostname property at the server? If so, how? Is this done in the jmeter.properties file? If so, I tried changing remote_hosts=127.0.0.1 to the IP address of the target server once I had pinged it to find the address, but this did nothing and still produced the error as it appears to be binding to 127.0.0.1

Set my environment variables as:

JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_05

JMETER_HOME=C:\Program Files\apache-jmeter-2.11

In Jmeter I've built a test plan as follows:

Test plan element: Added a variable

Name: site, Value: testenvironment:8012

Thread Group element:

Threads = 1, Ramp-up = 1, Loop count = 1

HTTP Request Defaults element:

Server name or IP = ${site}

HTTP Cookie Manager element

HTTP Request element:

Path = /Login/Index Method = POST

Added two parameters:

Username with value and Password with value

View Results in Table

Response Assertion

Click remote start and the error is produced.

Please help.

1
  • Can you please list the steps you follow to run your test? Maybe your executing a distributed test without setting up a master and slave where you should be executing single machine! Sep 30, 2014 at 16:24

2 Answers 2

2
  1. java.rmi.server.hostname property can be set either in system.properties file (which lives under /bin folder of your JMeter installation) or passed directly to JMeter startup script via -D key as

    jmeter -Djava.rmi.server.hostname=10.20.30.40
    

    This way you can specify interface to bind to. See Apache JMeter Properties Customization Guide for more details on manipulating JMeter properties.

  2. If you one just one host there is no need to use distributed testing. If you want to test the approach check out JMeter Distributed Testing Step-by-step guide. If you're going to use a single machine for it you'll need to launch both master and slave on it.

0

adding local ip address with port number in JMETER.PROPERTIES instead of 127.0.0.1. resolved my issue

Under Remote hosts and RMI configuration remote_hosts = 10.x.x.x:1099,10.x.x.y:1099

Do this configuration to each slave as well. for slave only local ip to remote_hosts = 10.x.x.y:1099

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.