-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Bug] Unable to interact with short form custom target #1867
Comments
Creating a custom target with It may actually be that the 500 response is occurring in response to the request to list event templates, not the target creation. So perhaps the exception is really happening when Cryostat tries to use this custom target definition to open a JMX connection - is it no longer looking at these "short form" connection URLs and trying to format them into |
@Josh-Matsuoka @aali309 @mwangggg could one of you take a look at this next week? |
Yes, that could be the reason. Target is being created and discovered but listing event templates produces |
Looks like the root cause is here. This should catch |
Here's the server stack trace from when this happens:
|
That was after defining a custom target with the short-form
|
Here is where the exception originates: boolean isJmx = URIUtil.isJmxUrl(uri);
if (isJmx) {
match = Objects.equals(uri.toString(), targetId);
} else {
URI in = new URI(targetId);
match = Objects.equals(uri, in);
URI userless = new URIBuilder(uri).setUserInfo(null).build();
match |= Objects.equals(userless, in);
}
Immediately apparent options:
Options 1 and 4 are probably the best since they aren't relying on exception throwing/catching for control flow. Option 4 is probably simpler since it first checks whether the |
Current Behavior
java.net.URISyntaxException: Expected scheme-specific part at index 10: localhost: caused by URISyntaxException: Expected scheme-specific part at index 10: localhost:
Expected Behavior
No response
Steps To Reproduce
No response
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: