Disable APM Agent attempts to connect to EM on localhost:5001 when all other agent connection(s) fail
search cancel

Disable APM Agent attempts to connect to EM on localhost:5001 when all other agent connection(s) fail

book

Article ID: 376895

calendar_today

Updated On:

Products

DX APM SaaS DX Application Performance Management CA Application Performance Management (APM / Wily / Introscope)

Issue/Introduction

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)

Environment

  • DX APM SaaS 
  • DX APM on-premise 2x

Cause

This is happening due to the following entry in the environment variable:
 
-DagentManager.url.2=
 
You should not have the fail back as empty because if this is empty the agent assumes this to be defaulting to localhost.

Resolution

Remove -DagentManager.url.2= from your appserver configuration startup scripts

Additional Information