Skip to content

UI proxy settings not used for remote host connections #372

@jdelker

Description

@jdelker

Describe the bug
The proxy configuration in VisualVM is completely ignored, when trying to establish remote jstat/jmx connections.

I tried to establish jstat/jxm connections through a constructed SOCKS-Port (ssh remote.host -D 9000) to a remote host.
Although I set the required proxy configuration in VisualVM, no traffic was tunneled through the SOCKS port at all.

Suspicion:
Proxy information present in system properties are overriding the proxy configuration in VisualVM.
(see "Additional Context" below)

To Reproduce
Steps to reproduce the behavior:

  1. Configure proxy in VisualVM (localhost/9000; apply for all).
  2. Open SOCKS-Tunnel to a remote host: ssh remote.host -D 9000 -v
  3. Add new remote host in VisualVM.
  4. After adding the host, the expected verbose output of the ssh session about usage of the SOCKS port, is not showing.
  5. If output is shown, eventually set some diverting system properties as shown in "Additional Context" and repeat the procedure.

Expected behavior
VisualVM shall always honor its own proxy configuration. Any conflicting system properties shall be either ignored or unset for the VisualVM session.

VisualVM log
Sorry. I've no clue where to find that.

Desktop (please complete the following information):

  • macos 11.6
  • Temurin OpenJDK 17.0.1
  • VisualVM 2.1.1

Additional context
Looking at the system properties in the "Overview" tab for the VisualVM process, shows the following proxy settings:

http.nonProxyHosts=local|*.local|169.254/16|*.169.254/16|localhost|*.localhost|192.168/16|*.192.168/16
http.proxyHost=other-proxy-host
http.proxyPort=3128
https.proxyHost=other-proxy-host
https.proxyPort=3128
socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16|localhost|*.localhost|192.168/16|*.192.168/16

They apparently match the configured OS proxy settings, but I've no clue how they end up here as system properties.

The remote host IP used for testing was 10.10.1.130, which does not match any of the nonProxyHost definitions.

Invoking VisualVM with the CLI option -J-Djava.net.useSystemProxies=false did not show any effect to the above system properties.

Invoking VisualVM with explicit SOCKS proxy properties (-J-DsocksProxyPort=9000 -J-DsocksProxyHost=localhost) showed proper proxy usage, despite of what is configured in the UI.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions