APM Insight Java Agent – Onboarding & Troubleshooting Guide

APM Insight Java Agent – Onboarding & Troubleshooting Guide

This document is a step-by-step guide to onboarding and troubleshooting the APM Insight Java Agent, for both the standalone agent and the FSO Auto Profiler. It covers agent attachment, version compatibility, configuration, connectivity, data collection and conflicts — and gives the resolution for every finding the health-check script can report.

Quick Navigation

InfoEvery finding has a code such as A7 or D10. Use the matching link below to jump straight to its resolution — the wording there is the wording the script prints. Any heading can be collapsed if you want it out of the way.

1. Before you start — where to run it, privileges, containers
WarningA full restart is required after adding or changing the agent argument. A reload or a redeploy does not re-read JVM arguments. Under FSO, restart the application process from a new shell so it inherits the profiler's injection environment.
InfoRead-only and safe on production. The script inspects processes, reads config and logs, and makes one HTTP request to apm.host. It changes nothing and restarts nothing. The only file it creates is its own log, and licence keys are masked in every line.
1.1 Where to run it
On the application serverNot on the Applications Manager host. The script examines the JVM being monitored, its configuration and its logs.
ElevatedUse sudo on Linux/macOS, or an Administrator PowerShell on Windows. Without it, other users' process command lines are unreadable and an attached agent is reported as absent.
With the application runningAttachment, permission, conflict and data-collection checks all inspect live processes. If no JVM has the agent, the script still reports what is on disk and tells you the argument was never loaded.
curl helps, optionalUsed for the single reachability probe. Without it that one check is skipped and everything else still runs.
1.2 Containers

The script needs bash plus the usual userland (ps, find, grep, sed, stat). Whether the image has them decides the approach, so check the image rather than assuming.

Image typeWhat to do
Full app-server images
tomcat, JBoss/WildFly, WebSphere Liberty, Debian/UBI-based JDK images
Run it inside the container — these ship bash and coreutils.
docker exec -it <container> bash /chk.sh
kubectl exec -it <pod> -- bash /chk.sh
Minimal images
Alpine, distroless, -slim and -alpine JRE images
It will not run — there is no bash. The script detects this and exits with code 3, listing the alternatives below.
WarningDo not install bash into a production container to work around this. It mutates a running workload to obtain a read-only diagnostic, and the change disappears on the next restart. Both options below get the same answer without touching the container.

Option 1: run the script on the Linux container host. The host's process list already contains the containerised JVM with its full -javaagent argument, and the container's files are reachable at /proc/&lt;pid&gt;/root/&lt;path-inside-container&gt;.

Quotesudo ps -eo pid,args | grep apminsight-javaagent
Quotesudo ls /proc/<pid>/root/<agent_dir>/
Quotesudo ./apminsight_onboarding_check_v2.sh /proc/<pid>/root/<agent_dir>
InfoNeeds a Linux container host. On Docker Desktop for Mac or Windows the containers run inside a VM, so the laptop's process table and /proc do not contain them — use Option 2 there.

Option 2: copy the evidence out and read it. Three files answer most onboarding questions, and none needs a shell inside the container. Section 5 shows what each one looks like.

FileWhat it tells you
apminsight.confLicence key, apm.host, application name and port — everything in Section 7.
apminsight_startup_*.log (newest)Agent version, Java version, JVM vendor, and whether the agent hooked into the JVM at all — Sections 5, 6 and finding E4.
apminsight_agent_*.log (newest)The Response Code: line — the collector's verdict, and the fastest way to separate a licence problem from a network one (Sections 8 and 11).
Quotedocker cp <container>:<agent_dir>/apminsight.conf .
Quotedocker cp <container>:<agent_dir>/<AppName>_<Port>/ ./instance/
InfoYou can run the script against the copied directory. The on-disk checks — configuration, instance folders, collector response — are all valid. The process-based rows (attachment, permissions, conflicts) will find nothing, because the JVM is not on this host. Read those as not measured, not as failures.

FSO in containers: the Auto Profiler is a host service that instruments processes it detects on that host. Whether it reaches a JVM inside a container depends on the runtime and the deployment, and the script cannot determine it. Confirm the supported approach with the APM Insight team before concluding the profiler is faulty — for containers the agent is commonly baked into the image and added to the JVM arguments the standalone way.

2. Standalone or FSO? — identify the model and its folder layout

Both models load the same apminsight-javaagent.jar, so the JAR alone cannot tell them apart. What differs is who puts it on the command line — and the folder layout around it.

ModelHow the agent gets loadedLayout
StandaloneYou add -javaagent:<dir>/apminsight-javaagent.jar to the startup configuration yourself.Instance folders sit inside the agent directory.
FSOThe APM Insight Auto Profiler, a component of the Full-Stack Observability agent, detects the process and injects the JAR automatically at process start.The agent directory is the JAVA folder.
WarningUnder FSO there is no -javaagent line to find. The argument's absence from every startup file is the expected state, not a fault. The script detects the deployment model and reports it that way — but with a hand-written check or an older script, this is the single most common false alarm.
2.1 Standalone layout
<agent_dir>/
├── apminsight-javaagent.jar
├── apminsight.conf
└── <AppName>_<Port>/ <- instance folder
├── apminsight_startup_<ts>_<pid>.log
└── apminsight_agent_<ts>_<pid>.log
2.2 FSO / Auto Profiler layout
C:\ProgramData\ManageEngine Applications Manager APM Auto Profiler\
├── autoprofilerconf.ini
├── apm_process_monitoring_config.json
├── JAVA\
│ ├── apminsight-javaagent.jar <- the JAR lives HERE
│ ├── apminsight.conf <- master conf
│ ├── apminsight_startup_<ts>_<pid>.log <- OLD runs (see table below)
│ ├── apminsight-javaagent\ <- empty placeholder, NOT an instance
│ ├── APM_Java_Instances\
│ │ └── <signature>.json <- one per registered instance
│ └── <AppName>_<Port>\ <- an instrumented instance, e.g. myapp_8080
│ ├── apminsight.conf
│ ├── apminsight_startup_<ts>_<pid>.log
│ └── apminsight_agent_<ts>_<pid>.log
└── Logs\
└── AutoProfilerService.log <- profiler's own log

How to read this when triaging FSO:

PathWhat it means
JAVA\apminsight_startup_*.logLeftovers from older runs. Since v7.0 each run logs inside its own <AppName>_<Port> folder, so startup logs at this level are historical. They say nothing about the current state — read the logs in the instance folder instead.
APM_Java_Instances\*.jsonA registry of instance directories — one entry per <AppName>_<Port> folder, holding its AppName, RegisteredPort and InstanceDir. It is 1:1 with those folders, not a list of processes. The filename embeds the application's full path, so redact it before attaching one to a ticket.
<AppName>_<Port>\Successfully instrumented instances. This is where the real agent and collector logs live.
apminsight-javaagent\
APM_Java_Instances\
Part of the profiler's own layout. Not instance folders — do not read them as legacy or stale ones.
Logs\AutoProfilerService.logThe profiler's own service log, where attach refusals surface.
2.3 The Auto Profiler service
Windows serviceManageEngine Applications Manager APM Auto Profiler
Linux unitapplicationsmanagerapmautoprofiler.service
Check it (Windows)Get-Service '*APM Auto Profiler*'
Check it (Linux)systemctl status applicationsmanagerapmautoprofiler.service
Supported on LinuxJava, Node.js, Python
Supported on WindowsJava, .NET, Node.js
WarningThe Auto Profiler instruments a process only at process start. Anything already running when it was installed stays un-profiled until you restart it — and the restart must come from a new shell or session so it inherits the injection environment. This is finding A7, and it is the most common FSO onboarding complaint.
InfoThe Auto Profiler is a component of the FSO agent and cannot run standalone. If the service is missing entirely, the FSO agent was deployed without APM Insight: re-deploy from Settings → FSO Agent → Deploy Agent with Application Performance Management ticked.
3. Run the script — commands and exit codes
3.1 Linux and macOS
CommandWhat it does
sudo ./apminsight_onboarding_check_v2.shDiscover every agent on the host and print the verdict.
sudo ./apminsight_onboarding_check_v2.sh -vSame, plus the full step-by-step diagnostic on screen.
sudo ./apminsight_onboarding_check_v2.sh /opt/apminsightCheck one specific agent directory.
sudo ./apminsight_onboarding_check_v2.sh -o /tmp/apm.logChoose where the log is written.
sudo ./apminsight_onboarding_check_v2.sh --fso-dir /opt/manageengine/apmautoprofilerPoint at the Auto Profiler root when auto-discovery misses it.
3.2 Windows
CommandWhat it does
.\apminsight_onboarding_check_v2.ps1Discover every agent on the host and print the verdict.
.\apminsight_onboarding_check_v2.ps1 -VerboseSame, plus the full diagnostic on screen.
.\apminsight_onboarding_check_v2.ps1 'C:\APMInsight\agent'Check one specific agent directory.
.\apminsight_onboarding_check_v2.ps1 -FsoDir 'C:\ProgramData\ManageEngine Applications Manager APM Auto Profiler'Point at the Auto Profiler root explicitly.
WarningRun PowerShell as Administrator. If the execution policy blocks the script, use:
Quotepowershell -ExecutionPolicy Bypass -File .\apminsight_onboarding_check_v2.ps1
3.3 Exit codes
0ok Everything passed.
1WARN Warnings only — review, but onboarding is not blocked.
2FAIL At least one blocking failure. Stop and read the findings.
3bash is unavailable (a minimal container) — see 1.2.
InfoThe log always holds the full diagnostic, whatever the console shows. Read the verdict on screen; attach the log to the ticket.
4. Read the output — the seven rows and the findings list

The default output is one screen with two parts: seven status rows, then an ordered list of what to act on.

4.1 Example output
  APM Insight Java Agent — Onboarding Check  v2.0
appserver01 · Linux · 2026-10-13 17:49
Deployment: FSO — APM Insight Auto Profiler Agent directories checked: 1

Attachment FAIL Auto Profiler attached to nothing
Compatibility ok v7.8.1 · Java 17.0.17 · openjdk
Configuration ok licence set · host https://apm-host:8443
Connectivity ok Applications Manager reachable at https://apm-host:8443
Data collection WARN connected, no transaction yet
Instance folders FAIL no instance folder created
Conflicts ok none

What to act on — 2 blocking · 1 to review, most important first
────────────────────────────────────────────────────────────────────

1 FAIL A7 Auto Profiler is running but has not attached to the application
profiler saw 1 process(es) and logged 4 attach attempt(s), but instrumented none
why The Auto Profiler instruments a process only at process start. Anything
already running when it was installed stays un-profiled.
fix Restart the application process from a NEW shell or session, so it
inherits the Auto Profiler's injection environment:
sudo systemctl restart <your-app>.service
KB §3-A · Agent Loading & Attachment
4.2 The seven status rows

Each row shows the worst result in its area. Informational notes never pull a row below ok — they are listed below but do not headline a passing check.

RowThe question it answersFindings
AttachmentIs the agent actually loaded into the JVM?A1–A8
CompatibilityDo the agent version and the Java version work together?B1–B4
ConfigurationIs apminsight.conf valid, and can the agent write?C1–C7
ConnectivityCan this host reach Applications Manager at all?D1–D3
Data collectionIs the collector accepting data, and is there data to send?D4–D10, E6
Instance foldersDid the agent create its instance folder and logs?E1–E5, F2
ConflictsIs another instrumentation agent in the way?F1
4.3 Anatomy of a finding
FieldWhat it means
FAIL WARN noteSeverity. FAIL blocks onboarding. WARN is worth reviewing. note is context, not a problem.
A7The finding code. Every code has its own subsection in Sections 5–10, reachable from the navigation above.
second lineThe evidence actually observed — counts, paths, log excerpts.
whyWhy it matters, so you can judge whether to chase it now.
fixThe remedy, with copy-pasteable commands.
KBWhich group of this article covers it.
WarningFix in the order printed. The checks are dependent. An agent that never attached (A*) makes every later result meaningless, and a rejected licence (C2 / D5) is the most common reason the instance folder never appears (E1). Clear the lowest-numbered finding, re-run, and the list usually shortens by more than one.
5. Example agent logs — what a healthy startup and agent log look like

Most onboarding questions are answered by three files. This section shows what each looks like on a healthy agent, so you can tell at a glance which line is missing on a broken one.

5.1 Where the logs are
PathWhat it holds
<agent_dir>/<AppName>_<Port>/Current logs. Standalone and FSO both write here. This is the folder to read, and the one to collect for a ticket.
<agent_dir>/apminsight_startup_*.logOlder runs. Pre-v7.0 behaviour and leftovers. Historical only — do not diagnose from these.
<AP_ROOT>/Logs/AutoProfilerService.logFSO only. The Auto Profiler's own service log, where injection refusals appear. Nothing to do with a specific application.
5.2 The three files and what each is for
FileWhat it is for
apminsight_startup_<ts>_<pid>.logWritten once per JVM start. Covers loading: agent version, Java version, the resolved application name and apm.host, and whether the agent hooked into the JVM. Read this first for §3-A and §3-B.
apminsight_agent_<ts>_<pid>.logWritten continuously while the agent runs. Covers data collection: uploads and the collector's response code. Read this for §3-D.
apminsight_agent_diagnostics_<pid>.logA one-off environment dump — classpath, JVM arguments, system properties. Useful when a framework is not being instrumented, or when support asks what the JVM actually looked like.
5.3 Startup log — a healthy start

A normal start, from a v7.7.2 agent. Nine lines out of roughly seventy — these are the ones worth finding:

[02 Apr 2026 19:42:49.146][main][INFO]: Logging initialized successfully.
[02 Apr 2026 19:42:49.147][main][INFO]: Agent Java Home Path : /opt/apminsight
[02 Apr 2026 19:42:49.147][main][INFO]: INFO: APM Insight javaagent v7.7.2 successfully hooked up with JVM (PID:12345)
[02 Apr 2026 19:42:49.147][main][INFO]: JVM started using command: /opt/myapp/myapp.jar
[02 Apr 2026 19:42:49.147][main][INFO]: All auto-configurations applied
[02 Apr 2026 19:42:49.191][main][INFO]: Application name is updated from to MyApp
[02 Apr 2026 19:42:49.191][main][INFO]: apm.host configured: https://apm-host:8443
[02 Apr 2026 19:42:49.242][main][INFO]: APM Insight agent initialized successfully.
[02 Apr 2026 19:42:55.335][apminsight-services-starter][INFO]: [JavaAgentService] URL to be executed: https://apm-host:8443/arh/connect?license.key=**

Line by line:

LineWhat it tells you
Agent Java Home PathWhere the agent is unpacked. Confirms the JVM loaded the JAR you think it did — compare it with the -javaagent path.
successfully hooked up with JVM (PID:…)The single most important line in any APM Insight log. If it is present, the agent attached and every §3-A finding is cleared. If it is absent, nothing else in this article matters yet.
JVM started using commandThe application the agent attached to. Useful when several JVMs run on one host.
Application name is updated from   to MyAppThe agent resolved its identity. This plus the port becomes the instance folder name, so this line tells you which folder to look in. An empty value on the left is normal on first start.
apm.host configuredThe address the agent will post to, as the agent actually read it. If this does not match what you expect, you are editing the wrong apminsight.conf — see C3/C4.
APM Insight agent initialized successfullyInstrumentation is up. Anything after this is runtime behaviour, not loading.
/arh/connect?license.key=**The first handshake with Applications Manager. The agent masks its own key as **, so these logs are safe to attach to a ticket.
5.4 Agent log — healthy data collection

