Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostname resolves to 127.0.0.1 - specifiying IP not possible #2299

Closed
asfimport opened this issue Oct 11, 2009 · 1 comment
Closed

hostname resolves to 127.0.0.1 - specifiying IP not possible #2299

asfimport opened this issue Oct 11, 2009 · 1 comment

Comments

@asfimport
Copy link
Collaborator

Jeremy Jay (Bug 47980):
The jmeter-server script says that defining java.rmi.server.hostname will work
when resolving the hostname fails to get a non-loopback address, but it still
doesn't work. I don't have admin rights on the computer in question so this is
a blocker issue for me, I can only run one instance. The attached patch fixes
the issue for me and allows me to connect to multiple jmeter servers.

Created attachment nonlocalhost-hostname-ip.diff: dont use localhost when hostname specified

nonlocalhost-hostname-ip.diff
--- RemoteJMeterEngineImpl.java.orig	2009-06-17 11:29:16.000000000 -0400
+++ RemoteJMeterEngineImpl.java	2009-10-11 20:33:46.000000000 -0400
@@ -70,7 +70,11 @@
         log.info("Starting backing engine on " + port);
         InetAddress localHost=null;
         try {
+          String host = System.getProperties().getProperty("java.rmi.server.hostname");
+          if( host==null )
             localHost = InetAddress.getLocalHost();
+          else
+            localHost = InetAddress.getByName(host);
         } catch (UnknownHostException e1) {
             throw new RemoteException("Cannot start. Unable to get local host IP address.");
         }

Severity: major
OS: Linux

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Thanks, applied:

URL: http://svn.apache.org/viewvc?rev=836283&view=rev
Log:
#2299 - hostname resolves to 127.0.0.1 - specifiying IP not possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant