-
Notifications
You must be signed in to change notification settings - Fork 956
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
Set the actual local port number to btrace.port
system property
#461
Conversation
Motivation: BTrace agent currently sets the port number given by a user to `btrace.port` system property as-is. This behavior can be a problem when: - The agent actually failed to bind to the given port, because a user may still attempt to connect to the port number specified in `btrace.port`, where other server may be running already there. - A user cannot know the actual port where BTrace agent is running when the user specified `0` as the port number, because we only know the actual port number *after* creating a server socket on it. Modifications: - Set the actual local port number after creating a `ServerSocket` so that a user can later figure out the actual port number even if the user specified `0` as the port number. Result: - A user can know the actual local port number, even when the user specified `0`. - A user can know the agent server socket is not open easily by checking the existence of `btrace.port` System property.
Can you, please, make sure you have OCA signed? https://oca.opensource.oracle.com/ |
I can't sign the OCA because it fails saying "You can't submit a new request unless the one that is pending signature is resumed or withdrawn." I indeed cancelled the DocuSign session because I realized my information in the Oracle account was outdated (wrong employer name and address). Now that I updated my information, but I can't sign anymore. 🤔 |
Could someone clean up my state so I can try again? |
Alternatively, how about making the proposed change by yourself? It's just a one liner after all. I hereby release this changeset to the public domain (Creative Commons Zero 1.0). |
@jbachorik I've just figured out how to do it by myself and signed the OCA. Could you please merge this and make it part of the next releases? |
Great, I will merge this as soon as you appear in the list of signatories. I am afraid it can take a couple of days :( |
Thanks, @jbachorik ! Looking forward to the next release. 🙇 |
Motivation:
BTrace agent currently sets the port number given by a user to
btrace.port
system property as-is. This behavior can be a problemwhen:
may still attempt to connect to the port number specified in
btrace.port
, where other server may be running already there.the user specified
0
as the port number, because we only know theactual port number after creating a server socket on it.
Modifications:
ServerSocket
sothat a user can later figure out the actual port number even if the
user specified
0
as the port number.Result:
specified
0
.the existence of
btrace.port
System property.