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

The jvm agent won't listen on the wildcard #86

Closed
benson-basis opened this issue Mar 13, 2013 · 3 comments
Closed

The jvm agent won't listen on the wildcard #86

benson-basis opened this issue Mar 13, 2013 · 3 comments

Comments

@benson-basis
Copy link

@benson-basis benson-basis commented Mar 13, 2013

This code has an unexpected consequence. InetAddress.getLocalAddress is not 127.0.0.1, or ,but rather some interface or another. To accept connections on any interface, one must explicitly pass a null to getByName, but this code doesn't allow a means of passing null to there. I think it needs to map "" to passing null.

 private void initAddress(Map<String, String> agentConfig) {
    String host = agentConfig.get("host");
    try {
        address = host != null ? InetAddress.getByName(host) : InetAddress.getLocalHost();
    } catch (UnknownHostException e) {
        throw new IllegalArgumentException("Can not lookup " + (host != null ? host : "localhost") + ": " + e,e);
    }
}
rhuss added a commit that referenced this issue Mar 13, 2013
@rhuss
Copy link
Owner

@rhuss rhuss commented Mar 15, 2013

Fixed for 1.1.1: When host is "*" or "0.0.0.0" the agent will listen on every interface, if no host is given "localhost" is used.

thanks again ...

@rhuss rhuss closed this Mar 15, 2013
@rhuss
Copy link
Owner

@rhuss rhuss commented Mar 15, 2013

BTW, when I use the wildcard on Max OS X I get back an IPV6 adress:

Started Jolokia for PID 10945
http://0:0:0:0:0:0:0:0:49801/jolokia/

Don't know whether this provides any problem, though ...

@benson-basis
Copy link
Author

@benson-basis benson-basis commented Mar 15, 2013

I test on OSX with no ill-effects.

apupier added a commit to apupier/jolokia that referenced this issue Jul 10, 2017
rhuss added a commit that referenced this issue Sep 10, 2017
#86 - Test to ensure milliseconds are ignored as ISO 8601 specify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants