Troubleshoot APM .NET Agent Deployment
Installation Issues
Cannot find the folder c:\ProgramData
If you cannot find the ProgramData
folder, do one of the following:
-
Check if the
ProgramData
folder is in the Hidden Folders. -
Open the command prompt, and input
set
, and then check for the environment variableProgramData
.C:\Users\mimu>set ... ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files SystemRoot=C:\windows TEMP=C:\Users\mimu\AppData\Local\Temp TMP=C:\Users\mimu\AppData\Local\Temp ...
Error while adding collection entry
The following error is displayed while trying to add collection entry with unique key attribute name
set to Oracle APM IIS Module
.
Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'Oracle APM IIS Module'
Here’s how to fix this:
-
Open Windows file explorer, and browse to
C:\Windows\System32\inetsrv\config.
-
Make a backup copy of the file
applicationHost.config.
-
Open the
applicationHost.config
with Notepad. (We recommend the use of Notepad here.) -
Search for Oracle APM IIS Module, and remove the duplicate entries.
-
Save the
applicationHost.config
file.
Try adding the collection entry again.
Troubleshooting — Agent Startup
Ensure that the Instrumentation is working
You can check if the instrumentation is working by following these steps:
-
Open command prompt and check the environment variables:
C:\>set cor COR_ENABLE_PROFILING=1 COR_PROFILER=oracle.apmAgent
-
Check the environment variables of w3wp.exe process.
-
Reset your IIS server.
-
In the Process Explorer, open the application being monitored.
-
Locate the w3wp.exe process, and view the Properties.
-
Open the Environment tab, and check for the environment variables.
-
-
Check
registry: regedit
HKEY_CLASSES_ROOT\oracle.apmAgent\CLSID (Default)={15837040-7EC4-4B70-AEB0-EB1ADC26960D} HKEY_CLASSES_ROOT\CLSID\{15837040-7EC4-4B70-AEB0-EB1ADC26960D}\InprocServer32 (Default)=C:\Program Files\Oracle APM .NET Agent\OracleAPMInstrumenter64.dll HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{15837040-7EC4-4B70-AEB0-EB1ADC26960D}\InprocServer32 (Default)=C:\Program Files (x86)\Oracle APM .NET Agent\OracleAPMInstrumenter32.dll HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{15837040-7EC4-4B70-AEB0-EB1ADC26960D}\InprocServer32 (Default)=C:\Program Files\Oracle APM .NET Agent\OracleAPMInstrumenter64.dll HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{15837040-7EC4-4B70-AEB0-EB1ADC26960D}\InprocServer32 (Default)=C:\Program Files (x86)\Oracle APM .NET Agent\OracleAPMInstrumenter32.dll HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{15837040-7EC4-4B70-AEB0-EB1ADC26960D}\InprocServer32 (Default)=C:\Program Files (x86)\Oracle APM .NET Agent\OracleAPMInstrumenter32.dll
-
Check the Windows event viewer to see if there are any errors regarding CLR profiling.
-
Use a process exploration tool to check if
OracleAPMInstrumenter64.dll
orOracleAPMInstrumenter32.dll
is loaded.Example: You can use Procexp. Go to Find Module and search for OracleAPM.
-
You can install a simple sample on the problematic environment and see if the
OracleAPMInstrumenter64.dll
can be loaded.
HTTP Request Error
If you find a HTTP request error after enabling End User Monitoring, disable the offending URLs through configuration. See Disabling Monitoring by APM .Net Agent, and use the Disable specific URLs option.
Intermittent HTTP Request Failures
If there are intermittent HTTP request failures after installing the APM .NET Agent, check the performance monitor and find out the resource bottleneck. If there are queued requests, that could mean that the threadpool was initialized with less threads than needed. In this case, they can set up thread pool to have sufficient initial worker threads.
Edit the machine.config
files with below configuration:
<configuration>
"<system.web>"
<processModel autoConfig="true" minWorkerThreads="30" />
</system.web>
</configuration>
The machine.config
files include:
-
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
-
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
Unable to get OAuth Token from IDCS Server
If the agent startup log shows that it cannot get the initial OAuth authentication token, preceded by a warning showing a failure to reach the IDCS server, check to ensure that there is no firewall blocking access to the IDCS server. If there is a firewall, you will need to allow access to the IDCS server.
Error indicating IIS is not installed
- Through the File Explorer, access this file:
c:\windows\system32\inetsrv\config\applicationHost.config
- In the confirmation box, confirm that you want to access the folder that contains the above file.
- Click OK. Ensure that the file
applicationHost.config
exists, and then try to run the APM .Net installer again.
Windows Event Viewer reporting Event ID 1022 as an error
You might see Event ID 1022 flagged as an error in Windows Event Viewer. This event is signaling that the APM Agent profiler loading failed. This event entry is expected and can be ignored.
By design, the APM Agent decides to only monitor IIS worker processes, and not to monitor other processes. Whenever the APM Agent decides not to monitor a process - therefore any non IIS worker process - the APM Agent profiler is not loaded and this event gets logged in Event Viewer.
APM .NET Agent might not work due to conflicts with .NET Profile API
APM .NET Agent might not work correctly if other software that uses .NET Profile API is installed on the same machine. In most cases, this would be another monitoring tool such as Microsoft Monitoring Agent, AppDynamics, New Relic, etc.
This conflict usually results in the lack of reported events in the APM UI despite the fact that APM .NET Agent is successfully deployed, connected and reporting. In this situation it is advisable to use Microsoft Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) to examine the environment variables of one of the w3wp.exe
processes. In case COR_PROFILER
variable is defined and its value is not oracle.apmAgent
, the conflict described above is likely to occur.
The resolution is to uninstall both APM .NET Agent and the conflicting software, reboot the machine and then reinstall APM .NET Agent.