The same agent, running steadily. The pattern repeats once a minute:

[02 Apr 2026 19:42:55.931][apminsight-services-starter][INFO]: Logging updated to APMInsight-Agent successfully.
[02 Apr 2026 19:44:00.943][apminsight-2-thread-2][INFO]: [JavaAgentService] URL to be executed: https://apm-host:8443/arh/data?instance_id=10000001&license.key=**
[02 Apr 2026 19:44:00.980][apminsight-2-thread-2][INFO]: Collector Response Code: 920(Agent config updated.)
[02 Apr 2026 19:45:00.940][apminsight-2-thread-2][INFO]: [JavaAgentService] URL to be executed: https://apm-host:8443/arh/data?instance_id=10000001&license.key=**
[02 Apr 2026 19:45:01.038][apminsight-2-thread-2][INFO]: Collector Response Code: 911(Manage the agent.)

Line by line:

LineWhat it tells you
/arh/data?instance_id=…A data upload. The instance_id is assigned by Applications Manager, so its presence proves registration succeeded. No /arh/data lines at all means the agent has nothing to send — see D10.
Collector Response Code: 920Healthy. The collector accepted the upload and pushed a configuration change.
Collector Response Code: 911Healthy, and the steady state. A log full of 911 is a working agent.
InfoResponse codes are listed in full in Section 12. 911 and 920 are both healthy; everything else needs action.
5.5 Instance registry and diagnostics

Two more files you may be asked for.

The instance registry — APM_Java_Instances/<signature>.json, one entry per instance folder:

{"CreationTime":"1775139175923","RegisteredPort":"8080","InstanceDir":"/opt/apminsight/MyApp_8080","AppName":"MyApp"}
WarningThe filename of this file embeds the application's full path, which usually includes a username. Redact it before attaching one to a ticket. The health-check script prints only the AppName and port for this reason.

The diagnostics dump — apminsight_agent_diagnostics_<pid>.log, first lines:

		JavaAgent Diagnostics Information - Thu Apr 02 19:47:55 IST 2026
========================================================================

Classpath
************************
/opt/myapp/myapp.jar
5.6 Reading the logs by hand

From the application server, when you want an answer in one command.

Did the agent attach at all?

Quotegrep -l 'hooked up with JVM' <agent_dir>/*/apminsight_startup_*.log

What did the collector last say?

Quotegrep -h 'Response Code:' <agent_dir>/*/apminsight_agent_*.log | tail -1

Which agent and Java version?

Quotegrep -hE 'javaagent v|java.version' <agent_dir>/*/apminsight_startup_*.log | head -2

Any load or instrumentation errors?

Quotegrep -hE '\[(FATAL|ERROR)\]' <agent_dir>/*/apminsight_*.log | tail -5

Collect everything for a ticket (licence keys are already masked by the agent):

Quotetar czf apm-logs.tgz <agent_dir>/apminsight.conf <agent_dir>/*_*/
InfoOr just run the health-check script with -v and attach its log — it already collects and interprets all of the above.
6. Fixes — Agent Loading & Attachment — A1, A2, A3, A4, A5, A6, A7, A8

The agent is not instrumenting the JVM at all. Nothing downstream can work until one of these is cleared, so always start here.

InfoMatch the code the script printed to the subsection below. Each one opens with the exact line the script writes, so you can confirm you are in the right place.
6.1 A1 — The -javaagent argument was never added

Script says:

QuoteA1 The -javaagent argument was never added

Cause: Without that JVM argument nothing instruments the application, so no monitor can ever appear.

Resolution:

Add the argument to the startup file for your server type, then stop and start the application (a reload is not enough):

  Tomcat        Linux   <tomcat>/bin/setenv.sh
CATALINA_OPTS="$CATALINA_OPTS -javaagent:<agent_dir>/apminsight-javaagent.jar"
Windows <tomcat>\bin\setenv.bat
set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:<agent_dir>\apminsight-javaagent.jar
JBoss/WildFly Linux <jboss>/bin/standalone.conf JAVA_OPTS="$JAVA_OPTS -javaagent:..."
Windows <jboss>\bin\standalone.conf.bat set "JAVA_OPTS=%JAVA_OPTS% -javaagent:..."
WebLogic Linux <domain>/bin/setDomainEnv.sh JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:..."
Windows <domain>\bin\setDomainEnv.cmd set JAVA_OPTIONS=%JAVA_OPTIONS% -javaagent:...
Standalone java -javaagent:<agent_dir>/apminsight-javaagent.jar -jar app.jar
6.2 A2 — The -javaagent line exists but is commented out

Script says:

QuoteA2 The -javaagent line exists but is commented out

Cause: A leading # (or <!-- -->) makes the line inert — the JVM never sees it.

Resolution:

Remove the leading # (or the <!-- --> wrapper) from the line reported above, then fully stop and start the application.

6.3 A3 — Config has the agent, but no JVM has loaded it

Script says:

QuoteA3 Config has the agent, but no JVM has loaded it

Cause: The edit is correct but the JVM is still running the pre-edit command line.

Resolution:

Fully stop and start the application — not a reload or a redeploy. Then re-run this script.

6.4 A4 — Agent is loaded, but not from any documented config file

Script says:

