Dealing with Java Security Access Control Exception
Dealing with Java Security Access Control Exception in JIM Agent Issues.
Dealing with Java Security Access Control Exception#
1. There may be scenarios where even granting All Permissions is not sufficient and additional permissions may be required.
For Example: you might encounter an error like this in the JIM logs:
Caused by: java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "getClassLoader")
2. In such cases, it's necessary to add the following permission in your security policy file
permission java.lang.RuntimePermission "getClassLoader";
3. Depending on your application's requirements, you may also need to include additional permissions such as:
permission java.io.FilePermission "*", "read,write,execute";
permission javax.management.MBeanServerPermission "findMBeanServer";
Note: Follow your organization's security policy when modifying permission settings.
Unable to load JIM data in Grafana | JIM | GRAFANA | PG DEPT#
Unable to load JIM data in Grafana due to the following error: Data too large.
Due to which below issues are occurring:
1. The display is as below, after selecting 1 min time frame:
2. Unable to delete old indices:
3. Unable to execute the curl command from backend:
Solution:
We resolved the issue by removing batch-dated data from OpenSearch.
Issue with JIM Data Capture in Service Transaction Report for Specific Instance#
The issue with JIM Data Capture in Service Transaction Report for Specific Instances.
Issue Observed:
While data for all instances were successfully captured in the JIM Summary dashboard, the 'Service Wise Transaction Volume Report dashboard' failed to capture data specifically for the DCMS_EIS_Service instance.
Solution:
Implementation Overview: JIM was implemented in the DCMS application within the ATM department's production environment. The setup involved using WebLogic as the application server, with JIM configured for four WebLogic instances.
Query Adjustments:
To address the data capture issue, specific queries were added to each pod where data capture was unsuccessful. Post modification, data capture was successful.
The updated queries are as below:
1. Transaction Count Query:
exists:http_status_code AND NOT http_url: (*css OR .ico OR .png OR .js OR .woff OR .ttf OR .eot? OR *.gif) AND NOT process.serviceName: "jaeger-query" AND process.serviceName: $serviceName
2. Transaction Success Query:
exists:http_status_code AND http_status_code: [200 TO 399] AND duration: [0 TO 5000000] AND NOT http_url: (*css OR .ico OR .png OR .js OR .woff OR .ttf OR .eot? OR *.gif) AND NOT process.serviceName: "jaeger-query" AND process.serviceName: $serviceName
3. Transaction Failed Query:
exists:http_status_code AND http_status_code: [400 TO 599] AND NOT http_url: (*css OR .ico OR .png OR .js OR .woff OR .ttf OR .eot? OR *.gif) AND NOT process.serviceName: "jaeger-query" AND process.serviceName: $serviceName
4. Transaction Slow Query:
exists:http_status_code AND http_status_code: [200 TO 399] AND duration: [5000001 TO ] AND NOT http_url: (css OR .ico OR .png OR .js OR .woff OR .ttf OR .eot? OR *.gif) AND NOT process.serviceName: "jaeger-query" AND process.serviceName: $serviceName
Note: JSON query adjustments were necessary for the Service Wise Transaction Volume report (JIM) to accurately reflect data specific to the client's requirements.
Rewriting the content as per documentation standards:
Issue with Tomcat Application Startup (Windows)#
The Tomcat application failed to start following the addition of 'JAVA_OPTS' entries in the setenv file.
Follow the below step to rectify the issue:
1. Modified the catalina.bat file by adding the following arguments:
set JAVA_OPTS ="%JAVA_OPTS% -Xbootclasspath/a:E:\HealAgents\jim-agent\otel.extension-1.0.0.jar;. -Dconfig.file.path=E:\HealAgents\jim-agent -Dextender.class.path=com.heal.ai.otel.extension.HealJimExtension -Dotel.traces.exporter=jaeger -Dotel.metrics.exporter=none -Dotel.exporter.jaeger.endpoint=http://192.0.2.134:14250 -Dotel.resource.attributes=service.name=tomcat,agent.uid=832dfd4b-825d-484b-8799-2297dc3b72f2,instance.uid=c271cb19-756d-466b-8c44-642683ea9b93 -javaagent:E:\HealAgents\jim-agent\opentelemetry-javaagent-1.1.0-all.jar"
This resolved the startup issue.
Unable to View the JIM Data in Grafana (Tomcat)#
Inability to view JIM data in Grafana, due to incorrect JIM Agent ID used in the JVM arguments.
A unique token was used instead of the JIM Agent Name.
Follow the below step to rectify the issue,
1. Update the JVM arguments with the correct JIM Agent Name in the catalina.sh file.
2. Restart Tomcat.
3. After restart, the issue was resolved, and data collection was visible on the Grafana UI.
JIM Argument Addition Issue in WebLogic#
Encountered issues after adding a JIM argument in WebLogic.
Solution: Follow the below step to rectify the issue,
1. Implement the following argument in the server console:
Dotel.resource.attributes=service.name=CBS-WL-PROD-Servers,agent.uid=7cf6f932-95b8-4bc5-b370-ffcf2dc45d7a,instance.uid=JIM_weblogic_24
2. Modify the setDomainEnv.sh file of WebLogic, integrating the Java argument and removing the truststore part:
JAVA_OPTIONS="$JAVA_OPTIONS -Xbootclasspath/a:/home/appsone/HEAL/Agents/JIMAgent/jim-agent/otel.extension-1.0.0.jar:/home/appsone/HEAL/Agents/JIMAgent/jim-agent/commons-logging-1.2.jar:. -Dconfig.file.path=/home/appsone/HEAL/Agents/JIMAgent/jim-agent/config -Djavax.net.ssl.trustStore=/home/appsone/HEAL/Agents/JIMAgent/jim-agent/config/cacerts -Dextender.class.path=com.heal.ai.otel.extension.HealJimExtension -Dotel.traces.exporter=jaeger -Dotel.metrics.exporter=none -Dotel.exporter.jaeger.endpoint=http://192.0.2.135:14250 -javaagent:/home/appsone/HEAL/Agents/JIMAgent/jim-agent/opentelemetry-javaagent-1.1.0-all.jar"
3. Import an SSL Certificate into their cacerts for connecting to HEAL CC and to fetch the JIM Agent configuration.
4. After a complete restart of WebLogic, the application functioned correctly, enabling to generate reports and view data on the Grafana dashboard.