Hi Felix,
Thanks for looking into this.
Do you start server and client on different machines?
Yes, they are on different VMs.
What OS and Java version are you using?
OS - CentOS 7.3, Kernel - 3.10.0-693.21.1.el7.x86_64, Java - OpenJDK 1.8.0_171
(JRE)
To which address does your hostname (on client and server) resolve?
This should not matter because I pass -Djava.rmi.server.hostname=x.x.x.164
switch.
nslookup on both VMs resolves client's hostname to the same IP x.x.x.164
I am using a static port because of firewall rules. Port 50100 is the only one
allowed for result reporting (connections initiated from the server to the
client).
If I switch to random port (=0), the client starts to listen on three ports.
I'm not sure why, I expect it to listen on one port only.
2018-06-11 16:26:22,869 INFO o.a.j.JMeter: Creating summariser <summary>
2018-06-11 16:26:22,876 INFO o.a.j.e.DistributedRunner: Configuring remote
engine: x.x.x.169
2018-06-11 16:26:23,492 INFO o.a.j.e.DistributedRunner: Starting remote engines
2018-06-11 16:26:23,496 INFO o.a.j.e.DistributedRunner: Starting the test @ Mon
Jun 11 16:26:23 UTC 2018 (1528734383493)
2018-06-11 16:26:23,497 INFO o.a.j.e.ClientJMeterEngine: running clientengine
run method
2018-06-11 16:26:23,504 INFO o.a.j.e.u.CompoundVariable: Note: Function class
names must contain the string: '.functions.'
2018-06-11 16:26:23,504 INFO o.a.j.e.u.CompoundVariable: Note: Function class
names must not contain the string: '.gui.'
2018-06-11 16:26:24,047 INFO o.a.j.r.RmiUtils: Resolving by name the value of
System property 'java.rmi.server.hostname': x.x.x.164
2018-06-11 16:26:24,047 INFO o.a.j.r.RmiUtils: Local IP address=x.x.x.164
2018-06-11 16:26:24,050 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-06-11 16:26:24,054 INFO o.a.j.r.SSLRMIServerSocketFactory: Created
SSLSocket: [SSL: ServerSocket[addr=/x.x.x.164,localport=35775]]
2018-06-11 16:26:24,060 INFO o.a.j.s.BatchSampleSender: Using batching (client
settings) for this run. Thresholds: num=100, time=60000
2018-06-11 16:26:24,060 INFO o.a.j.s.DataStrippingSampleSender: Using
DataStrippingSampleSender for this run
2018-06-11 16:26:24,061 INFO o.a.j.r.RmiUtils: Resolving by name the value of
System property 'java.rmi.server.hostname': x.x.x.164
2018-06-11 16:26:24,062 INFO o.a.j.r.RmiUtils: Local IP address=x.x.x.164
2018-06-11 16:26:24,064 INFO o.a.j.r.SSLRMIServerSocketFactory: Created
SSLSocket: [SSL: ServerSocket[addr=/x.x.x.164,localport=40516]]
2018-06-11 16:26:24,523 INFO o.a.j.r.RmiUtils: Resolving by name the value of
System property 'java.rmi.server.hostname': x.x.x.164
2018-06-11 16:26:24,523 INFO o.a.j.r.RmiUtils: Local IP address=x.x.x.164
2018-06-11 16:26:24,524 INFO o.a.j.r.SSLRMIServerSocketFactory: Created
SSLSocket: [SSL: ServerSocket[addr=/x.x.x.164,localport=37217]]
When Secure RMI is disabled, Java is listening on one port only (there are no
log messages like SSLRMIServerSocketFactory but 'netstat -anp | grep java'
shows one listening port).
Does anybody know why Secure RMI needs three ports and insecure one needs only
one?
Andrey
-----Original Message-----
From: Felix Schumacher [mailto:[email protected]]
Sent: Saturday, June 9, 2018 7:53 AM
To: [email protected]
Subject: Re: JMeter 4.0 client won't start if Secure RMI is configured
Am 09.06.2018 um 02:00 schrieb Andrey Shevtsov:
Hi,
I asked this question on StackOverflow but got no answers or even tips so
sending this to the mailing list.
I am trying to set up remote testing infrastructure with secure RMI using
JMeter 4.0 (one client and one server) but the client won't start because of
'Address already in use (Bind failed)' error.
netstat shows that no process is listening on this port and from the log it
seems that JMeter itself tries to listen on the port more than once (at least
that's how I interpreted the log messages).
Everything works fine if I disable Secure RMI
(server.rmi.ssl.disable=true) Both the client and server use 4.0 r1823414
version.
You can find details and the log here (SO post) -
https://stackoverflow.com/questions/50752126/unable-to-start-jmeter-4-
0-client-with-ssl-rmi
Let me know if you want me to provide any details/settings.
Do you start server and client on different machines?
What OS and Java version are you using?
To which address does your hostname (on client and server) resolve?
On my machine (server) jmeter prints out the following messages to the
console:
./jmeter-server -Djava.rmi.server.hostname=192.168.1.24
Created remote object: UnicastServerRef2 [liveRef:
[endpoint:[192.168.1.24:34743,SSLRMIServerSocketFactory(host=/192.168.1.24,
keyStoreLocation=rmi_keystore.jks, type=JKS,
trustStoreLocation=rmi_keystore.jks, type=JKS,
alias=rmi),SSLRMIClientSocketFactory(keyStoreLocation=rmi_keystore.jks,
type=JKS, trustStoreLocation=rmi_keystore.jks, type=JKS,
alias=rmi)](local),objID:[...]]] Starting the test on host 192.168.1.24 @ Sat
Jun 09 16:41:26 CEST 2018
(1528555286422)
Finished the test on host 192.168.1.24 @ Sat Jun 09 16:41:27 CEST 2018
(1528555287862)
On the client (started with ./jmeter
-Djava.rmi.server.hostname=192.168.178.91) I see:
2018-06-09 16:47:37,714 INFO o.a.j.e.DistributedRunner: Configuring remote
engine: 192.168.1.24
2018-06-09 16:47:37,815 INFO o.a.j.e.DistributedRunner: Starting remote engines
2018-06-09 16:47:37,815 INFO o.a.j.e.DistributedRunner: Starting the test @ Sat
Jun 09 16:47:37 CEST 2018 (1528555657815)
2018-06-09 16:47:37,815 INFO o.a.j.e.ClientJMeterEngine: running clientengine
run method
2018-06-09 16:47:37,816 INFO o.a.j.r.RmiUtils: Resolving by name the value of
System property 'java.rmi.server.hostname': 192.168.1.91
2018-06-09 16:47:37,816 INFO o.a.j.r.RmiUtils: Local IP address=192.168.1.91
2018-06-09 16:47:37,823 INFO o.a.j.r.SSLRMIServerSocketFactory: Created
SSLSocket: [SSL: ServerSocket[addr=/192.168.1.91,localport=36955]]
2018-06-09 16:47:37,824 INFO o.a.j.r.RmiUtils: Resolving by name the value of
System property 'java.rmi.server.hostname': 192.168.1.91
2018-06-09 16:47:37,824 INFO o.a.j.r.RmiUtils: Local IP address=192.168.1.91
2018-06-09 16:47:37,832 INFO o.a.j.r.SSLRMIServerSocketFactory: Created
SSLSocket: [SSL: ServerSocket[addr=/192.168.1.91,localport=44645]]
2018-06-09 16:47:37,838 INFO o.a.j.r.RmiUtils: Resolving by name the value of
System property 'java.rmi.server.hostname': 192.168.1.91
2018-06-09 16:47:37,839 INFO o.a.j.r.RmiUtils: Local IP address=192.168.1.91
2018-06-09 16:47:37,844 INFO o.a.j.r.SSLRMIServerSocketFactory: Created
SSLSocket: [SSL: ServerSocket[addr=/192.168.1.91,localport=45343]]
2018-06-09 16:47:37,845 INFO o.a.j.s.BatchSampleSender: Using batching (client
settings) for this run. Thresholds: num=100, time=60000
2018-06-09 16:47:37,845 INFO o.a.j.s.DataStrippingSampleSender: Using
DataStrippingSampleSender for this run
2018-06-09 16:47:38,108 INFO o.a.j.e.ClientJMeterEngine: sent test to
192.168.1.24 basedir='.'
2018-06-09 16:47:38,108 INFO o.a.j.e.ClientJMeterEngine: Sending properties {}
2018-06-09 16:47:38,117 INFO o.a.j.e.ClientJMeterEngine: sent run command to
192.168.1.24
2018-06-09 16:47:38,117 INFO o.a.j.e.DistributedRunner: Remote engines have
been started
2018-06-09 16:47:38,132 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true,
192.168.1.24)
2018-06-09 16:47:38,773 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false,
192.168.1.24)
It seems that for my very simple test case there were opened three local ports for RMI.
So maybe it would help to unset the "client.rmi.localport" setting in your
setup?
Regards,
Felix
Thank you!
Andrey Shevtsov
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]