0

I am currently using Jmeter v5.2 for Remote Testing and trying to connect to the slave. Followed all steps from Jmeter user manual. At the end i could not see the results in my master machine and i am getting below error.

System property 'java.rmi.server.hostname' is not defined, using localHost address

I believe i have crossed check if any mistake from my side, like

  1. Both Running on same version of Jmeter and Windows
  2. Ensuring nothing is listening on the Port

but yet no luck. Is there anything i am missing on? Also at the server side(slave) i get message as follows. enter image description here

Which looks like the connection is successful. But i do not see any results.
Below are the jmeter logs

    Configuring remote engine: slave_ipaddrss
2019-11-18 09:21:16,108 INFO o.a.j.e.DistributedRunner: Starting distributed test with remote engines: [slave_ipaddrss] @ Mon Nov 18 09:21:16 EST 2019 (1574086876108)
2019-11-18 09:21:16,109 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2019-11-18 09:21:16,109 INFO o.a.j.r.RmiUtils: System property 'java.rmi.server.hostname' is not defined, using localHost address
2019-11-18 09:21:16,109 INFO o.a.j.r.RmiUtils: Local IP address=local_ipaddrss
2019-11-18 09:21:16,114 INFO o.a.j.r.SSLRMIServerSocketFactory: Created SSLSocket: [SSL: ServerSocket[addr=localhostname/local_ipaddrss,localport=8152]]
2019-11-18 09:21:16,114 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2019-11-18 09:21:16,114 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2019-11-18 09:21:16,115 INFO o.a.j.r.RmiUtils: System property 'java.rmi.server.hostname' is not defined, using localHost address
2019-11-18 09:21:16,115 INFO o.a.j.r.RmiUtils: Local IP address=local_ipaddrss
2019-11-18 09:21:16,120 INFO o.a.j.r.SSLRMIServerSocketFactory: Created SSLSocket: [SSL: ServerSocket[addr=localhostname/local_ipaddrss,localport=8153]]
2019-11-18 09:21:16,121 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2019-11-18 09:21:16,121 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2019-11-18 09:21:16,121 INFO o.a.j.r.RmiUtils: System property 'java.rmi.server.hostname' is not defined, using localHost address
2019-11-18 09:21:16,121 INFO o.a.j.r.RmiUtils: Local IP address=local_ipaddrss
2019-11-18 09:21:16,126 INFO o.a.j.r.SSLRMIServerSocketFactory: Created SSLSocket: [SSL: ServerSocket[addr=localhostname/local_ipaddrss,localport=8154]]
2019-11-18 09:21:16,128 INFO o.a.j.r.RmiUtils: System property 'java.rmi.server.hostname' is not defined, using localHost address
2019-11-18 09:21:16,128 INFO o.a.j.r.RmiUtils: Local IP address=local_ipaddrss
2019-11-18 09:21:16,133 INFO o.a.j.r.SSLRMIServerSocketFactory: Created SSLSocket: [SSL: ServerSocket[addr=localhostname/local_ipaddrss,localport=8155]]
2019-11-18 09:21:16,408 INFO o.a.j.e.ClientJMeterEngine: sent test to slave_ipaddrss basedir='.'
2019-11-18 09:21:16,409 INFO o.a.j.e.ClientJMeterEngine: Sending properties {}
2019-11-18 09:21:16,414 INFO o.a.j.e.ClientJMeterEngine: sent run command to slave_ipaddrss
2019-11-18 09:21:16,414 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[slave_ipaddrss]
2019-11-18 09:21:16,696 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, slave_ipaddrss)
2019-11-18 09:21:17,443 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, slave_ipaddrss)

Thanks.

Vishal Chepuri
  • 306
  • 5
  • 26

2 Answers2

0

First of all check jmeter-server.log file on JMeter slave machine, in case of failure it should contain enough troubleshooting information so you will be able to get to the bottom of the issue.

Second, looking into jmeter-server file there is a stanza which looks like:

# If the client fails with:
# ERROR - jmeter.engine.ClientJMeterEngine: java.rmi.ConnectException: Connection refused to host: 127.0.0.1
# then it may be due to the server host returning 127.0.0.1 as its address 

# One way to fix this is to define RMI_HOST_DEF below
#RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx

So you can try explicitly setting the RMI server hostname on JMeter slave(s) side like:

jmeter-server.bat -Djava.rmi.server.hostname=10.20.30.40

once done you can launch JMeter master like:

jmeter -R10.20.30.40

Replace 10.20.30.40 with the actual IP address of your JMeter slave machine.

More information:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks for the Reply. I tried with explicitly defining the Rmi server hostname as shown, but no luck. I again see same error in the logs (updated my question with logs). Am i still missing on anything? Kindly help. – Vishal Chepuri Nov 18 '19 at 14:42
0

I have solved it by increasing the retry count, which was by default 1. When distributed test is starting, there may be several attempts to initialize remote engines
You can find and edit "client.tries" in jmeter.properties file and Uncomment as

client.tries= 3

Also i have used below command to start the jmeter server in slave machine.

jmeter-server.bat -Djava.rmi.server.hostname=local ipaddress

Which helped me explicitly define rmi server hostname to local address.

Vishal Chepuri
  • 306
  • 5
  • 26