Troubleshooting steps to identify and resolve the APM - Java agent monitor onboarding issue due to "IllegalArgumentException: URI path begins with multiple slashes"

Troubleshooting steps to identify and resolve the APM - Java agent monitor onboarding issue due to "IllegalArgumentException: URI path begins with multiple slashes"

If you encounter the exception "java.lang.IllegalArgumentException: URI path begins with multiple slashes"  while pointing the APM Insight Java agent folder to your monitoring Java Application server, follow these steps to identify and resolve the issue:
Note: Our Java agent won't proceed with successful communication with Applications Manager if initial communicating(arh/connect) API is in wrong format

Identify the issue with Agent Logs:

 1. Navigate to the <agent-unzipped-folder> which added as JVM argument to your Java Application server and open the recently modified `apminsight_agent_<YYYY>-<MM>-<DD>-<HH>-<MM>-<SS>_<GMT>_<PID>.log`  file.
2. Look for exception entries like the below example:

apminsight_agent_<YYYY>-<MM>-<DD>-<HH>-<MM>-<SS>_<GMT>_<PID>.log
  1. [27 Feb 2024 16:11:36.502][apminsight-services-starter][INFO]: [JavaAgentService] URL to be executed: http://localhost:9090//arh/connect?license.key=**
  2. .
  3. .
  4. .
  5. [27 Feb 2024 16:11:36.533][apminsight-services-starter][ERROR]: Exception in Connect. Will try to reconnect after 2 minute(s).
  6. java.lang.IllegalArgumentException: URI path begins with multiple slashes
  7. at com.manageengine.org.apache.hc.core5.util.Args.check(Args.java:41) ~[?:6.0.1]
  8. at com.manageengine.org.apache.hc.core5.http.message.BasicHttpRequest.setUri(BasicHttpRequest.java:281) ~[?:6.0.1]
  9. at com.manageengine.org.apache.hc.core5.http.message.BasicHttpRequest.<init>(BasicHttpRequest.java:123) ~[?:6.0.1]
  10. at com.manageengine.org.apache.hc.core5.http.message.BasicClassicHttpRequest.<init>(BasicClassicHttpRequest.java:91) ~[?:6.0.1]

Solution

1. Navigate to the <agent-unzipped-folder> which added as JVM argument to your Java Application server and open the `apminsight.conf`  file.
2. Remove ends-with backward slash(/) in the `apm.host` config value as mentioned below:
apm.host=http://localhost:9090/ => apm.host=http://localhost:9090
3. Then, save the file and Restart the Java application server to get reflected

 If the issue persists, Kindly contact the support@manageengine.com along with the updated agent logs.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Real User Monitor (RUM) - Troubleshooting

                      If the monitor has not polled data for a long time, follow the steps below for troubleshooting: Step 1: Check the RUM Agent configuration Real User Monitor requires the RUM Agent to be installed and mapped to the Applications Manager. Refer the help ...
                    • Self monitor Applications Manager using APM Insight Java Agent

                      Applications Manager is built with Java, hence we can monitor it using APM Insight Java Agent to measure it's performance continuously, which can be very much useful. Setting up APM Insight Java Agent Follow the below steps to download and set up the ...
                    • How to rename an existing APM - Java agent application's monitor?

                      In Applications Manager's APM(Application Performance Monitoring) doesn't support renaming applications/monitors from the web client. However, the application name of an existing application instance can be renamed in the `apminsight.conf` file and ...
                    • Adding APM Insight Java agent in a Kubernetes environment

                      There are three methods for installing the APM Insight Java agent in a Kubernetes environment: Using Dockerfile Using InitContainers Using Persistent Volumes Prerequisites Download the latest APM Insight Java agent ZIP file. Extract the ZIP file and ...
                    • DNS Monitor - Troubleshooting

                      Common DNS Monitor Errors and Troubleshooting Guide 1. Host Not Found Description: The DNS server was unable to locate the requested lookup address. Possible Causes: This may happen if the hostname is incorrect, the domain does not exist, or there is ...