jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: [Remote Testing] Custom fixed port numbers via proxy through firewall
Date Thu, 26 Feb 2009 02:57:00 GMT
On 03/02/2009, Axel Knauf <> wrote:
> Hi.
>  I am currently trying to setup some remote test cases with the following setup:
>  - 2 linux Tomcats and 1 linux Apache as target hosts to be tested
>  running our web app
>  - 2 separate linux hosts running the jmeter-server to generate load on
>  the target hosts
>  - 1 linux client running the controlling jmeter instance in non-gui
>  mode (all via SSH sessions)
>  I am using the JMeter 2.3.2 stable release and all the linux boxes are
>  in the same network subnet, but separated by firewalls currently only
>  allowing ports 8080 and 1099 to get through. On the load generators I
>  am using the default and the rmiregistry gets
>  started on default port 1099. On the controlling host, I have set the
>  following properties in the file:
>  --------------------------
>  remote_hosts= (only using one load generator for testing)
>  server.rmi.port=1099 (this would not be necessary, since it is the default)
>  --------------------------
>  When trying to connect with the controlling jmeter instance, I get
>  ConnectExceptions due to timeouts in the jmeter.log file. When looking
>  at the listening ports on the load generator host, I see that it is
>  listening on the rmiregistry port and an additional anonymous port:
>  --------------------------
>  # netstat -lnp | grep java
>  tcp        0      0 *
>  LISTEN      26862/jav
>  tcp        0      0  *
>  LISTEN      26862/jav
>  --------------------------
>  Obviously the RMI lookup gets dispatched to a separate port, which I
>  would assume to be the usual behavior. But nevertheless the firewall
>  will block this (random) free port since we cannot predict and enable
>  it in the firewall. One approach was to adjust the JMeter code to use
>  a custom SocketFactory[0] for RMI interaction which will always
>  provide a custom configurable port number as described in [1]. But at
>  this I am currently stuck and do not want to spend too much time.
>  So, finally - my question: Has anyone already set up clean remote test
>  cases using a proxy-based solution for tunneling the RMI connections
>  through the inter-host firewall as described in the distributed
>  testing guide [3]? And if not, has anyone already patched the JMeter
>  code to provide custom port numbers for the actual service calls? (Or
>  would one even have to exchange the SocketFactory for rmiregistry
>  since this might be where the dispatching occurs?)
>  For forwarding ports I could use SSH tunnels but I am not sure if this
>  would a too great an impact on the load testing performance.
>  Any help on this issue is greatly appreciated. If any facts are
>  missing please simply ask.
>  Cheers & Thanks,
>  Axel
>  --
>  [0]

Had a look at the document, and tried playing with the demo code.
Although one can modify the behaviour of the sockets, it does not seem
to be possible to specify the local port to be used for the remote

However, it turns out that it is very easy to specify a different port
when creating the remote object - just pass the port to the
UnicastRemoteObject constructor. No need for all the socket factory

This has been implemented in r747989 which is available in the current
nightly builds directory if you want to give it a try.

Just define the JMeter property "server.rmi.localport" before starting
the JMeter server.

>  [1]
>  (section below 'a modified version' header).
>  [2]
>  (section 'Limitations')
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
>  For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message