Bug 41028 - JMeter server doesn't alert the user when the host is defined as a loopback address
JMeter server doesn't alert the user when the host is defined as a loopback a...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.2
All Linux
: P2 trivial (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2006-11-23 07:27 UTC by Rub
Modified: 2007-12-13 16:31 UTC (History)
0 users



Attachments
Path to detect if the system is trying to register a loopback address to the rmi registry (1.65 KB, patch)
2006-11-29 23:48 UTC, Rub
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rub 2006-11-23 07:27:03 UTC
Due to Sun bug 4665037
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665037) rmi in linux may
not work if the name resolution is not properly configured.

The problem is that under linux the jmeter server  in rmi will be bound to ip
127.0.0.1 instead of the real (externally reachable) ip address of the machine.
So although the jmeter master will be able to locate the "JMeterEngine"
instances via the RMI registry. It will not be able to connect to the actual
instances. 

Actually JMeter will not complain when this happens it doesn't tell you anything
when launching jmeter-server  ( not even in logs) and it will silently fail when
trying to start the remote instances (no trace in the logs). 

It's very easy to include a check in RemoteJMeterEngineImpl.java to check
InetAddress.getLocalHost().isLoopbackAddress() and raise an exception or at
least log it. 


Also it would be very convenient to add log statements in the catch
java.rmi.xxxxException blocks in the ClientJMeterEngine.java. 


} catch (java.rmi.ConnectException e) {
  log.error("rmi exception", e);

because otherwise this kind of failures go unnoticed.
Comment 1 Rub 2006-11-29 23:48:41 UTC
Created attachment 19207 [details]
Path to detect if the system is trying to register a loopback address to the rmi registry

This patch detects if the the address we are binding to the rmiregistry is a
loopback address and throws an exception if this is the case.
Comment 2 Sebb 2007-12-13 16:31:34 UTC
Thanks for the patch.

Implemented in SVN r604072.