QuoteA4 Agent is loaded, but not from any documented config file

Cause: Not a fault on its own — it means the argument comes from an environment variable, a systemd unit or a container entrypoint. Worth knowing when you later try to change it.

Resolution:

No action needed while the agent is attached. To change the argument later, look in: JAVA_TOOL_OPTIONS, _JAVA_OPTIONS, the systemd unit's Environment=, or the container ENTRYPOINT / Dockerfile.

6.5 A5 — apminsight-javaagent.jar is missing from the agent directory

Script says:

QuoteA5 apminsight-javaagent.jar is missing from the agent directory

Cause: The JVM argument points at a JAR that is not there, so the JVM starts without instrumentation (and may log an error).

Resolution:

Re-extract the agent archive into the agent directory, keeping the folder layout intact, then restart the application. Unzip on the target host rather than copying an already-extracted folder, so file permissions survive.

6.6 A6 — Auto Profiler service is not running

Script says:

QuoteA6 Auto Profiler service is not running

Cause: The Auto Profiler is what injects the agent under FSO. While it is stopped, newly started processes are never instrumented.

Resolution:

Start the Auto Profiler service, then restart the application processes you want monitored:

  Linux    sudo systemctl start  applicationsmanagerapmautoprofiler.service
sudo systemctl status applicationsmanagerapmautoprofiler.service
Windows Services → "ManageEngine Applications Manager APM Auto Profiler" → Start

If the service is absent, the FSO agent was installed without APM Insight: re-deploy it from Settings → FSO Agent → Deploy Agent with "Application Performance Management" ticked.

6.7 A7 — Auto Profiler is running but has not attached to the application

Script says:

QuoteA7 Auto Profiler is running but has not attached to the application

Cause: The Auto Profiler instruments a process only at process start. Anything already running when it was installed stays un-profiled.

Resolution:

Restart the application process from a NEW shell or session, so it inherits the Auto Profiler's injection environment:

  Linux    sudo systemctl restart <your-app>.service
or stop and start the server with its own scripts:
Tomcat <tomcat>/bin/shutdown.sh then <tomcat>/bin/startup.sh
JBoss/WildFly <jboss>/bin/standalone.sh
Windows Restart-Service <your-app-service>
or, if the server is not installed as a service:
Tomcat <tomcat>\bin\shutdown.bat then <tomcat>\bin\startup.bat
JBoss/WildFly <jboss>\bin\standalone.bat

Then send a request to the application and wait about a minute. A process that was already running when the Auto Profiler was installed is never instrumented retroactively.

6.8 A8 — Host runs both Auto Profiler and manually installed agents

Script says:

QuoteA8 Host runs both Auto Profiler and manually installed agents

Cause: Not double instrumentation: the Auto Profiler skips a process that already carries an agent, so these are different JVMs. It does mean the deployment is half migrated — the manually instrumented JVMs sit outside the profiler's control and will not follow its configuration or upgrades.

Resolution:

Nothing is broken — decide whether the split is deliberate. To bring everything under FSO, remove the manual -javaagent line from each affected startup config and restart those applications. The Auto Profiler instruments them on their next start. To keep some applications on a manually installed agent, leave them as they are and exclude them under Settings → FSO Agent → APM Insight AutoProfiler, so the split stays deliberate rather than being rediscovered later.

7. Fixes — JVM & Compatibility — B1, B2, B3, B4

The agent and the JVM disagree, or the JVM needs the argument in a particular place.

InfoMatch the code the script printed to the subsection below. Each one opens with the exact line the script writes, so you can confirm you are in the right place.
7.1 B1 — Agent version needs a newer Java than the application runs

Script says:

QuoteB1 Agent version needs a newer Java than the application runs

Cause: Agent v7.x needs Java 8 or newer. On an older JVM it cannot load at all.

Resolution:

Either upgrade the application to Java 8+ (recommended), or use the legacy v5.5 agent for Java 5-7, from APM → Add New Monitor → Java → pick the Java version.

7.2 B2 — IBM J9 / OpenJ9 requires -javaagent before any -X flag

Script says:

QuoteB2 IBM J9 / OpenJ9 requires -javaagent before any -X flag

Cause: IBM J9 silently ignores a -javaagent that appears after -Xms/-Xmx, so the agent never loads.

Resolution:

Move -javaagent so it comes BEFORE every -X flag in the startup arguments, then restart. Suspect this whenever the config looks right but no JVM loads the agent.

7.3 B3 — GraalVM native-image is not supported

Script says:

QuoteB3 GraalVM native-image is not supported

Cause: A native-image binary has no JVM to attach to; the agent needs JVM mode.

Resolution:

Run the application on the JVM rather than as a native-image binary. The agent cannot instrument an ahead-of-time compiled image.

7.4 B4 — Agent or Java version could not be determined

Script says:

QuoteB4 Agent or Java version could not be determined

Cause: Compatibility cannot be confirmed, so a version mismatch may still be hiding here.

Resolution:

Confirm by hand:

  Both     java -jar <agent_dir>/apminsight-javaagent.jar -version
