VisualVM cannot connect to any port except for 1099
The full JMX URL for connecting to localhost
is as follows:
service:jmx:rmi://localhost:<port1>/jndi/rmi://localhost:<port2>/jmxrmi
...where <port1>
is the port number on which the RMIServer and RMIConnection remote objects are exported and <port2>
is the port number of the RMI Registry.
For port 1098
you could try
service:jmx:rmi://localhost:1098/jndi/rmi://localhost:1098/jmxrmi
I'd guess that both ports default to 1099
if not explicitly configured.
EDIT: Per the comments, the JMX URL that worked was:
service:jmx:rmi://localhost:1098/jndi/rmi://localhost:1099/jmxrmi