RE: JMeter 4.0 client won't start if Secure RMI is configured

2018-06-11 Thread Andrey Shevtsov
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 
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=6
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:felix.schumac...@internetallee.de] 
Sent: Saturday, June 9, 2018 7:53 AM
To: user@jmeter.apache.org
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, 

JMeter 4.0 client won't start if Secure RMI is configured

2018-06-08 Thread 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.

Thank you!
Andrey Shevtsov

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org