Skip to content

Trace ID Redirection Issue in Grafana

Trace ID Redirection Issue in Grafana in JIM Agent Issues.

3 min read Updated SS RS

Trace ID Redirection Issue in Grafana#

Clicking on trace ID redirects to an incorrect port in Grafana for older data.

Follow the below step to rectify the issue,

1. Change the port from 3000 to 3001.

2. Add a parameter in the jaeger.nomad file under args:

args = [
"--es.server-urls=http://192.0.2.7:9200",
"--es.username=admin",
"--es.password=admin",
"--es.num-replicas=0",
"--es.version=7",
"--es.max-span-age=1440h0m0s"
]

Note: The hours are based on the age of the data in OpenSearch.

3. After adding the parameter and restarting the Jaeger service, the issue was resolved and enabling the visualization of response data for stack traces.

WebSphere Startup Issue Post JIM Argument Inclusion#

After implementing pre-requisite JIM configurations, the application functioned correctly without any issues reported by the application team.

Three days later, during an application restart by the team, WebSphere failed to start. Removing the JIM arguments from the configuration, resulted in the application starting and running successfully.

Error Log:

[11/2/22 15:24:01:873 IST] 00000001 SystemErr R java.security.policy: error adding Entry:java.net.MalformedURLException: no protocol: /export/home/appsone/HealAgent/JIMAgent/JIM_192.0.2.14/opentelemetry-javaagent-1.1.0-all.jar

Root Cause Analysis (RCA):

1. Identify the syntax error in the server.policy file, specifically in the line referencing the opentelemetry-javaagent-1.1.0-all.jar file.

Solution: Follow the below step to rectify the issue,

1. Resolve the issue by correcting the syntax error in the server.policy file. This led to successful startup of WebSphere with JIM arguments included.

JIM Data Not Displayed in Grafana#

JIM data, which was previously captured successfully, was no longer visible in Grafana. All services were operational, and the target server configurations were verified to be correct. However, an examination of the Jaeger logs revealed an error.

JIM Data Not Displayed in Grafana

Solution: Follow the below step to rectify the issue,

1. Data Retention and Shards:

  • The issue was identified in scenarios where there is a substantial data retention period. The shard size by default is configured for shorter retention periods.
  • In cases like Example, where data retention is around 180 days, it's necessary to have a minimum of 1000 shards in a cluster.

2. Increasing Shard Count:

a. To increase the shard count, execute the following command:

curl -u admin:admin -XPUT http://192.0.2.136:9200/_cluster/settings -H "Content-Type: application/json" -d '{ "persistent": { "cluster.max_shards_per_node": "2000" } }'

b. This change may require an increase in the heap memory size for OpenSearch.

3. Updating Heap Memory: The heap memory for OpenSearch was increased in the jvm.options file, located at below directory.

/appsone/HEAL/Appsone_Service/opensearch/config

4. Retention Period Verification: To verify the retention period, execute the below command:

curl -u admin:admin -XGET "http://<opensearch host port>/_plugins/_ism/policies/jim-jaeger-ism-policy"

Expected Output:

Expected Output

For information: Jaeger creates one index daily. For a retention period of 180 days, there will be 180 indexes stored.

Issue: JIM Data Collection Unavailable in Example Dashboard#

Description:

The JIM data collection is not visible in the Example dashboard.

Solution:

The issue arises due to excessive data consumption by opensearch, leading to breakage in JIM data. To address this, the opensearch configuration has been adjusted to operate in cluster mode, optimizing data balancing.

Procedure: Updating opensearch.nomad File

opensearch.nomad
--------------------------------------------------
# Updated opensearch.nomad file to configure opensearch in cluster mode.

Otel and Jaeger Configuration for Avoiding Doc Size Exceeded Error:#

To prevent Doc size exceeded errors and subsequent disruption of JIM data, the following steps were performed:

1. Uploaded version 22 JIM pipeline in the production environment.

2. Added the following lines in the jaeger.nomad file in the argument section for both nodes:

"--es.index-rollover-frequency-spans=hour"
"--es.timeout=60s"

3. Added the following command in the otel collector .yml:

spans_index_date_layout: "hour"

4. Increase the timeout in the jaeger data source to 60.

5. Restart the otel and jaeger services.

JIM Agent Prerequisites Issue#

After adding JIM arguments, the WebLogic service fails to start.

/u01/Weblogic-12.2.1.3.0/weblogic_home/user_projects/domains/base_domain/bin
<2024-01-10 IST 15:52:32> <Info> <StopNodeManager> <End>
/u01/Weblogic-12.2.1.3.0/weblogic_home/user_projects/domains/base_domain/nodemanager/stopnodemanager.log was copied to /u01/Weblogic-12.2.1.3.0/weblogic_home/user_projects/domains/base_domain/nodemanager/nodemanager.log
Stopping Weblogic Server ...
Error opening zip file or JAR manifest missing: /root/weblogic/jim-agent/heal-jim-opentelemetry-javaagent-1.2.3.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Done
Stopping Derby Server ...
Derby server stopped.

Solution: The issue is related to the WebLogic user not being able to read JIM agent files and folders.

Follow the JIM document and configure the JIM agent to allow the WebLogic user to read the JIM agent files and folders.