Bug 41028

Summary: JMeter server doesn't alert the user when the host is defined as a loopback address
Product: JMeter - Now in Github Reporter: Rubén Laguna <ruben.laguna>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: P2    
Version: 2.2   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Attachments: Path to detect if the system is trying to register a loopback address to the rmi registry

Description Rubén Laguna 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én Laguna 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.
Comment 3 The ASF infrastructure team 2022-09-24 20:37:38 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1830