This topic provides answers to some frequently asked questions (FAQ) about Application Collector.

What can I do if a returned error message indicates that the port 9996 is occupied?
Run the following command to modify the collector/collector.config and javaagent/javaagent.config parameters:
collector.listen.port=9996
profiler.collector.port=9996
What can I do if a returned error message indicates that JAVA_HOME is not found?
If you use a Linux server, add JAVA_HOME to the run.sh file in the collector/ directory and the attach.sh file in the javaagent/ directory. If you use a server that runs Windows, add JAVA_HOME to the corresponding file in the startup command.
What can I do if the com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded error is reported?
Make sure that you have granted the required permissions to the decompressed file. For more information, see Deploy a data collection environment. If the application collection agent is independently deployed, make sure that the account used to start the agent is the same as the account used to start the application.
How do I start the Application Collector client for Windows?
Method 1: Use the Command Prompt to go to the directory where the collector is installed and run the following command:
start /b java -jar javaagent-collector.jar
Method 2: Use the Command Prompt to go to the directory where the client is installed and run the following command:
`java -cp "%JAVA_HOME%\lib\tools.jar;%cd%\javaagent-bootstrap.jar" com.alibaba.adam.javaagent.bootstrap.AgentAttacher -p %1`
Do I need to back up collected data and cache before I restart the application collection agent?
No. If you restart the application collection agent, new data will be combined with the existing data after duplicates are removed.
Does Application Collector support WebSphere?
WebSphere that uses Oracle JDK V1.6 or later is supported. IBM JDK is not supported.
Can I deploy multiple agents to monitor multiple applications?
You can deploy an agent on a Java Virtual Machine (JVM) to monitor applications. If multiple applications are separately deployed on multiple containers, multiple agents can be separately deployed regardless of the number of JVMs. However, if multiple applications are deployed on the same container, only one agent is required to monitor the applications because the applications are in the same JVM. In this case, you do not need to deploy multiple agents. Otherwise, an error will be reported to indicate that an agent is already deployed.
If an application is deployed on multiple servers, do I need to monitor and collect data from all the servers?
No, you do not need to monitor and collect data from all the servers. If load balancing has been enabled for the application, you can monitor only two of the servers.
Can I collect data from an application that uses Java Runtime Environment (JRE) instead of JDK?
Yes, but you must copy the tools.jar package from JDK to the ${JAVA_HOME}/lib/ directory.
What can I do if the agent already loaded error is reported from the standard output of the container after the agent is started?
A JVM can load the agent only once. Therefore, you must restart the application, and then attach the agent to the JVM again.
What can I do if the Connection refused error is reported after the agent fails to be started?
Verify whether the process ID is valid.