We did not set localhost:5001 via Java System Properties, it seems localhost:5001 is embedded in the agent code as a last ditch attempt to connect. This default connection attempt is incorrect in a SaaS APM environment
Here are the agent settings:
-javaagent:/opt/DXAPM/wily/Agent.jar -DagentManager.url.1=https://<apmproxy-hostname>:443 -DagentManager.url.2=
Here is an example of the incorrect connection attempts to localhost:5001 in the agent log
[WARN] [IntroscopeAgent.ConnectionThread] Failed to connect to the Introscope Enterprise Manager at localhost:5001,com.wily.isengard.postofficehub.link.net.DefaultSocketFactory (java.net.ConnectException:Connection refused).
8/22/24 09:47:24 am BST [DEBUG] [IntroscopeAgent.ConnectionThread] Connection Exception:
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:579)
at java.base/sun.nio.ch.Net.connect(Net.java:568)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/java.net.Socket.<init>(Socket.java:507)
Remove -DagentManager.url.2= from your appserver configuration startup scripts