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

AMLII-1314: Improves misbehaving-jmx-server support for firewalled environments #507

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

scottopell
Copy link
Contributor

@scottopell scottopell commented Dec 28, 2023

When running a JMXRMI server, the initial RMI lookup will return a stub reference that includes a port and hostname for subsequent communications. By default, the port returned in the stub reference will be random.

This PR fixes the port for both RMI Registry and RMI Server to the specified value, so a single port can be used for the entire RMI conversation.

In addition, it fixes an incorrect listen address, the RMI hostname is not necessarily the same as the host used to bind the JMX service.

Client JVM                 Network                Server JVM
+---------+                                           +---------+
|         | ----- 1. Lookup (Registry:1099) ------>   |         |
|         | <---- 2. Return Stub Reference ------     |         |
|         |                                           |         |
|         | ----- 3. Invoke Method on Stub -------->  |         |
|         |                                           |   RMI   |
|  Client |                                           |  Server |
|         | <---- 5. Return Result/Exception ------   |         |
|         |                                           |         |
+---------+                                           +---------+

@scottopell scottopell requested a review from a team as a code owner December 28, 2023 18:57
@carlosroman carlosroman merged commit 4a49600 into master Jan 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants