1

I'm trying to do distributed tests using JMeter 5.1.1. I used manual from here, but have problem with specifying port for connection from server(slave) to client(master). When I'm using client.rmi.localport in jmeter.properties on master the following error appears:

ERROR o.a.j.u.JMeterUtils: Error in rconfigure() method java.rmi.MarshalException: error marshalling arguments; nested exception is: java.io.NotSerializableException: org.apache.jmeter.JMeter$ListenToTest

I was able to manage with other ports, only this one gives me trouble. I'm using nonGUI mode. How can I fix this/specify port?

Logs from master:

[...]

ERROR o.a.j.e.ConvertListeners: RemoteException occurred while replacing Remotable item. java.rmi.server.ExportException: Listen failed on port: 4453; nested exception is: java.io.IOException: Could not bind to XXX/XXX.XXX.XXX.XXX using port 4453

[...]

Caused by: java.io.IOException: Could not bind to XXX/XXX.XXX.XXX.XXX using port 4453 at org.apache.jmeter.rmi.SSLRMIServerSocketFactory.createServerSocket(SSLRMIServerSocketFactory.java:139) ~[ApacheJMeter_core.jar:5.1.1 r1855137] at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source) ~[?:1.8.0_231] ... 22 more Caused by: java.net.BindException: Address already in use: JVM_Bind

[...]

ERROR o.a.j.e.ClientJMeterEngine: Error in rconfigure() method java.rmi.MarshalException: error marshalling arguments; nested exception is: java.io.NotSerializableException: org.apache.jmeter.JMeter$ListenToTest at sun.rmi.server.UnicastRef.invoke(Unknown Source) ~[?:1.8.0_231]

[...]

jmeter.properties on master:

[...]

remote_hosts=XXX.XXX.XXX.XXX:4454

[...]

client.rmi.localport=4451

[...]

jmeterengine.nongui.port=4448

[...]

Edit: Changed JMeter to version 5.2 due to problem in comments.

Community
  • 1
  • 1
Piotr
  • 11
  • 4
  • It clearly states: port you are trying to bind to is already in use. Take another one, what's the big deal. – Yuri G Nov 08 '19 at 19:13
  • I double checked by netstat and port I'm trying to bind is NOT in use... By the way could you tell me why JMeter is trying to bind port number my_number+2? Is it normal behavior? Or is this only logging error? – Piotr Nov 09 '19 at 12:14
  • "I double checked by netstat and port I'm trying to bind is NOT in use." - ok, I get it, but have you tried different set of ports yet? – Yuri G Nov 11 '19 at 19:03
  • "...why JMeter is trying to bind port number my_number+2" - good question, I honestly don't know the answer right away – Yuri G Nov 11 '19 at 19:03
  • @YuriG yes, I tried... And after all I tried with new version (5.2) of JMeter - problem with binding port number my_number+2 was solved, but not my major problem... It probably was a problem with this version (5.1.1) of JMeter or with my installation - should have check sha sum... – Piotr Nov 13 '19 at 08:37
  • Man, I don't know then. You have to debug the thing. Try change the JMeter log level to DEBUG first, hopefully you've got more clues from it. Maybe, more details on your test plan & set up provided here may help. Hard to say. – Yuri G Nov 13 '19 at 15:19

2 Answers2

0

This error:

Address already in use: JVM_Bind

clearly indicates that Java tried to use a specific network port which is used by this or another process, consider using netstat program to identify the process which holds the port and either terminate that process or choose another port.

Be aware that RemoteThreadsListenerImpl uses some offset so the actual port will be higher than the one you specify via the property.

Unfortunately it is not very clear which ports you want to use on JMeter Master and Slave machines so in the meantime I can only suggest getting familiarized with the following materials:

the latter one provides example of using custom ports for results forwarding.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

Disabling the secure channel among client and servers helped me - I had this error no more and could specify ports. However I suggest doing it ONLY if your environment (both client and servers) work in private network.

Piotr
  • 11
  • 4