Linux grep 'javaagent v' <agent_dir>/*/apminsight_startup_*.log
Windows Select-String 'javaagent v' <agent_dir>\*\apminsight_startup_*.log
8. Fixes — Configuration & Permissions — C1, C2, C3, C4, C5, C6, C7

The agent loads but cannot read valid settings, or cannot write where it needs to.

InfoMatch the code the script printed to the subsection below. Each one opens with the exact line the script writes, so you can confirm you are in the right place.
8.1 C1 — apminsight.conf not found

Script says:

QuoteC1 apminsight.conf not found

Cause: The agent reads its licence key and server address from this file. Without it the agent loads and then stops.

Resolution:

Restore apminsight.conf to the agent directory. Download a fresh agent archive from APM → Add New Monitor → Java if you no longer have it — the bundled conf already carries the correct licence key and host.

8.2 C2 — license.key is missing or still a placeholder

Script says:

QuoteC2 license.key is missing or still a placeholder

Cause: The collector rejects the agent, so data is discarded even though the agent is attached.

Resolution:

Copy the licence key from APM → Add New Monitor → Java (right-hand panel) into license.key in apminsight.conf, then restart the application.

8.3 C3 — apm.host is missing

Script says:

QuoteC3 apm.host is missing

Cause: The agent has no address to send data to.

Resolution:

Set apm.host in apminsight.conf to the Applications Manager address, for example apm.host=http://appmanager-host:9090 — then restart.

8.4 C4 — apm.host contains escape characters

Script says:

QuoteC4 apm.host contains escape characters

Cause: A backslash-escaped URL is sent literally and never resolves — a frequent cause of apparent network failure.

Resolution:

Remove the backslashes so the value reads as a plain URL (apm.host=https://host:8443, not https\://host\:8443), then restart.

8.5 C5 — application.name is still the generic default

Script says:

QuoteC5 application.name is still the generic default

Cause: Every instance reports under the same name, so several applications collapse into one monitor.

Resolution:

Set a distinct name per application, either in apminsight.conf (application.name=...) or as a JVM flag -Dapminsight.application.name=...

8.6 C6 — agent.server.port is missing

Script says:

QuoteC6 agent.server.port is missing

Cause: The instance folder name and the monitor identity both derive from this port.

Resolution:

Set agent.server.port in apminsight.conf to the application's HTTP port, or pass -Dapminsight.agent.server.port=<port>, then restart.

8.7 C7 — The application user cannot write to the agent directory

Script says:

QuoteC7 The application user cannot write to the agent directory

Cause: The agent cannot create its instance folder or write logs, which looks exactly like the agent never starting.

Resolution:

Give the application user write access to the agent directory:

  Linux    sudo chown -R <app_user> <agent_dir>
# or, if several users need it: sudo chmod -R 775 <agent_dir>
Windows icacls "<agent_dir>" /grant "<app_user>:(OI)(CI)M" /T

Then restart the application so the agent retries creating its instance folder.

9. Fixes — Connectivity & Data Collection — D1, D2, D3, D4, D5, D6, D7, D8, D9, D10

The agent is attached and configured, but data is not reaching Applications Manager — or there is no data to send yet. These are different problems with different fixes.

InfoMatch the code the script printed to the subsection below. Each one opens with the exact line the script writes, so you can confirm you are in the right place.
9.1 D1 — Applications Manager is unreachable (no TCP connection)

Script says:

QuoteD1 Applications Manager is unreachable (no TCP connection)

Cause: The agent buffers and then discards data it cannot deliver.

Resolution:

Validate in this order from the application server, per the KB article "APM Insight monitor not getting added to Applications Manager":

1. Is the host reachable?

       Linux    ping <apm-host>
Windows Test-Connection -ComputerName <apm-host> -Count 1

2. Is the port open?

       Linux    nc -zv <apm-host> <apm-port>
Windows Test-NetConnection -ComputerName <apm-host> -Port <apm-port>

3. Once the port is open, confirm Applications Manager is what answers:

       Linux    curl '<apm.host>/index.do' | grep 'Applications Manager'
Windows (Invoke-WebRequest -Uri '<apm.host>/index.do').Content |
Select-String 'Applications Manager'
Output containing "Applications Manager" means the address is correct.
Empty output means something else is on that port.

4. If a proxy is required, add to apminsight.conf and restart the agent:

       behind.proxy=true
proxy.server.host=<proxy_host>
proxy.server.port=<proxy_port>

Any change to the agent configuration needs an agent restart to take effect.

9.2 D2 — The address answered, but it is not Applications Manager

Script says:

QuoteD2 The address answered, but it is not Applications Manager

Cause: The address accepts a connection but does not identify itself as Applications Manager, so the agent is posting data to the wrong service — usually a proxy, a load balancer, or the OpManager port.

Resolution:

Something answered, but it did not identify itself as Applications Manager. Confirm what is actually on that address:

  Linux    curl '<apm.host>/index.do' | grep 'Applications Manager'
Windows (Invoke-WebRequest -Uri '<apm.host>/index.do').Content |
Select-String 'Applications Manager'

Empty output means apm.host points at something else - a proxy, a load balancer, or the OpManager port instead of the Applications Manager web port. Read the correct Web Server Port / SSL Port from Settings -> Tools -> Support -> Installation Information, correct apm.host, then restart the agent.

9.3 D3 — TLS handshake with Applications Manager failed

Script says:

QuoteD3 TLS handshake with Applications Manager failed

Cause: Data never leaves the agent, though the TCP connection succeeds.

Resolution:

Pick whichever applies:

1. add the JVM flag -Djdk.tls.namedGroups="secp256r1,secp384r1,secp521r1"

2. upgrade the JVM to Java 11+

3. import the Applications Manager certificate into the JVM truststore

9.4 D4 — The agent has never received a collector response

Script says:

QuoteD4 The agent has never received a collector response

Cause: The agent has not completed a single handshake, so the monitor will not appear in the UI.

Resolution:

Clear the connectivity findings above first — this one usually resolves with them. If connectivity is already clean, send traffic to the application: the agent opens its first connection only when it has something to report.

9.5 D5 — Collector code 901 — invalid licence key

Script says:

QuoteD5 Collector code 901 — invalid licence key

Cause: Data is refused. The agent keeps retrying for a 3-day grace period, then stops.

Resolution:

Replace license.key with the key from APM → Add New Monitor → Java (right-hand panel), then restart the application. Grace period: 3 days.

9.6 D6 — Collector code 701 — licence expired

Script says:

QuoteD6 Collector code 701 — licence expired

Cause: Data is refused after a 15-day grace period.

Resolution:

Renew the APM Insight Java add-on licence, then restart the application. Grace period: 15 days.

9.7 D7 — Collector code 702 — licence instance limit reached

Script says:

QuoteD7 Collector code 702 — licence instance limit reached

Cause: New instances are refused until a slot frees up (15-day grace).

Resolution:

Either raise the licensed instance count, or unmanage/delete monitors you no longer need in Applications Manager. Grace period: 15 days.

9.8 D8 — Collector code 900 — monitor was deleted in Applications Manager

Script says:

QuoteD8 Collector code 900 — monitor was deleted in Applications Manager

Cause: The agent keeps sending for 3 days to a monitor that no longer exists.

Resolution:

Re-add the monitor from the APM tab. If the 3-day grace period has already lapsed, restart the application afterwards.

9.9 D9 — Collector code 910 — monitor is unmanaged

Script says:

QuoteD9 Collector code 910 — monitor is unmanaged

Cause: Collection is paused by choice in the UI; nothing is broken.

Resolution:

Manage the monitor again from the APM tab. The agent resumes on its own — no restart needed.

9.10 D10 — Agent is connected but has recorded no transaction yet

Script says:

QuoteD10 Agent is connected but has recorded no transaction yet

Cause: Metrics are only produced by real traffic. A healthy but idle application reports nothing, which is indistinguishable from a broken agent until you check this.

Resolution:

Generate real traffic and re-check — this is expected on an idle application:

1. open the application in a browser, or replay a known request

2. wait about a minute, then re-run this script

APM Insight records web transactions, so a service with no inbound requests reports nothing even when the agent is perfectly healthy. Only treat this as a fault if the application IS receiving traffic — in that case check that the framework is supported, and that the entry point is not excluded by a transaction filter in apminsight.conf.

10. Fixes — Instance Folders & Logs — E1, E2, E3, E4, E5, E6

What the agent left on disk, and what that tells you about how far it got.

InfoMatch the code the script printed to the subsection below. Each one opens with the exact line the script writes, so you can confirm you are in the right place.
10.1 E1 — No instance folder was created

Script says:

QuoteE1 No instance folder was created

Cause: The instance folder is created on the agent's first successful start. Its absence means the agent never got that far.

Resolution:

This is a downstream symptom: fix the agent-loading and configuration findings above, restart the application, then re-run. The folder appears on the agent's first successful start.

10.2 E2 — The expected instance folder is missing

Script says:

QuoteE2 The expected instance folder is missing

Cause: The agent is running under a different name or port than the configuration implies, so you may be reading the wrong monitor.

Resolution:

Check whether -Dapminsight.application.name / -Dapminsight.agent.server.port on the command line override apminsight.conf — the folder is named from whichever value actually wins.

10.3 E3 — Legacy or stale instance folder present

Script says:

QuoteE3 Legacy or stale instance folder present

Cause: Harmless, but it makes log hunting confusing and can mislead the next person.

Resolution:

Safe to delete once no live PID is using it:

  Linux    rm -rf <agent_dir>/<stale_folder>
Windows Remove-Item -Recurse -Force "<agent_dir>\<stale_folder>"
10.4 E4 — The agent hit an error while instrumenting classes

Script says:

QuoteE4 The agent hit an error while instrumenting classes

Cause: Classes that fail to transform are left un-instrumented, so parts of the application go unmeasured.

Resolution:

Read the full exception in the startup log, then:

  • if it names an application class, report it to support with that log
• if it names a JDK/framework class, upgrade to the latest agent build

The application keeps running; only the affected classes go un-instrumented.

10.5 E5 — Many restarts recorded in a short span

Script says:

QuoteE5 Many restarts recorded in a short span

Cause: Repeated restarts usually mean the application is crashing, which keeps the agent from ever settling.

Resolution:

Investigate why the application keeps restarting — the agent cannot settle until it does. Check the application's own logs first, not the agent's.

10.6 E6 — No data-dispatch confirmation in the agent log

Script says:

QuoteE6 No data-dispatch confirmation in the agent log

Cause: The agent started but has not confirmed a successful upload.

Resolution:

Clear the connectivity findings above, then re-run. If they are already clean, see D10 — an idle application has nothing to dispatch.

11. Fixes — Conflicts — F1, F2

Something else on the host is interfering.

InfoMatch the code the script printed to the subsection below. Each one opens with the exact line the script writes, so you can confirm you are in the right place.
11.1 F1 — A third-party APM agent is attached to the same JVM

Script says:

QuoteF1 A third-party APM agent is attached to the same JVM

Cause: Multiple bytecode agents in one JVM is unsupported and causes crashes, ClassNotFoundException and deploy hangs.

Resolution:

Remove the other agent's -javaagent / -agentpath argument from the startup config and restart. Running two instrumentation agents is not supported.

11.2 F2 — Two live JVMs share one instance folder

Script says:

QuoteF2 Two live JVMs share one instance folder

Cause: Two JVMs writing one folder interleave their logs and overwrite each other's state.

Resolution:

Give each application its own identity so each gets its own folder:

  -Dapminsight.application.name=<unique_name>
-Dapminsight.agent.server.port=<unique_port>
12. Collector response codes — 911, 901, 701, 702, 900, 910

The script reads the most recent Response Code: line from the agent logs. This is the collector's verdict on the agent, and the fastest way to tell a licence problem from a network problem.

CodeMeaningActionGrace period
911Agent active, data acceptedokNone — this is the healthy state.—
920Agent active; collector pushed a config updateokNone — also a healthy state. Seen after a setting is changed in Applications Manager.—
901Invalid licence keyFAILReplace license.key from APM → Add New Monitor → Java, then restart.3 days
701Licence expiredFAILRenew the APM Insight Java add-on licence, then restart.15 days
702Instance limit reachedWARNRaise the licensed instance count, or unmanage monitors you no longer need.15 days
900Monitor deleted in Applications ManagerWARNRe-add the monitor in the APM tab; restart if the grace period has lapsed.3 days
910Monitor unmanagedWARNManage the monitor again in the APM tab. The agent resumes on its own.—
InfoNo response code at all is handled separately. The script first checks whether the collector is reachable and the agent attached, so it can distinguish D4 (never connected — a real fault) from D10 (connected, but the application has had no traffic to report). Those two look identical in the UI and have completely different fixes.

Find it by hand:

Quotegrep -h 'Response Code:' <agent_dir>/<AppName>_<Port>/apminsight_agent_*.log | tail -1
13. Where to add -javaagent — per server type (standalone only)
InfoStandalone only. Under FSO you do not add this anywhere — the Auto Profiler injects it for you.
ServerFileLine to add
Apache Tomcat<tomcat>/bin/setenv.sh
<tomcat>/bin/setenv.bat
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/apminsight/apminsight-javaagent.jar"
JBoss EAP / WildFly (standalone)<jboss>/bin/standalone.conf
<jboss>/bin/standalone.conf.bat
JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/apminsight/apminsight-javaagent.jar"
JBoss EAP / WildFly (domain)<jboss>/domain/configuration/host.xml<option value="-javaagent:/opt/apminsight/apminsight-javaagent.jar"/>
Oracle WebLogic<domain>/bin/setDomainEnv.sh
<domain>/bin/setUserOverrides.sh
JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/opt/apminsight/apminsight-javaagent.jar"
IBM WebSphereAdmin console → Servers → Java and Process Management → Process Definition → Java Virtual Machine → Generic JVM arguments-javaagent:/opt/apminsight/apminsight-javaagent.jar
Standalone JAR / Spring Bootthe launch command or unit filejava -javaagent:/opt/apminsight/apminsight-javaagent.jar -jar app.jar
systemd service/etc/systemd/system/<app>.serviceEnvironment="JAVA_TOOL_OPTIONS=-javaagent:/opt/apminsight/apminsight-javaagent.jar"
WarningFully stop and start the application after editing. A reload or a redeploy does not re-read JVM arguments — this is why finding A3 exists. On IBM J9 / OpenJ9, place -javaagent before any -X flag, or the JVM silently ignores it (B2).
14. What the script cannot detect — read before calling the agent healthy

Worth reading before you conclude the agent is healthy.

LimitationWhy it matters
Whether the application framework is supportedThe agent instruments known frameworks. An unsupported stack attaches cleanly and reports nothing, which looks exactly like D10.
Transaction filters excluding your entry pointA filter in apminsight.conf can suppress the very transactions you are testing with.
A containerised agent, when run the naive wayThe script needs bash, so it cannot run inside Alpine or distroless images at all. From a Linux host it can reach the container through /proc/<pid>/root/; on Docker Desktop it cannot. See section 2.
Another user's processes without elevationWithout sudo / an elevated PowerShell, other users' command lines are hidden and an attached agent can look absent.
Whether Applications Manager itself is healthyThe script confirms the address answers. It does not log in or verify the APM add-on is licensed and running.
Network paths that only fail intermittentlyA single probe cannot see a flapping route, an overloaded proxy or a rule that drops long-lived connections.

Still need help?

Send these three things and the first reply can usually be a fix rather than a question:

1The log file from a -v / -Verbose run. It holds the full diagnostic, with licence keys masked, so it is safe to attach as-is.
2The finding codes you have already cleared, and what changed after each one.
3For FSO: the output of Get-Service '*APM Auto Profiler*' and a directory listing of the Auto Profiler root (see 2.2).
InfoContact: appmanager-support@manageengine.com