이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 17. Troubleshooting Data Grid Server deployments


Gather diagnostic information about Data Grid Server deployments and perform troubleshooting steps to resolve issues.

17.1. Getting diagnostic reports from Data Grid Server

Data Grid Server provides aggregated reports in tar.gz archives that contain diagnostic information about server instances and host systems. The report provides details about CPU, memory, open files, network sockets and routing, threads, in addition to configuration and log files.

Procedure

  1. Create a CLI connection to Data Grid Server.
  2. Use the server report command to download a tar.gz archive:

    server report
    Downloaded report 'infinispan-<hostname>-<timestamp>-report.tar.gz'

    The command responds with the name of the report, as in the following example:

    Downloaded report 'infinispan-<hostname>-<timestamp>-report.tar.gz'
  3. Move the tar.gz file to a suitable location on your filesystem.
  4. Extract the tar.gz file with any archiving tool.

17.2. Changing Data Grid Server logging configuration at runtime

Modify the logging configuration for Data Grid Server at runtime to temporarily adjust logging to troubleshoot issues and perform root cause analysis.

Modifying the logging configuration through the CLI is a runtime-only operation, which means that changes:

  • Are not saved to the log4j2.xml file. Restarting server nodes or the entire cluster resets the logging configuration to the default properties in the log4j2.xml file.
  • Apply only to the nodes in the cluster when you invoke the CLI. Nodes that join the cluster after you change the logging configuration use the default properties.

Procedure

  1. Create a CLI connection to Data Grid Server.
  2. Use the logging to make the required adjustments.

    • List all appenders defined on the server:

      logging list-appenders

      The command provides a JSON response such as the following:

      {
        "STDOUT" : {
          "name" : "STDOUT"
        },
        "JSON-FILE" : {
          "name" : "JSON-FILE"
        },
        "HR-ACCESS-FILE" : {
          "name" : "HR-ACCESS-FILE"
        },
        "FILE" : {
          "name" : "FILE"
        },
        "REST-ACCESS-FILE" : {
          "name" : "REST-ACCESS-FILE"
        }
      }
    • List all logger configurations defined on the server:

      logging list-loggers

      The command provides a JSON response such as the following:

      [ {
        "name" : "",
        "level" : "INFO",
        "appenders" : [ "STDOUT", "FILE" ]
      }, {
        "name" : "org.infinispan.HOTROD_ACCESS_LOG",
        "level" : "INFO",
        "appenders" : [ "HR-ACCESS-FILE" ]
      }, {
        "name" : "com.arjuna",
        "level" : "WARN",
        "appenders" : [ ]
      }, {
        "name" : "org.infinispan.REST_ACCESS_LOG",
        "level" : "INFO",
        "appenders" : [ "REST-ACCESS-FILE" ]
      } ]
    • Add and modify logger configurations with the set subcommand

      For example, the following command sets the logging level for the org.infinispan package to DEBUG:

      logging set --level=DEBUG org.infinispan
    • Remove existing logger configurations with the remove subcommand.

      For example, the following command removes the org.infinispan logger configuration, which means the root configuration is used instead:

      logging remove org.infinispan

17.3. Gathering resource statistics from the CLI

You can inspect server-collected statistics for some Data Grid Server resources with the stats command.

Use the stats command either from the context of a resource that provides statistics (containers, caches) or with a path to such a resource:

stats
{
  "statistics_enabled" : true,
  "number_of_entries" : 0,
  "hit_ratio" : 0.0,
  "read_write_ratio" : 0.0,
  "time_since_start" : 0,
  "time_since_reset" : 49,
  "current_number_of_entries" : 0,
  "current_number_of_entries_in_memory" : 0,
  "off_heap_memory_used" : 0,
  "data_memory_used" : 0,
  "stores" : 0,
  "retrievals" : 0,
  "hits" : 0,
  "misses" : 0,
  "remove_hits" : 0,
  "remove_misses" : 0,
  "evictions" : 0,
  "average_read_time" : 0,
  "average_read_time_nanos" : 0,
  "average_write_time" : 0,
  "average_write_time_nanos" : 0,
  "average_remove_time" : 0,
  "average_remove_time_nanos" : 0,
  "required_minimum_number_of_nodes" : -1
}
stats /containers/default/caches/mycache
{
  "time_since_start" : -1,
  "time_since_reset" : -1,
  "current_number_of_entries" : -1,
  "current_number_of_entries_in_memory" : -1,
  "off_heap_memory_used" : -1,
  "data_memory_used" : -1,
  "stores" : -1,
  "retrievals" : -1,
  "hits" : -1,
  "misses" : -1,
  "remove_hits" : -1,
  "remove_misses" : -1,
  "evictions" : -1,
  "average_read_time" : -1,
  "average_read_time_nanos" : -1,
  "average_write_time" : -1,
  "average_write_time_nanos" : -1,
  "average_remove_time" : -1,
  "average_remove_time_nanos" : -1,
  "required_minimum_number_of_nodes" : -1
}

17.4. Accessing cluster health via REST

Get Data Grid cluster health via the REST API.

Procedure

  • Invoke a GET request to retrieve cluster health.

    GET /rest/v2/container/health

Data Grid responds with a JSON document such as the following:

{
    "cluster_health":{
        "cluster_name":"ISPN",
        "health_status":"HEALTHY",
        "number_of_nodes":2,
        "node_names":[
            "NodeA-36229",
            "NodeB-28703"
        ]
    },
    "cache_health":[
        {
            "status":"HEALTHY",
            "cache_name":"___protobuf_metadata"
        },
        {
            "status":"HEALTHY",
            "cache_name":"cache2"
        },
        {
            "status":"HEALTHY",
            "cache_name":"mycache"
        },
        {
            "status":"HEALTHY",
            "cache_name":"cache1"
        }
    ]

}
Tip

Get Cache Manager status as follows:

GET /rest/v2/container/health/status

Reference

See the REST v2 (version 2) API documentation for more information.

17.5. Accessing cluster health via JMX

Retrieve Data Grid cluster health statistics via JMX.

Procedure

  1. Connect to Data Grid server using any JMX capable tool such as JConsole and navigate to the following object:

    org.infinispan:type=CacheManager,name="default",component=CacheContainerHealth
  2. Select available MBeans to retrieve cluster health statistics.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.